@orderingstack/front-components-product-configurator 1.4.2-beta.30 → 1.4.2-beta.31

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/index.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var S=require("react"),ci=require("react-spring"),eu=require("react-dom");function tu(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}function ru(e){if(e&&e.__esModule)return e;var t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var T=tu(S),st=ru(S);function De(e){return De=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},De(e)}function $e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nu(e,t){if(De(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(De(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function za(e){var t=nu(e,"string");return De(t)=="symbol"?t:t+""}function fi(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,za(n.key),n)}}function Ie(e,t,r){return t&&fi(e.prototype,t),r&&fi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ut(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bn(e,t){return bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},bn(e,t)}function Nr(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&&bn(e,t)}function Xt(e,t){if(t&&(De(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ut(e)}function We(e){return We=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},We(e)}function Ke(e,t,r){return(t=za(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qa(e){if(Array.isArray(e))return e}function iu(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function di(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 qa(e,t){if(e){if(typeof e=="string")return di(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)?di(e,t):void 0}}function Ja(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function au(e){return Qa(e)||iu(e)||qa(e)||Ja()}function gi(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?gi(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ou={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)}},su=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};$e(this,e),this.init(t,r)}return Ie(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||ou,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,pi(pi({},{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}(),Be=new su,lt=function(){function e(){$e(this,e),this.observers={}}return Ie(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 Ft(){var e,t,r=new Promise(function(n,i){e=n,t=i});return r.resolve=e,r.reject=t,r}function hi(e){return e==null?"":""+e}function uu(e,t,r){e.forEach(function(n){t[n]&&(r[n]=t[n])})}function kn(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 mi(e,t,r){var n=kn(e,t,Object),i=n.obj,a=n.k;i[a]=r}function lu(e,t,r,n){var i=kn(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 mr(e,t){var r=kn(e,t),n=r.obj,i=r.k;if(!!n)return n[i]}function vi(e,t,r){var n=mr(e,r);return n!==void 0?n:mr(t,r)}function Za(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]):Za(e[n],t[n],r):e[n]=t[n]);return e}function xt(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var cu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function fu(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return cu[t]}):e}var $r=typeof window!="undefined"&&window.navigator&&typeof window.navigator.userAgentData=="undefined"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,du=[" ",",","?","!",";"];function gu(e,t,r){t=t||"",r=r||"";var n=du.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 yi(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 ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yi(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pu(e){var t=hu();return function(){var n=We(e),i;if(t){var a=We(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Xt(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}}function Xa(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 f=n.slice(a+o).join(r);return f?Xa(u,f,r):void 0}i=i[n[a]]}return i}}var mu=function(e){Nr(r,e);var t=pu(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),$r&&lt.call(ut(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 Ie(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,f=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,c=[i,a];o&&typeof o!="string"&&(c=c.concat(o)),o&&typeof o=="string"&&(c=c.concat(u?o.split(u):o)),i.indexOf(".")>-1&&(c=i.split("."));var l=mr(this.data,c);return l||!f||typeof o!="string"?l:Xa(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},f=this.options.keySeparator;f===void 0&&(f=".");var c=[i,a];o&&(c=c.concat(f?o.split(f):o)),i.indexOf(".")>-1&&(c=i.split("."),s=a,a=c[1]),this.addNamespaces(a),mi(this.data,c,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 f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},c=[i,a];i.indexOf(".")>-1&&(c=i.split("."),s=o,o=a,a=c[1]),this.addNamespaces(a);var l=mr(this.data,c)||{};s?Za(l,o,u):l=ar(ar({},l),o),mi(this.data,c,l),f.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"?ar(ar({},{}),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}(lt),eo={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 bi(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?bi(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vu(e){var t=yu();return function(){var n=We(e),i;if(t){var a=We(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Xt(this,i)}}function yu(){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 Si={},Oi=function(e){Nr(r,e);var t=vu(r);function r(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return $e(this,r),i=t.call(this),$r&&lt.call(ut(i)),uu(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,ut(i)),i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Be.create("translator"),i}return Ie(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||[],f=o&&i.indexOf(o)>-1,c=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!gu(i,o,s);if(f&&!c){var l=i.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:i,namespaces:u};var d=i.split(o);(o!==s||o===s&&this.options.ns.indexOf(d[0])>-1)&&(u=d.shift()),i=d.join(s)}return typeof u=="string"&&(u=[u]),{key:i,namespaces:u}}},{key:"translate",value:function(i,a,o){var s=this;if(De(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,f=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,c=this.extractFromKey(i[i.length-1],a),l=c.key,d=c.namespaces,g=d[d.length-1],p=a.lng||this.language,y=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&p.toLowerCase()==="cimode"){if(y){var v=a.nsSeparator||this.options.nsSeparator;return u?(b.res="".concat(g).concat(v).concat(l),b):"".concat(g).concat(v).concat(l)}return u?(b.res=l,b):l}var b=this.resolve(i,a),h=b&&b.res,E=b&&b.usedKey||l,A=b&&b.exactUsedKey||l,w=Object.prototype.toString.apply(h),P=["[object Number]","[object Function]","[object RegExp]"],_=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,L=!this.i18nFormat||this.i18nFormat.handleAsObject,F=typeof h!="string"&&typeof h!="boolean"&&typeof h!="number";if(L&&h&&F&&P.indexOf(w)<0&&!(typeof _=="string"&&w==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var k=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,h,ye(ye({},a),{},{ns:d})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return u?(b.res=k,b):k}if(f){var W=w==="[object Array]",D=W?[]:{},j=W?A:E;for(var V in h)if(Object.prototype.hasOwnProperty.call(h,V)){var H="".concat(j).concat(f).concat(V);D[V]=this.translate(H,ye(ye({},a),{joinArrays:!1,ns:d})),D[V]===H&&(D[V]=h[V])}h=D}}else if(L&&typeof _=="string"&&w==="[object Array]")h=h.join(_),h&&(h=this.extendTranslation(h,i,a,o));else{var Q=!1,G=!1,pe=a.count!==void 0&&typeof a.count!="string",ee=r.hasDefaultValue(a),ce=pe?this.pluralResolver.getSuffix(p,a.count,a):"",oe=a["defaultValue".concat(ce)]||a.defaultValue;!this.isValidLookup(h)&&ee&&(Q=!0,h=oe),this.isValidLookup(h)||(G=!0,h=l);var fe=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,te=fe&&G?void 0:h,K=ee&&oe!==h&&this.options.updateMissing;if(G||Q||K){if(this.logger.log(K?"updateKey":"missingKey",p,g,l,K?oe:h),f){var he=this.resolve(l,ye(ye({},a),{},{keySeparator:!1}));he&&he.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 ae=[],Ee=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Ee&&Ee[0])for(var Ae=0;Ae<Ee.length;Ae++)ae.push(Ee[Ae]);else this.options.saveMissingTo==="all"?ae=this.languageUtils.toResolveHierarchy(a.lng||this.language):ae.push(a.lng||this.language);var Re=function(U,se,ne){var Se=ee&&ne!==h?ne:te;s.options.missingKeyHandler?s.options.missingKeyHandler(U,g,se,Se,K,a):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(U,g,se,Se,K,a),s.emit("missingKey",U,g,se,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&pe?ae.forEach(function(je){s.pluralResolver.getSuffixes(je,a).forEach(function(U){Re([je],l+U,a["defaultValue".concat(U)]||oe)})}):Re(ae,l,oe))}h=this.extendTranslation(h,i,a,b,o),G&&h===l&&this.options.appendNamespaceToMissingKey&&(h="".concat(g,":").concat(l)),(G||Q)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(g,":").concat(l):l,Q?h:void 0):h=this.options.parseMissingKeyHandler(h))}return u?(b.res=h,b):h}},{key:"extendTranslation",value:function(i,a,o,s,u){var f=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 c=typeof i=="string"&&(o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),l;if(c){var d=i.match(this.interpolator.nestingRegexp);l=d&&d.length}var g=o.replace&&typeof o.replace!="string"?o.replace:o;if(this.options.interpolation.defaultVariables&&(g=ye(ye({},this.options.interpolation.defaultVariables),g)),i=this.interpolator.interpolate(i,g,o.lng||this.language,o),c){var p=i.match(this.interpolator.nestingRegexp),y=p&&p.length;l<y&&(o.nest=!1)}o.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var h=arguments.length,E=new Array(h),A=0;A<h;A++)E[A]=arguments[A];return u&&u[0]===E[0]&&!o.context?(f.logger.warn("It seems you are nesting recursively key: ".concat(E[0]," in key: ").concat(a[0])),null):f.translate.apply(f,E.concat([a]))},o)),o.interpolation&&this.interpolator.reset()}var v=o.postProcess||this.options.postProcess,b=typeof v=="string"?[v]:v;return i!=null&&b&&b.length&&o.applyPostProcessor!==!1&&(i=eo.handle(b,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,f,c,l;return typeof i=="string"&&(i=[i]),i.forEach(function(d){if(!a.isValidLookup(s)){var g=a.extractFromKey(d,o),p=g.key;u=p;var y=g.namespaces;a.options.fallbackNS&&(y=y.concat(a.options.fallbackNS));var v=o.count!==void 0&&typeof o.count!="string",b=v&&!o.ordinal&&o.count===0&&a.pluralResolver.shouldUseIntlApi(),h=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);y.forEach(function(A){a.isValidLookup(s)||(l=A,!Si["".concat(E[0],"-").concat(A)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(l)&&(Si["".concat(E[0],"-").concat(A)]=!0,a.logger.warn('key "'.concat(u,'" for languages "').concat(E.join(", "),`" won't get resolved as namespace "`).concat(l,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(function(w){if(!a.isValidLookup(s)){c=w;var P=[p];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(P,p,w,A,o);else{var _;v&&(_=a.pluralResolver.getSuffix(w,o.count,o));var L="".concat(a.options.pluralSeparator,"zero");if(v&&(P.push(p+_),b&&P.push(p+L)),h){var F="".concat(p).concat(a.options.contextSeparator).concat(o.context);P.push(F),v&&(P.push(F+_),b&&P.push(F+L))}}for(var k;k=P.pop();)a.isValidLookup(s)||(f=k,s=a.getResource(w,A,k,o))}}))})}}),{res:s,usedKey:u,exactUsedKey:f,usedLng:c,usedNS:l}}},{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}(lt);function zr(e){return e.charAt(0).toUpperCase()+e.slice(1)}var bu=function(){function e(t){$e(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Be.create("languageUtils")}return Ie(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]=zr(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]=zr(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=zr(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(f){!f||(i.isSupportedCode(f)?o.push(f):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(f)))};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}(),Su=[{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}],Ou={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)}},wu=["v1","v2","v3"],wi={zero:0,one:1,two:2,few:3,many:4,other:5};function Eu(){var e={};return Su.forEach(function(t){t.lngs.forEach(function(r){e[r]={numbers:t.nr,plurals:Ou[t.fc]}})}),e}var xu=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=Be.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=Eu()}return Ie(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 wi[o]-wi[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!wu.includes(this.options.compatibilityJSON)}}]),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 Fe(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){Ke(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}var Pu=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$e(this,e),this.logger=Be.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(r){return r},this.init(t)}return Ie(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:fu,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?xt(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?xt(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?xt(n.nestingPrefix):n.nestingPrefixEscaped||xt("$t("),this.nestingSuffix=n.nestingSuffix?xt(n.nestingSuffix):n.nestingSuffixEscaped||xt(")"),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,f,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(v){return v.replace(/\$/g,"$$$$")}var d=function(b){if(b.indexOf(o.formatSeparator)<0){var h=vi(n,c,b);return o.alwaysFormat?o.format(h,void 0,i,Fe(Fe(Fe({},a),n),{},{interpolationkey:b})):h}var E=b.split(o.formatSeparator),A=E.shift().trim(),w=E.join(o.formatSeparator).trim();return o.format(vi(n,c,A),w,i,Fe(Fe(Fe({},a),n),{},{interpolationkey:A}))};this.resetRegExp();var g=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,p=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,y=[{regex:this.regexpUnescape,safeValue:function(b){return l(b)}},{regex:this.regexp,safeValue:function(b){return o.escapeValue?l(o.escape(b)):l(b)}}];return y.forEach(function(v){for(f=0;s=v.regex.exec(r);){var b=s[1].trim();if(u=d(b),u===void 0)if(typeof g=="function"){var h=g(r,s,a);u=typeof h=="string"?h:""}else if(a&&a.hasOwnProperty(b))u="";else if(p){u=s[0];continue}else o.logger.warn("missed to pass in variable ".concat(b," for interpolating ").concat(r)),u="";else typeof u!="string"&&!o.useRawValueToEscape&&(u=hi(u));var E=v.safeValue(u);if(r=r.replace(s[0],E),p?(v.regex.lastIndex+=u.length,v.regex.lastIndex-=s[0].length):v.regex.lastIndex=0,f++,f>=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=Fe({},a);u.applyPostProcessor=!1,delete u.defaultValue;function f(g,p){var y=this.nestingOptionsSeparator;if(g.indexOf(y)<0)return g;var v=g.split(new RegExp("".concat(y,"[ ]*{"))),b="{".concat(v[1]);g=v[0],b=this.interpolate(b,u);var h=b.match(/'/g),E=b.match(/"/g);(h&&h.length%2===0&&!E||E.length%2!==0)&&(b=b.replace(/'/g,'"'));try{u=JSON.parse(b),p&&(u=Fe(Fe({},p),u))}catch(A){return this.logger.warn("failed parsing options string in nesting for key ".concat(g),A),"".concat(g).concat(y).concat(b)}return delete u.defaultValue,g}for(;o=this.nestingRegexp.exec(r);){var c=[],l=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){var d=o[1].split(this.formatSeparator).map(function(g){return g.trim()});o[1]=d.shift(),c=d,l=!0}if(s=n(f.call(this,o[1].trim(),u),u),s&&o[0]===r&&typeof s!="string")return s;typeof s!="string"&&(s=hi(s)),s||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(r)),s=""),l&&(s=c.reduce(function(g,p){return i.format(g,p,a.lng,Fe(Fe({},a),{},{interpolationkey:o[1].trim()}))},s.trim())),r=r.replace(o[0],s),this.regexp.lastIndex=0}return r}}]),e}();function xi(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 tt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xi(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cu(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=au(s),f=u[0],c=u.slice(1),l=c.join(":").trim().replace(/^'+|'+$/g,"");r[f.trim()]||(r[f.trim()]=l),l==="false"&&(r[f.trim()]=!1),l==="true"&&(r[f.trim()]=!0),isNaN(l)||(r[f.trim()]=parseInt(l,10))}})}}return{formatName:t,formatOptions:r}}function Pt(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 Au=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$e(this,e),this.logger=Be.create("formatter"),this.options=t,this.formats={number:Pt(function(r,n){var i=new Intl.NumberFormat(r,n);return function(a){return i.format(a)}}),currency:Pt(function(r,n){var i=new Intl.NumberFormat(r,tt(tt({},n),{},{style:"currency"}));return function(a){return i.format(a)}}),datetime:Pt(function(r,n){var i=new Intl.DateTimeFormat(r,tt({},n));return function(a){return i.format(a)}}),relativetime:Pt(function(r,n){var i=new Intl.RelativeTimeFormat(r,tt({},n));return function(a){return i.format(a,n.range||"day")}}),list:Pt(function(r,n){var i=new Intl.ListFormat(r,tt({},n));return function(a){return i.format(a)}})},this.init(t)}return Ie(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()]=Pt(n)}},{key:"format",value:function(r,n,i,a){var o=this,s=n.split(this.formatSeparator),u=s.reduce(function(f,c){var l=Cu(c),d=l.formatName,g=l.formatOptions;if(o.formats[d]){var p=f;try{var y=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},v=y.locale||y.lng||a.locale||a.lng||i;p=o.formats[d](f,v,tt(tt(tt({},g),a),y))}catch(b){o.logger.warn(b)}return p}else o.logger.warn("there was no format function for ".concat(d));return f},r);return u}}]),e}();function Pi(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 Ci(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pi(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _u(e){var t=Tu();return function(){var n=We(e),i;if(t){var a=We(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Xt(this,i)}}function Tu(){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 Nu(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var $u=function(e){Nr(r,e);var t=_u(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),$r&&lt.call(ut(o)),o.backend=n,o.store=i,o.services=a,o.languageUtils=a.languageUtils,o.options=s,o.logger=Be.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 Ie(r,[{key:"queueLoad",value:function(i,a,o,s){var u=this,f={},c={},l={},d={};return i.forEach(function(g){var p=!0;a.forEach(function(y){var v="".concat(g,"|").concat(y);!o.reload&&u.store.hasResourceBundle(g,y)?u.state[v]=2:u.state[v]<0||(u.state[v]===1?c[v]===void 0&&(c[v]=!0):(u.state[v]=1,p=!1,c[v]===void 0&&(c[v]=!0),f[v]===void 0&&(f[v]=!0),d[y]===void 0&&(d[y]=!0)))}),p||(l[g]=!0)}),(Object.keys(f).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(f),pending:Object.keys(c),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(d)}}},{key:"loaded",value:function(i,a,o){var s=i.split("|"),u=s[0],f=s[1];a&&this.emit("failedLoading",u,f,a),o&&this.store.addResourceBundle(u,f,o),this.state[i]=a?-1:2;var c={};this.queue.forEach(function(l){lu(l.loaded,[u],f),Nu(l,i),a&&l.errors.push(a),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(function(d){c[d]||(c[d]={});var g=l.loaded[d];g.length&&g.forEach(function(p){c[d][p]===void 0&&(c[d][p]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(l){return!l.done})}},{key:"read",value:function(i,a,o){var s=this,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,c=arguments.length>5?arguments[5]:void 0;if(!i.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:a,fcName:o,tried:u,wait:f,callback:c});return}return this.readingCalls++,this.backend[o](i,a,function(l,d){if(s.readingCalls--,s.waitingReads.length>0){var g=s.waitingReads.shift();s.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(l&&d&&u<s.maxRetries){setTimeout(function(){s.read.call(s,i,a,o,u+1,f*2,c)},f);return}c(l,d)})}},{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 f=this.queueLoad(i,a,s,u);if(!f.toLoad.length)return f.pending.length||u(),null;f.toLoad.forEach(function(c){o.loadOne(c)})}},{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],f=s[1];this.read(u,f,"read",void 0,void 0,function(c,l){c&&a.logger.warn("".concat(o,"loading namespace ").concat(f," for language ").concat(u," failed"),c),!c&&l&&a.logger.log("".concat(o,"loaded namespace ").concat(f," for language ").concat(u),l),a.loaded(i,c,l)})}},{key:"saveMissing",value:function(i,a,o,s,u){var f=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,Ci(Ci({},f),{},{isUpdate:u})),!(!i||!i[0])&&this.store.addResource(i[0],a,o,s))}}]),r}(lt);function Iu(){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(De(t[1])==="object"&&(r=t[1]),typeof t[1]=="string"&&(r.defaultValue=t[1]),typeof t[2]=="string"&&(r.tDescription=t[2]),De(t[2])==="object"||De(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 _i(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 Ve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_i(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_i(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lu(e){var t=Ru();return function(){var n=We(e),i;if(t){var a=We(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Xt(this,i)}}function Ru(){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 or(){}function Fu(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(r){typeof e[r]=="function"&&(e[r]=e[r].bind(e))})}var vr=function(e){Nr(r,e);var t=Lu(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),$r&&lt.call(ut(n)),n.options=Ai(i),n.services={},n.logger=Be,n.modules={external:[]},Fu(ut(n)),a&&!n.isInitialized&&!i.isClone){if(!n.options.initImmediate)return n.init(i,a),Xt(n,ut(n));setTimeout(function(){n.init(i,a)},0)}return n}return Ie(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=Iu();this.options=Ve(Ve(Ve({},s),this.options),Ai(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Ve(Ve({},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(b){return b?typeof b=="function"?new b:b:null}if(!this.options.isClone){this.modules.logger?Be.init(u(this.modules.logger),this.options):Be.init(null,this.options);var f;this.modules.formatter?f=this.modules.formatter:typeof Intl!="undefined"&&(f=Au);var c=new bu(this.options);this.store=new mu(this.options.resources,this.options);var l=this.services;l.logger=Be,l.resourceStore=this.store,l.languageUtils=c,l.pluralResolver=new xu(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(l.formatter=u(f),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new Pu(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new $u(u(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",function(b){for(var h=arguments.length,E=new Array(h>1?h-1:0),A=1;A<h;A++)E[A-1]=arguments[A];i.emit.apply(i,[b].concat(E))}),this.modules.languageDetector&&(l.languageDetector=u(this.modules.languageDetector),l.languageDetector.init(l,this.options.detection,this.options)),this.modules.i18nFormat&&(l.i18nFormat=u(this.modules.i18nFormat),l.i18nFormat.init&&l.i18nFormat.init(this)),this.translator=new Oi(this.services,this.options),this.translator.on("*",function(b){for(var h=arguments.length,E=new Array(h>1?h-1:0),A=1;A<h;A++)E[A-1]=arguments[A];i.emit.apply(i,[b].concat(E))}),this.modules.external.forEach(function(b){b.init&&b.init(i)})}if(this.format=this.options.interpolation.format,o||(o=or),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var g=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];g.forEach(function(b){i[b]=function(){var h;return(h=i.store)[b].apply(h,arguments)}});var p=["addResource","addResources","addResourceBundle","removeResourceBundle"];p.forEach(function(b){i[b]=function(){var h;return(h=i.store)[b].apply(h,arguments),i}});var y=Ft(),v=function(){var h=function(A,w){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),y.resolve(w),o(A,w)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return h(null,i.t.bind(i));i.changeLanguage(i.options.lng,h)};return this.options.resources||!this.options.initImmediate?v():setTimeout(v,0),y}},{key:"loadResources",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:or,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 f=[],c=function(g){if(!!g){var p=a.services.languageUtils.toResolveHierarchy(g);p.forEach(function(y){f.indexOf(y)<0&&f.push(y)})}};if(u)c(u);else{var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.forEach(function(d){return c(d)})}this.options.preload&&this.options.preload.forEach(function(d){return c(d)}),this.services.backendConnector.load(f,this.options.ns,function(d){!d&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),s(d)})}else s(null)}},{key:"reloadResources",value:function(i,a,o){var s=Ft();return i||(i=this.languages),a||(a=this.options.ns),o||(o=or),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"&&eo.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=Ft();this.emit("languageChanging",i);var u=function(d){o.language=d,o.languages=o.services.languageUtils.toResolveHierarchy(d),o.resolvedLanguage=void 0,o.setResolvedLanguage(d)},f=function(d,g){g?(u(g),o.translator.changeLanguage(g),o.isLanguageChangingTo=void 0,o.emit("languageChanged",g),o.logger.log("languageChanged",g)):o.isLanguageChangingTo=void 0,s.resolve(function(){return o.t.apply(o,arguments)}),a&&a(d,function(){return o.t.apply(o,arguments)})},c=function(d){!i&&!d&&o.services.languageDetector&&(d=[]);var g=typeof d=="string"?d:o.services.languageUtils.getBestMatchFromCodes(d);g&&(o.language||u(g),o.translator.language||o.translator.changeLanguage(g),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage(g)),o.loadResources(g,function(p){f(p,g)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(c):c(i),s}},{key:"getFixedT",value:function(i,a,o){var s=this,u=function f(c,l){var d;if(De(l)!=="object"){for(var g=arguments.length,p=new Array(g>2?g-2:0),y=2;y<g;y++)p[y-2]=arguments[y];d=s.options.overloadTranslationOptionHandler([c,l].concat(p))}else d=Ve({},l);d.lng=d.lng||f.lng,d.lngs=d.lngs||f.lngs,d.ns=d.ns||f.ns,d.keyPrefix=d.keyPrefix||o||f.keyPrefix;var v=s.options.keySeparator||".",b=d.keyPrefix?"".concat(d.keyPrefix).concat(v).concat(c):c;return s.t(b,d)};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,f=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var c=function(g,p){var y=a.services.backendConnector.state["".concat(g,"|").concat(p)];return y===-1||y===2};if(o.precheck){var l=o.precheck(this,c);if(l!==void 0)return l}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(s,i)&&(!u||c(f,i)))}},{key:"loadNamespaces",value:function(i,a){var o=this,s=Ft();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=Ft();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],u=i.filter(function(f){return s.indexOf(f)<0});return u.length?(this.options.preload=s.concat(u),this.loadResources(function(f){o.resolve(),a&&a(f)}),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]:or,s=Ve(Ve(Ve({},this.options),a),{isClone:!0}),u=new r(s);(a.debug!==void 0||a.prefix!==void 0)&&(u.logger=u.logger.clone(a));var f=["store","services","language"];return f.forEach(function(c){u[c]=i[c]}),u.services=Ve({},this.services),u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u.translator=new Oi(u.services,u.options),u.translator.on("*",function(c){for(var l=arguments.length,d=new Array(l>1?l-1:0),g=1;g<l;g++)d[g-1]=arguments[g];u.emit.apply(u,[c].concat(d))}),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}(lt);Ke(vr,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new vr(e,t)});var ve=vr.createInstance();ve.createInstance=vr.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 er=e=>e.type==="checkbox",At=e=>e instanceof Date,be=e=>e==null;const to=e=>typeof e=="object";var ge=e=>!be(e)&&!Array.isArray(e)&&to(e)&&!At(e),ro=e=>ge(e)&&e.target?er(e.target)?e.target.checked:e.target.value:e,Du=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,no=(e,t)=>e.has(Du(t)),Mu=e=>{const t=e.constructor&&e.constructor.prototype;return ge(t)&&t.hasOwnProperty("isPrototypeOf")},jn=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function de(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(!(jn&&(e instanceof Blob||e instanceof FileList))&&(r||ge(e)))if(t=r?[]:{},!r&&!Mu(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=de(e[n]));else return e;return t}var tr=e=>Array.isArray(e)?e.filter(Boolean):[],J=e=>e===void 0,$=(e,t,r)=>{if(!t||!ge(e))return r;const n=tr(t.split(/[,[\].]+?/)).reduce((i,a)=>be(i)?i:i[a],e);return J(n)||n===e?J(e[t])?r:e[t]:n},Ue=e=>typeof e=="boolean",Vn=e=>/^\w*$/.test(e),io=e=>tr(e.replace(/["|']|\]/g,"").split(/\.|\[/)),z=(e,t,r)=>{let n=-1;const i=Vn(t)?[t]:io(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let u=r;if(n!==o){const f=e[s];u=ge(f)||Array.isArray(f)?f:isNaN(+i[n+1])?{}:[]}if(s==="__proto__")return;e[s]=u,e=e[s]}return e};const yr={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},_e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Qe={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ao=T.default.createContext(null),Ye=()=>T.default.useContext(ao),oo=e=>{const{children:t,...r}=e;return T.default.createElement(ao.Provider,{value:r},t)};var so=(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]!==_e.all&&(t._proxyFormState[o]=!n||_e.all),r&&(r[o]=!0),e[o]}});return i},Oe=e=>ge(e)&&!Object.keys(e).length,uo=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return Oe(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||_e.all))},we=e=>Array.isArray(e)?e:[e],lo=(e,t,r)=>!e||!t||e===t||we(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function Ir(e){const t=T.default.useRef(e);t.current=e,T.default.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function co(e){const t=Ye(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[o,s]=T.default.useState(r._formState),u=T.default.useRef(!0),f=T.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=T.default.useRef(i);return c.current=i,Ir({disabled:n,next:l=>u.current&&lo(c.current,l.name,a)&&uo(l,f.current,r._updateFormState)&&s({...r._formState,...l}),subject:r._subjects.state}),T.default.useEffect(()=>(u.current=!0,f.current.isValid&&r._updateValid(!0),()=>{u.current=!1}),[r]),so(o,r,f.current,!1)}var He=e=>typeof e=="string",fo=(e,t,r,n,i)=>He(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);function go(e){const t=Ye(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:o}=e||{},s=T.default.useRef(n);s.current=n,Ir({disabled:a,subject:r._subjects.values,next:c=>{lo(s.current,c.name,o)&&f(de(fo(s.current,r._names,c.values||r._formValues,!1,i)))}});const[u,f]=T.default.useState(r._getWatch(n,i));return T.default.useEffect(()=>r._removeUnmounted()),u}function po(e){const t=Ye(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,o=no(i._names.array,r),s=go({control:i,name:r,defaultValue:$(i._formValues,r,$(i._defaultValues,r,e.defaultValue)),exact:!0}),u=co({control:i,name:r}),f=T.default.useRef(i.register(r,{...e.rules,value:s,...Ue(e.disabled)?{disabled:e.disabled}:{}}));return T.default.useEffect(()=>{const c=i._options.shouldUnregister||a,l=(d,g)=>{const p=$(i._fields,d);p&&p._f&&(p._f.mount=g)};if(l(r,!0),c){const d=de($(i._options.defaultValues,r));z(i._defaultValues,r,d),J($(i._formValues,r))&&z(i._formValues,r,d)}return()=>{(o?c&&!i._state.action:c)?i.unregister(r):l(r,!1)}},[r,i,o,a]),T.default.useEffect(()=>{$(i._fields,r)&&i._updateDisabledField({disabled:n,fields:i._fields,name:r,value:$(i._fields,r)._f.value})},[n,r,i]),{field:{name:r,value:s,...Ue(n)||u.disabled?{disabled:u.disabled||n}:{},onChange:T.default.useCallback(c=>f.current.onChange({target:{value:ro(c),name:r},type:yr.CHANGE}),[r]),onBlur:T.default.useCallback(()=>f.current.onBlur({target:{value:$(i._formValues,r),name:r},type:yr.BLUR}),[r,i]),ref:c=>{const l=$(i._fields,r);l&&c&&(l._f.ref={focus:()=>c.focus(),select:()=>c.select(),setCustomValidity:d=>c.setCustomValidity(d),reportValidity:()=>c.reportValidity()})}},formState:u,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!$(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!$(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!$(u.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!$(u.validatingFields,r)},error:{enumerable:!0,get:()=>$(u.errors,r)}})}}const ku=e=>e.render(po(e)),ju="post";function Vu(e){const t=Ye(),[r,n]=T.default.useState(!1),{control:i=t.control,onSubmit:a,children:o,action:s,method:u=ju,headers:f,encType:c,onError:l,render:d,onSuccess:g,validateStatus:p,...y}=e,v=async b=>{let h=!1,E="";await i.handleSubmit(async A=>{const w=new FormData;let P="";try{P=JSON.stringify(A)}catch{}for(const _ of i._names.mount)w.append(_,$(A,_));if(a&&await a({data:A,event:b,method:u,formData:w,formDataJson:P}),s)try{const _=[f&&f["Content-Type"],c].some(F=>F&&F.includes("json")),L=await fetch(s,{method:u,headers:{...f,...c?{"Content-Type":c}:{}},body:_?P:w});L&&(p?!p(L.status):L.status<200||L.status>=300)?(h=!0,l&&l({response:L}),E=String(L.status)):g&&g({response:L})}catch(_){h=!0,l&&l({error:_})}})(b),h&&e.control&&(e.control._subjects.state.next({isSubmitSuccessful:!1}),e.control.setError("root.server",{type:E}))};return T.default.useEffect(()=>{n(!0)},[]),d?T.default.createElement(T.default.Fragment,null,d({submit:v})):T.default.createElement("form",{noValidate:r,action:s,method:u,encType:c,onSubmit:v,...y},o)}var ho=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},rt=()=>{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)})},Qr=(e,t,r={})=>r.shouldFocus||J(r.shouldFocus)?r.focusName||`${e}.${J(r.focusIndex)?t:r.focusIndex}.`:"",Kt=e=>({isOnSubmit:!e||e===_e.onSubmit,isOnBlur:e===_e.onBlur,isOnChange:e===_e.onChange,isOnAll:e===_e.all,isOnTouch:e===_e.onTouched}),Sn=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const _t=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=$(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)break;if(o.ref&&t(o.ref,o.name)&&!n)break;_t(s,t)}else ge(s)&&_t(s,t)}}};var mo=(e,t,r)=>{const n=we($(e,r));return z(n,"root",t[r]),z(e,r,n),e},Un=e=>e.type==="file",at=e=>typeof e=="function",br=e=>{if(!jn)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},dr=e=>He(e),Bn=e=>e.type==="radio",Sr=e=>e instanceof RegExp;const Ti={value:!1,isValid:!1},Ni={value:!0,isValid:!0};var vo=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&&!J(e[0].attributes.value)?J(e[0].value)||e[0].value===""?Ni:{value:e[0].value,isValid:!0}:Ni:Ti}return Ti};const $i={isValid:!1,value:null};var yo=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,$i):$i;function Ii(e,t,r="validate"){if(dr(e)||Array.isArray(e)&&e.every(dr)||Ue(e)&&!e)return{type:r,message:dr(e)?e:"",ref:t}}var Ct=e=>ge(e)&&!Sr(e)?e:{value:e,message:""},On=async(e,t,r,n,i)=>{const{ref:a,refs:o,required:s,maxLength:u,minLength:f,min:c,max:l,pattern:d,validate:g,name:p,valueAsNumber:y,mount:v,disabled:b}=e._f,h=$(t,p);if(!v||b)return{};const E=o?o[0]:a,A=D=>{n&&E.reportValidity&&(E.setCustomValidity(Ue(D)?"":D||""),E.reportValidity())},w={},P=Bn(a),_=er(a),L=P||_,F=(y||Un(a))&&J(a.value)&&J(h)||br(a)&&a.value===""||h===""||Array.isArray(h)&&!h.length,k=ho.bind(null,p,r,w),W=(D,j,V,H=Qe.maxLength,Q=Qe.minLength)=>{const G=D?j:V;w[p]={type:D?H:Q,message:G,ref:a,...k(D?H:Q,G)}};if(i?!Array.isArray(h)||!h.length:s&&(!L&&(F||be(h))||Ue(h)&&!h||_&&!vo(o).isValid||P&&!yo(o).isValid)){const{value:D,message:j}=dr(s)?{value:!!s,message:s}:Ct(s);if(D&&(w[p]={type:Qe.required,message:j,ref:E,...k(Qe.required,j)},!r))return A(j),w}if(!F&&(!be(c)||!be(l))){let D,j;const V=Ct(l),H=Ct(c);if(!be(h)&&!isNaN(h)){const Q=a.valueAsNumber||h&&+h;be(V.value)||(D=Q>V.value),be(H.value)||(j=Q<H.value)}else{const Q=a.valueAsDate||new Date(h),G=ce=>new Date(new Date().toDateString()+" "+ce),pe=a.type=="time",ee=a.type=="week";He(V.value)&&h&&(D=pe?G(h)>G(V.value):ee?h>V.value:Q>new Date(V.value)),He(H.value)&&h&&(j=pe?G(h)<G(H.value):ee?h<H.value:Q<new Date(H.value))}if((D||j)&&(W(!!D,V.message,H.message,Qe.max,Qe.min),!r))return A(w[p].message),w}if((u||f)&&!F&&(He(h)||i&&Array.isArray(h))){const D=Ct(u),j=Ct(f),V=!be(D.value)&&h.length>+D.value,H=!be(j.value)&&h.length<+j.value;if((V||H)&&(W(V,D.message,j.message),!r))return A(w[p].message),w}if(d&&!F&&He(h)){const{value:D,message:j}=Ct(d);if(Sr(D)&&!h.match(D)&&(w[p]={type:Qe.pattern,message:j,ref:a,...k(Qe.pattern,j)},!r))return A(j),w}if(g){if(at(g)){const D=await g(h,t),j=Ii(D,E);if(j&&(w[p]={...j,...k(Qe.validate,j.message)},!r))return A(j.message),w}else if(ge(g)){let D={};for(const j in g){if(!Oe(D)&&!r)break;const V=Ii(await g[j](h,t),E,j);V&&(D={...V,...k(j,V.message)},A(V.message),r&&(w[p]=D))}if(!Oe(D)&&(w[p]={ref:E,...D},!r))return w}}return A(!0),w},qr=(e,t)=>[...e,...we(t)],Jr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Zr(e,t,r){return[...e.slice(0,t),...we(r),...e.slice(t)]}var Xr=(e,t,r)=>Array.isArray(e)?(J(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],en=(e,t)=>[...we(t),...we(e)];function Uu(e,t){let r=0;const n=[...e];for(const i of t)n.splice(i-r,1),r++;return tr(n).length?n:[]}var tn=(e,t)=>J(t)?[]:Uu(e,we(t).sort((r,n)=>r-n)),rn=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]};function Bu(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=J(e)?n++:e[t[n++]];return e}function Hu(e){for(const t in e)if(e.hasOwnProperty(t)&&!J(e[t]))return!1;return!0}function le(e,t){const r=Array.isArray(t)?t:Vn(t)?[t]:io(t),n=r.length===1?e:Bu(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(ge(n)&&Oe(n)||Array.isArray(n)&&Hu(n))&&le(e,r.slice(0,-1)),e}var Li=(e,t,r)=>(e[t]=r,e);function Wu(e){const t=Ye(),{control:r=t.control,name:n,keyName:i="id",shouldUnregister:a}=e,[o,s]=T.default.useState(r._getFieldArray(n)),u=T.default.useRef(r._getFieldArray(n).map(rt)),f=T.default.useRef(o),c=T.default.useRef(n),l=T.default.useRef(!1);c.current=n,f.current=o,r._names.array.add(n),e.rules&&r.register(n,e.rules),Ir({next:({values:w,name:P})=>{if(P===c.current||!P){const _=$(w,c.current);Array.isArray(_)&&(s(_),u.current=_.map(rt))}},subject:r._subjects.array});const d=T.default.useCallback(w=>{l.current=!0,r._updateFieldArray(n,w)},[r,n]),g=(w,P)=>{const _=we(de(w)),L=qr(r._getFieldArray(n),_);r._names.focus=Qr(n,L.length-1,P),u.current=qr(u.current,_.map(rt)),d(L),s(L),r._updateFieldArray(n,L,qr,{argA:Jr(w)})},p=(w,P)=>{const _=we(de(w)),L=en(r._getFieldArray(n),_);r._names.focus=Qr(n,0,P),u.current=en(u.current,_.map(rt)),d(L),s(L),r._updateFieldArray(n,L,en,{argA:Jr(w)})},y=w=>{const P=tn(r._getFieldArray(n),w);u.current=tn(u.current,w),d(P),s(P),r._updateFieldArray(n,P,tn,{argA:w})},v=(w,P,_)=>{const L=we(de(P)),F=Zr(r._getFieldArray(n),w,L);r._names.focus=Qr(n,w,_),u.current=Zr(u.current,w,L.map(rt)),d(F),s(F),r._updateFieldArray(n,F,Zr,{argA:w,argB:Jr(P)})},b=(w,P)=>{const _=r._getFieldArray(n);rn(_,w,P),rn(u.current,w,P),d(_),s(_),r._updateFieldArray(n,_,rn,{argA:w,argB:P},!1)},h=(w,P)=>{const _=r._getFieldArray(n);Xr(_,w,P),Xr(u.current,w,P),d(_),s(_),r._updateFieldArray(n,_,Xr,{argA:w,argB:P},!1)},E=(w,P)=>{const _=de(P),L=Li(r._getFieldArray(n),w,_);u.current=[...L].map((F,k)=>!F||k===w?rt():u.current[k]),d(L),s([...L]),r._updateFieldArray(n,L,Li,{argA:w,argB:_},!0,!1)},A=w=>{const P=we(de(w));u.current=P.map(rt),d([...P]),s([...P]),r._updateFieldArray(n,[...P],_=>_,{},!0,!1)};return T.default.useEffect(()=>{if(r._state.action=!1,Sn(n,r._names)&&r._subjects.state.next({...r._formState}),l.current&&(!Kt(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([n]).then(w=>{const P=$(w.errors,n),_=$(r._formState.errors,n);(_?!P&&_.type||P&&(_.type!==P.type||_.message!==P.message):P&&P.type)&&(P?z(r._formState.errors,n,P):le(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const w=$(r._fields,n);w&&w._f&&!(Kt(r._options.reValidateMode).isOnSubmit&&Kt(r._options.mode).isOnSubmit)&&On(w,r._formValues,r._options.criteriaMode===_e.all,r._options.shouldUseNativeValidation,!0).then(P=>!Oe(P)&&r._subjects.state.next({errors:mo(r._formState.errors,P,n)}))}r._subjects.values.next({name:n,values:{...r._formValues}}),r._names.focus&&_t(r._fields,(w,P)=>{if(r._names.focus&&P.startsWith(r._names.focus)&&w.focus)return w.focus(),1}),r._names.focus="",r._updateValid(),l.current=!1},[o,n,r]),T.default.useEffect(()=>(!$(r._formValues,n)&&r._updateFieldArray(n),()=>{(r._options.shouldUnregister||a)&&r.unregister(n)}),[n,r,i,a]),{swap:T.default.useCallback(b,[d,n,r]),move:T.default.useCallback(h,[d,n,r]),prepend:T.default.useCallback(p,[d,n,r]),append:T.default.useCallback(g,[d,n,r]),remove:T.default.useCallback(y,[d,n,r]),insert:T.default.useCallback(v,[d,n,r]),update:T.default.useCallback(E,[d,n,r]),replace:T.default.useCallback(A,[d,n,r]),fields:T.default.useMemo(()=>o.map((w,P)=>({...w,[i]:u.current[P]||rt()})),[o,i])}}var nn=()=>{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=[]}}},Or=e=>be(e)||!to(e);function pt(e,t){if(Or(e)||Or(t))return e===t;if(At(e)&&At(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(At(a)&&At(o)||ge(a)&&ge(o)||Array.isArray(a)&&Array.isArray(o)?!pt(a,o):a!==o)return!1}}return!0}var bo=e=>e.type==="select-multiple",Gu=e=>Bn(e)||er(e),an=e=>br(e)&&e.isConnected,So=e=>{for(const t in e)if(at(e[t]))return!0;return!1};function wr(e,t={}){const r=Array.isArray(e);if(ge(e)||r)for(const n in e)Array.isArray(e[n])||ge(e[n])&&!So(e[n])?(t[n]=Array.isArray(e[n])?[]:{},wr(e[n],t[n])):be(e[n])||(t[n]=!0);return t}function Oo(e,t,r){const n=Array.isArray(e);if(ge(e)||n)for(const i in e)Array.isArray(e[i])||ge(e[i])&&!So(e[i])?J(t)||Or(r[i])?r[i]=Array.isArray(e[i])?wr(e[i],[]):{...wr(e[i])}:Oo(e[i],be(t)?{}:t[i],r[i]):r[i]=!pt(e[i],t[i]);return r}var sr=(e,t)=>Oo(e,t,wr(t)),wo=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>J(e)?e:t?e===""?NaN:e&&+e:r&&He(e)?new Date(e):n?n(e):e;function on(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Un(t)?t.files:Bn(t)?yo(e.refs).value:bo(t)?[...t.selectedOptions].map(({value:r})=>r):er(t)?vo(e.refs).value:wo(J(t.value)?e.ref.value:t.value,e)}var Ku=(e,t,r,n)=>{const i={};for(const a of e){const o=$(t,a);o&&z(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Dt=e=>J(e)?e:Sr(e)?e.source:ge(e)?Sr(e.value)?e.value.source:e.value:e,Yu=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Ri(e,t,r){const n=$(e,r);if(n||Vn(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 zu=(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,Qu=(e,t)=>!tr($(e,t)).length&&le(e,t);const qu={mode:_e.onSubmit,reValidateMode:_e.onChange,shouldFocusError:!0};function Ju(e={}){let t={...qu,...e},r={submitCount:0,isDirty:!1,isLoading:at(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},i=ge(t.defaultValues)||ge(t.values)?de(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:de(i),o={action:!1,mount:!1,watch:!1},s={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,f=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},l={values:nn(),array:nn(),state:nn()},d=Kt(t.mode),g=Kt(t.reValidateMode),p=t.criteriaMode===_e.all,y=m=>O=>{clearTimeout(f),f=setTimeout(m,O)},v=async m=>{if(c.isValid||m){const O=t.resolver?Oe((await L()).errors):await k(n,!0);O!==r.isValid&&l.state.next({isValid:O})}},b=(m,O)=>{(c.isValidating||c.validatingFields)&&((m||Array.from(s.mount)).forEach(x=>{x&&(O?z(r.validatingFields,x,O):le(r.validatingFields,x))}),l.state.next({validatingFields:r.validatingFields,isValidating:!Oe(r.validatingFields)}))},h=(m,O=[],x,R,I=!0,N=!0)=>{if(R&&x){if(o.action=!0,N&&Array.isArray($(n,m))){const M=x($(n,m),R.argA,R.argB);I&&z(n,m,M)}if(N&&Array.isArray($(r.errors,m))){const M=x($(r.errors,m),R.argA,R.argB);I&&z(r.errors,m,M),Qu(r.errors,m)}if(c.touchedFields&&N&&Array.isArray($(r.touchedFields,m))){const M=x($(r.touchedFields,m),R.argA,R.argB);I&&z(r.touchedFields,m,M)}c.dirtyFields&&(r.dirtyFields=sr(i,a)),l.state.next({name:m,isDirty:D(m,O),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else z(a,m,O)},E=(m,O)=>{z(r.errors,m,O),l.state.next({errors:r.errors})},A=m=>{r.errors=m,l.state.next({errors:r.errors,isValid:!1})},w=(m,O,x,R)=>{const I=$(n,m);if(I){const N=$(a,m,J(x)?$(i,m):x);J(N)||R&&R.defaultChecked||O?z(a,m,O?N:on(I._f)):H(m,N),o.mount&&v()}},P=(m,O,x,R,I)=>{let N=!1,M=!1;const Y={name:m},ue=!!($(n,m)&&$(n,m)._f&&$(n,m)._f.disabled);if(!x||R){c.isDirty&&(M=r.isDirty,r.isDirty=Y.isDirty=D(),N=M!==Y.isDirty);const xe=ue||pt($(i,m),O);M=!!(!ue&&$(r.dirtyFields,m)),xe||ue?le(r.dirtyFields,m):z(r.dirtyFields,m,!0),Y.dirtyFields=r.dirtyFields,N=N||c.dirtyFields&&M!==!xe}if(x){const xe=$(r.touchedFields,m);xe||(z(r.touchedFields,m,x),Y.touchedFields=r.touchedFields,N=N||c.touchedFields&&xe!==x)}return N&&I&&l.state.next(Y),N?Y:{}},_=(m,O,x,R)=>{const I=$(r.errors,m),N=c.isValid&&Ue(O)&&r.isValid!==O;if(e.delayError&&x?(u=y(()=>E(m,x)),u(e.delayError)):(clearTimeout(f),u=null,x?z(r.errors,m,x):le(r.errors,m)),(x?!pt(I,x):I)||!Oe(R)||N){const M={...R,...N&&Ue(O)?{isValid:O}:{},errors:r.errors,name:m};r={...r,...M},l.state.next(M)}},L=async m=>{b(m,!0);const O=await t.resolver(a,t.context,Ku(m||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(m),O},F=async m=>{const{errors:O}=await L(m);if(m)for(const x of m){const R=$(O,x);R?z(r.errors,x,R):le(r.errors,x)}else r.errors=O;return O},k=async(m,O,x={valid:!0})=>{for(const R in m){const I=m[R];if(I){const{_f:N,...M}=I;if(N){const Y=s.array.has(N.name);b([R],!0);const ue=await On(I,a,p,t.shouldUseNativeValidation&&!O,Y);if(b([R]),ue[N.name]&&(x.valid=!1,O))break;!O&&($(ue,N.name)?Y?mo(r.errors,ue,N.name):z(r.errors,N.name,ue[N.name]):le(r.errors,N.name))}M&&await k(M,O,x)}}return x.valid},W=()=>{for(const m of s.unMount){const O=$(n,m);O&&(O._f.refs?O._f.refs.every(x=>!an(x)):!an(O._f.ref))&&ae(m)}s.unMount=new Set},D=(m,O)=>(m&&O&&z(a,m,O),!pt(oe(),i)),j=(m,O,x)=>fo(m,s,{...o.mount?a:J(O)?i:He(m)?{[m]:O}:O},x,O),V=m=>tr($(o.mount?a:i,m,e.shouldUnregister?$(i,m,[]):[])),H=(m,O,x={})=>{const R=$(n,m);let I=O;if(R){const N=R._f;N&&(!N.disabled&&z(a,m,wo(O,N)),I=br(N.ref)&&be(O)?"":O,bo(N.ref)?[...N.ref.options].forEach(M=>M.selected=I.includes(M.value)):N.refs?er(N.ref)?N.refs.length>1?N.refs.forEach(M=>(!M.defaultChecked||!M.disabled)&&(M.checked=Array.isArray(I)?!!I.find(Y=>Y===M.value):I===M.value)):N.refs[0]&&(N.refs[0].checked=!!I):N.refs.forEach(M=>M.checked=M.value===I):Un(N.ref)?N.ref.value="":(N.ref.value=I,N.ref.type||l.values.next({name:m,values:{...a}})))}(x.shouldDirty||x.shouldTouch)&&P(m,I,x.shouldTouch,x.shouldDirty,!0),x.shouldValidate&&ce(m)},Q=(m,O,x)=>{for(const R in O){const I=O[R],N=`${m}.${R}`,M=$(n,N);(s.array.has(m)||!Or(I)||M&&!M._f)&&!At(I)?Q(N,I,x):H(N,I,x)}},G=(m,O,x={})=>{const R=$(n,m),I=s.array.has(m),N=de(O);z(a,m,N),I?(l.array.next({name:m,values:{...a}}),(c.isDirty||c.dirtyFields)&&x.shouldDirty&&l.state.next({name:m,dirtyFields:sr(i,a),isDirty:D(m,N)})):R&&!R._f&&!be(N)?Q(m,N,x):H(m,N,x),Sn(m,s)&&l.state.next({...r}),l.values.next({name:o.mount?m:void 0,values:{...a}})},pe=async m=>{o.mount=!0;const O=m.target;let x=O.name,R=!0;const I=$(n,x),N=()=>O.type?on(I._f):ro(m),M=Y=>{R=Number.isNaN(Y)||Y===$(a,x,Y)};if(I){let Y,ue;const xe=N(),Et=m.type===yr.BLUR||m.type===yr.FOCUS_OUT,Js=!Yu(I._f)&&!t.resolver&&!$(r.errors,x)&&!I._f.deps||zu(Et,$(r.touchedFields,x),r.isSubmitted,g,d),Kr=Sn(x,s,Et);z(a,x,xe),Et?(I._f.onBlur&&I._f.onBlur(m),u&&u(0)):I._f.onChange&&I._f.onChange(m);const Yr=P(x,xe,Et,!1),Zs=!Oe(Yr)||Kr;if(!Et&&l.values.next({name:x,type:m.type,values:{...a}}),Js)return c.isValid&&v(),Zs&&l.state.next({name:x,...Kr?{}:Yr});if(!Et&&Kr&&l.state.next({...r}),t.resolver){const{errors:ui}=await L([x]);if(M(xe),R){const Xs=Ri(r.errors,n,x),li=Ri(ui,n,Xs.name||x);Y=li.error,x=li.name,ue=Oe(ui)}}else b([x],!0),Y=(await On(I,a,p,t.shouldUseNativeValidation))[x],b([x]),M(xe),R&&(Y?ue=!1:c.isValid&&(ue=await k(n,!0)));R&&(I._f.deps&&ce(I._f.deps),_(x,ue,Y,Yr))}},ee=(m,O)=>{if($(r.errors,O)&&m.focus)return m.focus(),1},ce=async(m,O={})=>{let x,R;const I=we(m);if(t.resolver){const N=await F(J(m)?m:I);x=Oe(N),R=m?!I.some(M=>$(N,M)):x}else m?(R=(await Promise.all(I.map(async N=>{const M=$(n,N);return await k(M&&M._f?{[N]:M}:M)}))).every(Boolean),!(!R&&!r.isValid)&&v()):R=x=await k(n);return l.state.next({...!He(m)||c.isValid&&x!==r.isValid?{}:{name:m},...t.resolver||!m?{isValid:x}:{},errors:r.errors}),O.shouldFocus&&!R&&_t(n,ee,m?I:s.mount),R},oe=m=>{const O={...o.mount?a:i};return J(m)?O:He(m)?$(O,m):m.map(x=>$(O,x))},fe=(m,O)=>({invalid:!!$((O||r).errors,m),isDirty:!!$((O||r).dirtyFields,m),error:$((O||r).errors,m),isValidating:!!$(r.validatingFields,m),isTouched:!!$((O||r).touchedFields,m)}),te=m=>{m&&we(m).forEach(O=>le(r.errors,O)),l.state.next({errors:m?r.errors:{}})},K=(m,O,x)=>{const R=($(n,m,{_f:{}})._f||{}).ref,I=$(r.errors,m)||{},{ref:N,message:M,type:Y,...ue}=I;z(r.errors,m,{...ue,...O,ref:R}),l.state.next({name:m,errors:r.errors,isValid:!1}),x&&x.shouldFocus&&R&&R.focus&&R.focus()},he=(m,O)=>at(m)?l.values.subscribe({next:x=>m(j(void 0,O),x)}):j(m,O,!0),ae=(m,O={})=>{for(const x of m?we(m):s.mount)s.mount.delete(x),s.array.delete(x),O.keepValue||(le(n,x),le(a,x)),!O.keepError&&le(r.errors,x),!O.keepDirty&&le(r.dirtyFields,x),!O.keepTouched&&le(r.touchedFields,x),!O.keepIsValidating&&le(r.validatingFields,x),!t.shouldUnregister&&!O.keepDefaultValue&&le(i,x);l.values.next({values:{...a}}),l.state.next({...r,...O.keepDirty?{isDirty:D()}:{}}),!O.keepIsValid&&v()},Ee=({disabled:m,name:O,field:x,fields:R,value:I})=>{if(Ue(m)&&o.mount||!!m){const N=m?void 0:J(I)?on(x?x._f:$(R,O)._f):I;z(a,O,N),P(O,N,!1,!1,!0)}},Ae=(m,O={})=>{let x=$(n,m);const R=Ue(O.disabled);return z(n,m,{...x||{},_f:{...x&&x._f?x._f:{ref:{name:m}},name:m,mount:!0,...O}}),s.mount.add(m),x?Ee({field:x,disabled:O.disabled,name:m,value:O.value}):w(m,!0,O.value),{...R?{disabled:O.disabled}:{},...t.progressive?{required:!!O.required,min:Dt(O.min),max:Dt(O.max),minLength:Dt(O.minLength),maxLength:Dt(O.maxLength),pattern:Dt(O.pattern)}:{},name:m,onChange:pe,onBlur:pe,ref:I=>{if(I){Ae(m,O),x=$(n,m);const N=J(I.value)&&I.querySelectorAll&&I.querySelectorAll("input,select,textarea")[0]||I,M=Gu(N),Y=x._f.refs||[];if(M?Y.find(ue=>ue===N):N===x._f.ref)return;z(n,m,{_f:{...x._f,...M?{refs:[...Y.filter(an),N,...Array.isArray($(i,m))?[{}]:[]],ref:{type:N.type,name:m}}:{ref:N}}}),w(m,!1,void 0,N)}else x=$(n,m,{}),x._f&&(x._f.mount=!1),(t.shouldUnregister||O.shouldUnregister)&&!(no(s.array,m)&&o.action)&&s.unMount.add(m)}}},Re=()=>t.shouldFocusError&&_t(n,ee,s.mount),je=m=>{Ue(m)&&(l.state.next({disabled:m}),_t(n,(O,x)=>{const R=$(n,x);R&&(O.disabled=R._f.disabled||m,Array.isArray(R._f.refs)&&R._f.refs.forEach(I=>{I.disabled=R._f.disabled||m}))},0,!1))},U=(m,O)=>async x=>{let R;x&&(x.preventDefault&&x.preventDefault(),x.persist&&x.persist());let I=de(a);if(l.state.next({isSubmitting:!0}),t.resolver){const{errors:N,values:M}=await L();r.errors=N,I=M}else await k(n);if(le(r.errors,"root"),Oe(r.errors)){l.state.next({errors:{}});try{await m(I,x)}catch(N){R=N}}else O&&await O({...r.errors},x),Re(),setTimeout(Re);if(l.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Oe(r.errors)&&!R,submitCount:r.submitCount+1,errors:r.errors}),R)throw R},se=(m,O={})=>{$(n,m)&&(J(O.defaultValue)?G(m,de($(i,m))):(G(m,O.defaultValue),z(i,m,de(O.defaultValue))),O.keepTouched||le(r.touchedFields,m),O.keepDirty||(le(r.dirtyFields,m),r.isDirty=O.defaultValue?D(m,de($(i,m))):D()),O.keepError||(le(r.errors,m),c.isValid&&v()),l.state.next({...r}))},ne=(m,O={})=>{const x=m?de(m):i,R=de(x),I=Oe(m),N=I?i:R;if(O.keepDefaultValues||(i=x),!O.keepValues){if(O.keepDirtyValues)for(const M of s.mount)$(r.dirtyFields,M)?z(N,M,$(a,M)):G(M,$(N,M));else{if(jn&&J(m))for(const M of s.mount){const Y=$(n,M);if(Y&&Y._f){const ue=Array.isArray(Y._f.refs)?Y._f.refs[0]:Y._f.ref;if(br(ue)){const xe=ue.closest("form");if(xe){xe.reset();break}}}}n={}}a=e.shouldUnregister?O.keepDefaultValues?de(i):{}:de(N),l.array.next({values:{...N}}),l.values.next({values:{...N}})}s={mount:O.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!c.isValid||!!O.keepIsValid||!!O.keepDirtyValues,o.watch=!!e.shouldUnregister,l.state.next({submitCount:O.keepSubmitCount?r.submitCount:0,isDirty:I?!1:O.keepDirty?r.isDirty:!!(O.keepDefaultValues&&!pt(m,i)),isSubmitted:O.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:I?{}:O.keepDirtyValues?O.keepDefaultValues&&a?sr(i,a):r.dirtyFields:O.keepDefaultValues&&m?sr(i,m):O.keepDirty?r.dirtyFields:{},touchedFields:O.keepTouched?r.touchedFields:{},errors:O.keepErrors?r.errors:{},isSubmitSuccessful:O.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Se=(m,O)=>ne(at(m)?m(a):m,O);return{control:{register:Ae,unregister:ae,getFieldState:fe,handleSubmit:U,setError:K,_executeSchema:L,_getWatch:j,_getDirty:D,_updateValid:v,_removeUnmounted:W,_updateFieldArray:h,_updateDisabledField:Ee,_getFieldArray:V,_reset:ne,_resetDefaultValues:()=>at(t.defaultValues)&&t.defaultValues().then(m=>{Se(m,t.resetOptions),l.state.next({isLoading:!1})}),_updateFormState:m=>{r={...r,...m}},_disableForm:je,_subjects:l,_proxyFormState:c,_setErrors:A,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state(m){o=m},get _defaultValues(){return i},get _names(){return s},set _names(m){s=m},get _formState(){return r},set _formState(m){r=m},get _options(){return t},set _options(m){t={...t,...m}}},trigger:ce,register:Ae,handleSubmit:U,watch:he,setValue:G,getValues:oe,reset:Se,resetField:se,clearErrors:te,unregister:ae,setError:K,setFocus:(m,O={})=>{const x=$(n,m),R=x&&x._f;if(R){const I=R.refs?R.refs[0]:R.ref;I.focus&&(I.focus(),O.shouldSelect&&I.select())}},getFieldState:fe}}function Eo(e={}){const t=T.default.useRef(),r=T.default.useRef(),[n,i]=T.default.useState({isDirty:!1,isValidating:!1,isLoading:at(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:at(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Ju(e),formState:n});const a=t.current.control;return a._options=e,Ir({subject:a._subjects.state,next:o=>{uo(o,a._proxyFormState,a._updateFormState,!0)&&i({...a._formState})}}),T.default.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),T.default.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==n.isDirty&&a._subjects.state.next({isDirty:o})}},[a,n.isDirty]),T.default.useEffect(()=>{e.values&&!pt(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(o=>({...o}))):a._resetDefaultValues()},[e.values,a]),T.default.useEffect(()=>{e.errors&&a._setErrors(e.errors)},[e.errors,a]),T.default.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),T.default.useEffect(()=>{e.shouldUnregister&&a._subjects.values.next({values:a._getWatch()})},[e.shouldUnregister,a]),t.current.formState=so(n,a),t.current}var Zu=Object.freeze(Object.defineProperty({__proto__:null,Controller:ku,Form:Vu,FormProvider:oo,appendErrors:ho,get:$,set:z,useController:po,useFieldArray:Wu,useForm:Eo,useFormContext:Ye,useFormState:co,useWatch:go},Symbol.toStringTag,{value:"Module"})),xo=(e=>(e.FULL_PAGE="FULL_PAGE",e.MODAL="MODAL",e))(xo||{}),Po=(e=>(e.SIMPLE="SIMPLE",e.COMPLEX="COMPLEX",e.QUANTITY="QUANTITY",e))(Po||{}),Hn=(e=>(e.SELECT="selCtx",e.FILTER="fltCtx",e))(Hn||{}),Wn=(e=>(e.OPTIONS="3e/group/options",e.CONFIG="3e/group/config",e.PRODUCT="3e/product",e))(Wn||{}),Te=(e=>(e.OK="OK",e.TOO_MUCH="TOO_MUCH",e.NOT_ENOUGHT="NOT_ENOUGHT",e.IGNORE="IGNORE",e))(Te||{});const Xu=(e,t,r)=>{if(e==="selected"||e==="filter")return[];if(r[t]===e)return[r];let n=Ao(e,t,r.items);return n!=null&&n.length||(n=Co(e,t,r.items),n.length),n},Co=(e,t,r)=>{const n=el(r),i=Ao(e,t,n);return i!=null&&i.length?i:n!=null&&n.length?Co(e,t,n):[]},el=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)},Ao=(e,t,r)=>{let n=[];return Array.isArray(r)&&(n=r.filter(i=>{if(i&&i[t]===e)return!0})),n},tl=(e,t,r,n)=>{const i=Xu(t,r,n),a=rl(e,i).filter(o=>o!==null&&typeof o!="undefined");return a.length?a[0]:null},rl=(e,t)=>{let r=[];return Array.isArray(t)&&t.length&&(r=t.map(n=>nl(e,n))),r},nl=(e,t)=>{if(t.id===e)return t;let r=To(e,t.items);return r.length?(r.length>1&&console.error(`More than one ${e} in context ${t.id}`),r[0]):(r=_o(e,t.items),r.length?(r.length>1&&console.error(`More than one ${e} in context ${t.id}`),r[0]):null)},_o=(e,t)=>{const r=il(t),n=To(e,r);return n!=null&&n.length?n:r!=null&&r.length?_o(e,r):[]},il=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)},To=(e,t)=>Array.isArray(t)?t.filter(n=>{if(n&&n.id===e)return!0}):[],Gn=(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=tl(a,n,Hn.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},No=e=>{const{price:t,state:{selected:r}={}}=e;return(!t||parseFloat(t||"1")===0)&&r?`${Gn(r,e)||"0"}`:t};var al=typeof global=="object"&&global&&global.Object===Object&&global,$o=al,ol=typeof self=="object"&&self&&self.Object===Object&&self,sl=$o||ol||Function("return this")(),ze=sl,ul=ze.Symbol,ct=ul,Io=Object.prototype,ll=Io.hasOwnProperty,cl=Io.toString,Mt=ct?ct.toStringTag:void 0;function fl(e){var t=ll.call(e,Mt),r=e[Mt];try{e[Mt]=void 0;var n=!0}catch{}var i=cl.call(e);return n&&(t?e[Mt]=r:delete e[Mt]),i}var dl=Object.prototype,gl=dl.toString;function pl(e){return gl.call(e)}var hl="[object Null]",ml="[object Undefined]",Fi=ct?ct.toStringTag:void 0;function It(e){return e==null?e===void 0?ml:hl:Fi&&Fi in Object(e)?fl(e):pl(e)}function ft(e){return e!=null&&typeof e=="object"}var vl="[object Symbol]";function yl(e){return typeof e=="symbol"||ft(e)&&It(e)==vl}var bl=Array.isArray,Tt=bl,Sl=/\s/;function Ol(e){for(var t=e.length;t--&&Sl.test(e.charAt(t)););return t}var wl=/^\s+/;function El(e){return e&&e.slice(0,Ol(e)+1).replace(wl,"")}function vt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Di=0/0,xl=/^[-+]0x[0-9a-f]+$/i,Pl=/^0b[01]+$/i,Cl=/^0o[0-7]+$/i,Al=parseInt;function Lo(e){if(typeof e=="number")return e;if(yl(e))return Di;if(vt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=vt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=El(e);var r=Pl.test(e);return r||Cl.test(e)?Al(e.slice(2),r?2:8):xl.test(e)?Di:+e}var Mi=1/0,_l=17976931348623157e292;function ki(e){if(!e)return e===0?e:0;if(e=Lo(e),e===Mi||e===-Mi){var t=e<0?-1:1;return t*_l}return e===e?e:0}var Tl="[object AsyncFunction]",Nl="[object Function]",$l="[object GeneratorFunction]",Il="[object Proxy]";function Ro(e){if(!vt(e))return!1;var t=It(e);return t==Nl||t==$l||t==Tl||t==Il}var Ll=ze["__core-js_shared__"],sn=Ll,ji=function(){var e=/[^.]+$/.exec(sn&&sn.keys&&sn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Rl(e){return!!ji&&ji in e}var Fl=Function.prototype,Dl=Fl.toString;function bt(e){if(e!=null){try{return Dl.call(e)}catch{}try{return e+""}catch{}}return""}var Ml=/[\\^$.*+?()[\]{}|]/g,kl=/^\[object .+?Constructor\]$/,jl=Function.prototype,Vl=Object.prototype,Ul=jl.toString,Bl=Vl.hasOwnProperty,Hl=RegExp("^"+Ul.call(Bl).replace(Ml,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Wl(e){if(!vt(e)||Rl(e))return!1;var t=Ro(e)?Hl:kl;return t.test(bt(e))}function Gl(e,t){return e==null?void 0:e[t]}function St(e,t){var r=Gl(e,t);return Wl(r)?r:void 0}var Kl=St(ze,"WeakMap"),wn=Kl,Vi=Object.create,Yl=function(){function e(){}return function(t){if(!vt(t))return{};if(Vi)return Vi(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),zl=Yl;function Ql(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var ql=function(){try{var e=St(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Ui=ql;function Jl(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,Xl=/^(?:0|[1-9]\d*)$/;function ec(e,t){var r=typeof e;return t=t==null?Zl:t,!!t&&(r=="number"||r!="symbol"&&Xl.test(e))&&e>-1&&e%1==0&&e<t}function Fo(e,t,r){t=="__proto__"&&Ui?Ui(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Kn(e,t){return e===t||e!==e&&t!==t}var tc=Object.prototype,rc=tc.hasOwnProperty;function Do(e,t,r){var n=e[t];(!(rc.call(e,t)&&Kn(n,r))||r===void 0&&!(t in e))&&Fo(e,t,r)}function Lr(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?Fo(r,s,u):Do(r,s,u)}return r}var nc=9007199254740991;function Mo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=nc}function Yn(e){return e!=null&&Mo(e.length)&&!Ro(e)}var ic=Object.prototype;function Rr(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ic;return e===r}function ac(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var oc="[object Arguments]";function Bi(e){return ft(e)&&It(e)==oc}var ko=Object.prototype,sc=ko.hasOwnProperty,uc=ko.propertyIsEnumerable,lc=Bi(function(){return arguments}())?Bi:function(e){return ft(e)&&sc.call(e,"callee")&&!uc.call(e,"callee")},jo=lc;function cc(){return!1}var Vo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hi=Vo&&typeof module=="object"&&module&&!module.nodeType&&module,fc=Hi&&Hi.exports===Vo,Wi=fc?ze.Buffer:void 0,dc=Wi?Wi.isBuffer:void 0,gc=dc||cc,Qt=gc,pc="[object Arguments]",hc="[object Array]",mc="[object Boolean]",vc="[object Date]",yc="[object Error]",bc="[object Function]",Sc="[object Map]",Oc="[object Number]",wc="[object Object]",Ec="[object RegExp]",xc="[object Set]",Pc="[object String]",Cc="[object WeakMap]",Ac="[object ArrayBuffer]",_c="[object DataView]",Tc="[object Float32Array]",Nc="[object Float64Array]",$c="[object Int8Array]",Ic="[object Int16Array]",Lc="[object Int32Array]",Rc="[object Uint8Array]",Fc="[object Uint8ClampedArray]",Dc="[object Uint16Array]",Mc="[object Uint32Array]",X={};X[Tc]=X[Nc]=X[$c]=X[Ic]=X[Lc]=X[Rc]=X[Fc]=X[Dc]=X[Mc]=!0;X[pc]=X[hc]=X[Ac]=X[mc]=X[_c]=X[vc]=X[yc]=X[bc]=X[Sc]=X[Oc]=X[wc]=X[Ec]=X[xc]=X[Pc]=X[Cc]=!1;function kc(e){return ft(e)&&Mo(e.length)&&!!X[It(e)]}function zn(e){return function(t){return e(t)}}var Uo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Yt=Uo&&typeof module=="object"&&module&&!module.nodeType&&module,jc=Yt&&Yt.exports===Uo,un=jc&&$o.process,Vc=function(){try{var e=Yt&&Yt.require&&Yt.require("util").types;return e||un&&un.binding&&un.binding("util")}catch{}}(),Nt=Vc,Gi=Nt&&Nt.isTypedArray,Uc=Gi?zn(Gi):kc,Qn=Uc,Bc=Object.prototype,Hc=Bc.hasOwnProperty;function Bo(e,t){var r=Tt(e),n=!r&&jo(e),i=!r&&!n&&Qt(e),a=!r&&!n&&!i&&Qn(e),o=r||n||i||a,s=o?ac(e.length,String):[],u=s.length;for(var f in e)(t||Hc.call(e,f))&&!(o&&(f=="length"||i&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||ec(f,u)))&&s.push(f);return s}function Ho(e,t){return function(r){return e(t(r))}}var Wc=Ho(Object.keys,Object),Gc=Wc,Kc=Object.prototype,Yc=Kc.hasOwnProperty;function Wo(e){if(!Rr(e))return Gc(e);var t=[];for(var r in Object(e))Yc.call(e,r)&&r!="constructor"&&t.push(r);return t}function qn(e){return Yn(e)?Bo(e):Wo(e)}function zc(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Qc=Object.prototype,qc=Qc.hasOwnProperty;function Jc(e){if(!vt(e))return zc(e);var t=Rr(e),r=[];for(var n in e)n=="constructor"&&(t||!qc.call(e,n))||r.push(n);return r}function Jn(e){return Yn(e)?Bo(e,!0):Jc(e)}var Zc=St(Object,"create"),qt=Zc;function Xc(){this.__data__=qt?qt(null):{},this.size=0}function ef(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var tf="__lodash_hash_undefined__",rf=Object.prototype,nf=rf.hasOwnProperty;function af(e){var t=this.__data__;if(qt){var r=t[e];return r===tf?void 0:r}return nf.call(t,e)?t[e]:void 0}var of=Object.prototype,sf=of.hasOwnProperty;function uf(e){var t=this.__data__;return qt?t[e]!==void 0:sf.call(t,e)}var lf="__lodash_hash_undefined__";function cf(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=qt&&t===void 0?lf:t,this}function yt(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])}}yt.prototype.clear=Xc;yt.prototype.delete=ef;yt.prototype.get=af;yt.prototype.has=uf;yt.prototype.set=cf;function ff(){this.__data__=[],this.size=0}function Fr(e,t){for(var r=e.length;r--;)if(Kn(e[r][0],t))return r;return-1}var df=Array.prototype,gf=df.splice;function pf(e){var t=this.__data__,r=Fr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():gf.call(t,r,1),--this.size,!0}function hf(e){var t=this.__data__,r=Fr(t,e);return r<0?void 0:t[r][1]}function mf(e){return Fr(this.__data__,e)>-1}function vf(e,t){var r=this.__data__,n=Fr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function et(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])}}et.prototype.clear=ff;et.prototype.delete=pf;et.prototype.get=hf;et.prototype.has=mf;et.prototype.set=vf;var yf=St(ze,"Map"),Jt=yf;function bf(){this.size=0,this.__data__={hash:new yt,map:new(Jt||et),string:new yt}}function Sf(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Dr(e,t){var r=e.__data__;return Sf(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Of(e){var t=Dr(this,e).delete(e);return this.size-=t?1:0,t}function wf(e){return Dr(this,e).get(e)}function Ef(e){return Dr(this,e).has(e)}function xf(e,t){var r=Dr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Ot(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])}}Ot.prototype.clear=bf;Ot.prototype.delete=Of;Ot.prototype.get=wf;Ot.prototype.has=Ef;Ot.prototype.set=xf;function Go(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Pf=Ho(Object.getPrototypeOf,Object),Ko=Pf;function Cf(){this.__data__=new et,this.size=0}function Af(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function _f(e){return this.__data__.get(e)}function Tf(e){return this.__data__.has(e)}var Nf=200;function $f(e,t){var r=this.__data__;if(r instanceof et){var n=r.__data__;if(!Jt||n.length<Nf-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ot(n)}return r.set(e,t),this.size=r.size,this}function qe(e){var t=this.__data__=new et(e);this.size=t.size}qe.prototype.clear=Cf;qe.prototype.delete=Af;qe.prototype.get=_f;qe.prototype.has=Tf;qe.prototype.set=$f;function If(e,t){return e&&Lr(t,qn(t),e)}function Lf(e,t){return e&&Lr(t,Jn(t),e)}var Yo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ki=Yo&&typeof module=="object"&&module&&!module.nodeType&&module,Rf=Ki&&Ki.exports===Yo,Yi=Rf?ze.Buffer:void 0,zi=Yi?Yi.allocUnsafe:void 0;function Ff(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 Df(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 zo(){return[]}var Mf=Object.prototype,kf=Mf.propertyIsEnumerable,Qi=Object.getOwnPropertySymbols,jf=Qi?function(e){return e==null?[]:(e=Object(e),Df(Qi(e),function(t){return kf.call(e,t)}))}:zo,Zn=jf;function Vf(e,t){return Lr(e,Zn(e),t)}var Uf=Object.getOwnPropertySymbols,Bf=Uf?function(e){for(var t=[];e;)Go(t,Zn(e)),e=Ko(e);return t}:zo,Qo=Bf;function Hf(e,t){return Lr(e,Qo(e),t)}function qo(e,t,r){var n=t(e);return Tt(e)?n:Go(n,r(e))}function En(e){return qo(e,qn,Zn)}function Wf(e){return qo(e,Jn,Qo)}var Gf=St(ze,"DataView"),xn=Gf,Kf=St(ze,"Promise"),Pn=Kf,Yf=St(ze,"Set"),Cn=Yf,qi="[object Map]",zf="[object Object]",Ji="[object Promise]",Zi="[object Set]",Xi="[object WeakMap]",ea="[object DataView]",Qf=bt(xn),qf=bt(Jt),Jf=bt(Pn),Zf=bt(Cn),Xf=bt(wn),dt=It;(xn&&dt(new xn(new ArrayBuffer(1)))!=ea||Jt&&dt(new Jt)!=qi||Pn&&dt(Pn.resolve())!=Ji||Cn&&dt(new Cn)!=Zi||wn&&dt(new wn)!=Xi)&&(dt=function(e){var t=It(e),r=t==zf?e.constructor:void 0,n=r?bt(r):"";if(n)switch(n){case Qf:return ea;case qf:return qi;case Jf:return Ji;case Zf:return Zi;case Xf:return Xi}return t});var $t=dt,ed=Object.prototype,td=ed.hasOwnProperty;function rd(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&td.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var nd=ze.Uint8Array,Er=nd;function Xn(e){var t=new e.constructor(e.byteLength);return new Er(t).set(new Er(e)),t}function id(e,t){var r=t?Xn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var ad=/\w*$/;function od(e){var t=new e.constructor(e.source,ad.exec(e));return t.lastIndex=e.lastIndex,t}var ta=ct?ct.prototype:void 0,ra=ta?ta.valueOf:void 0;function sd(e){return ra?Object(ra.call(e)):{}}function ud(e,t){var r=t?Xn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var ld="[object Boolean]",cd="[object Date]",fd="[object Map]",dd="[object Number]",gd="[object RegExp]",pd="[object Set]",hd="[object String]",md="[object Symbol]",vd="[object ArrayBuffer]",yd="[object DataView]",bd="[object Float32Array]",Sd="[object Float64Array]",Od="[object Int8Array]",wd="[object Int16Array]",Ed="[object Int32Array]",xd="[object Uint8Array]",Pd="[object Uint8ClampedArray]",Cd="[object Uint16Array]",Ad="[object Uint32Array]";function _d(e,t,r){var n=e.constructor;switch(t){case vd:return Xn(e);case ld:case cd:return new n(+e);case yd:return id(e,r);case bd:case Sd:case Od:case wd:case Ed:case xd:case Pd:case Cd:case Ad:return ud(e,r);case fd:return new n;case dd:case hd:return new n(e);case gd:return od(e);case pd:return new n;case md:return sd(e)}}function Td(e){return typeof e.constructor=="function"&&!Rr(e)?zl(Ko(e)):{}}var Nd="[object Map]";function $d(e){return ft(e)&&$t(e)==Nd}var na=Nt&&Nt.isMap,Id=na?zn(na):$d,Ld=Id,Rd="[object Set]";function Fd(e){return ft(e)&&$t(e)==Rd}var ia=Nt&&Nt.isSet,Dd=ia?zn(ia):Fd,Md=Dd,kd=1,jd=2,Vd=4,Jo="[object Arguments]",Ud="[object Array]",Bd="[object Boolean]",Hd="[object Date]",Wd="[object Error]",Zo="[object Function]",Gd="[object GeneratorFunction]",Kd="[object Map]",Yd="[object Number]",Xo="[object Object]",zd="[object RegExp]",Qd="[object Set]",qd="[object String]",Jd="[object Symbol]",Zd="[object WeakMap]",Xd="[object ArrayBuffer]",eg="[object DataView]",tg="[object Float32Array]",rg="[object Float64Array]",ng="[object Int8Array]",ig="[object Int16Array]",ag="[object Int32Array]",og="[object Uint8Array]",sg="[object Uint8ClampedArray]",ug="[object Uint16Array]",lg="[object Uint32Array]",q={};q[Jo]=q[Ud]=q[Xd]=q[eg]=q[Bd]=q[Hd]=q[tg]=q[rg]=q[ng]=q[ig]=q[ag]=q[Kd]=q[Yd]=q[Xo]=q[zd]=q[Qd]=q[qd]=q[Jd]=q[og]=q[sg]=q[ug]=q[lg]=!0;q[Wd]=q[Zo]=q[Zd]=!1;function gr(e,t,r,n,i,a){var o,s=t&kd,u=t&jd,f=t&Vd;if(r&&(o=i?r(e,n,i,a):r(e)),o!==void 0)return o;if(!vt(e))return e;var c=Tt(e);if(c){if(o=rd(e),!s)return Ql(e,o)}else{var l=$t(e),d=l==Zo||l==Gd;if(Qt(e))return Ff(e,s);if(l==Xo||l==Jo||d&&!i){if(o=u||d?{}:Td(e),!s)return u?Hf(e,Lf(o,e)):Vf(e,If(o,e))}else{if(!q[l])return i?e:{};o=_d(e,l,s)}}a||(a=new qe);var g=a.get(e);if(g)return g;a.set(e,o),Md(e)?e.forEach(function(v){o.add(gr(v,t,r,v,e,a))}):Ld(e)&&e.forEach(function(v,b){o.set(b,gr(v,t,r,b,e,a))});var p=f?u?Wf:En:u?Jn:qn,y=c?void 0:p(e);return Jl(y||e,function(v,b){y&&(b=v,v=e[b]),Do(o,b,gr(v,t,r,b,e,a))}),o}var cg=1,fg=4;function es(e){return gr(e,cg|fg)}var dg="__lodash_hash_undefined__";function gg(e){return this.__data__.set(e,dg),this}function pg(e){return this.__data__.has(e)}function xr(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Ot;++t<r;)this.add(e[t])}xr.prototype.add=xr.prototype.push=gg;xr.prototype.has=pg;function hg(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 mg(e,t){return e.has(t)}var vg=1,yg=2;function ts(e,t,r,n,i,a){var o=r&vg,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var f=a.get(e),c=a.get(t);if(f&&c)return f==t&&c==e;var l=-1,d=!0,g=r&yg?new xr:void 0;for(a.set(e,t),a.set(t,e);++l<s;){var p=e[l],y=t[l];if(n)var v=o?n(y,p,l,t,e,a):n(p,y,l,e,t,a);if(v!==void 0){if(v)continue;d=!1;break}if(g){if(!hg(t,function(b,h){if(!mg(g,h)&&(p===b||i(p,b,r,n,a)))return g.push(h)})){d=!1;break}}else if(!(p===y||i(p,y,r,n,a))){d=!1;break}}return a.delete(e),a.delete(t),d}function bg(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Sg(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Og=1,wg=2,Eg="[object Boolean]",xg="[object Date]",Pg="[object Error]",Cg="[object Map]",Ag="[object Number]",_g="[object RegExp]",Tg="[object Set]",Ng="[object String]",$g="[object Symbol]",Ig="[object ArrayBuffer]",Lg="[object DataView]",aa=ct?ct.prototype:void 0,ln=aa?aa.valueOf:void 0;function Rg(e,t,r,n,i,a,o){switch(r){case Lg:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ig:return!(e.byteLength!=t.byteLength||!a(new Er(e),new Er(t)));case Eg:case xg:case Ag:return Kn(+e,+t);case Pg:return e.name==t.name&&e.message==t.message;case _g:case Ng:return e==t+"";case Cg:var s=bg;case Tg:var u=n&Og;if(s||(s=Sg),e.size!=t.size&&!u)return!1;var f=o.get(e);if(f)return f==t;n|=wg,o.set(e,t);var c=ts(s(e),s(t),n,i,a,o);return o.delete(e),c;case $g:if(ln)return ln.call(e)==ln.call(t)}return!1}var Fg=1,Dg=Object.prototype,Mg=Dg.hasOwnProperty;function kg(e,t,r,n,i,a){var o=r&Fg,s=En(e),u=s.length,f=En(t),c=f.length;if(u!=c&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:Mg.call(t,d)))return!1}var g=a.get(e),p=a.get(t);if(g&&p)return g==t&&p==e;var y=!0;a.set(e,t),a.set(t,e);for(var v=o;++l<u;){d=s[l];var b=e[d],h=t[d];if(n)var E=o?n(h,b,d,t,e,a):n(b,h,d,e,t,a);if(!(E===void 0?b===h||i(b,h,r,n,a):E)){y=!1;break}v||(v=d=="constructor")}if(y&&!v){var A=e.constructor,w=t.constructor;A!=w&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof w=="function"&&w instanceof w)&&(y=!1)}return a.delete(e),a.delete(t),y}var jg=1,oa="[object Arguments]",sa="[object Array]",ur="[object Object]",Vg=Object.prototype,ua=Vg.hasOwnProperty;function Ug(e,t,r,n,i,a){var o=Tt(e),s=Tt(t),u=o?sa:$t(e),f=s?sa:$t(t);u=u==oa?ur:u,f=f==oa?ur:f;var c=u==ur,l=f==ur,d=u==f;if(d&&Qt(e)){if(!Qt(t))return!1;o=!0,c=!1}if(d&&!c)return a||(a=new qe),o||Qn(e)?ts(e,t,r,n,i,a):Rg(e,t,u,r,n,i,a);if(!(r&jg)){var g=c&&ua.call(e,"__wrapped__"),p=l&&ua.call(t,"__wrapped__");if(g||p){var y=g?e.value():e,v=p?t.value():t;return a||(a=new qe),i(y,v,r,n,a)}}return d?(a||(a=new qe),kg(e,t,r,n,i,a)):!1}function rs(e,t,r,n,i){return e===t?!0:e==null||t==null||!ft(e)&&!ft(t)?e!==e&&t!==t:Ug(e,t,r,n,rs,i)}var Bg=Math.max,Hg=Math.min;function Wg(e,t,r){return e>=Hg(t,r)&&e<Bg(t,r)}function la(e,t,r){return t=ki(t),r===void 0?(r=t,t=0):r=ki(r),e=Lo(e),Wg(e,t,r)}var Gg="[object Map]",Kg="[object Set]",Yg=Object.prototype,zg=Yg.hasOwnProperty;function Me(e){if(e==null)return!0;if(Yn(e)&&(Tt(e)||typeof e=="string"||typeof e.splice=="function"||Qt(e)||Qn(e)||jo(e)))return!e.length;var t=$t(e);if(t==Gg||t==Kg)return!e.size;if(Rr(e))return!Wo(e).length;for(var r in e)if(zg.call(e,r))return!1;return!0}function Qg(e,t){return rs(e,t)}const qg=["id","selCtx","fltCtx"],ns=".",is="#dot",as="#FIX_NUMBER",Jg=e=>ss(es(e),ep),Zg=e=>{const t=e.replaceAll(ns,is);return/^\d+$/.test(t)?`${as}${t}`:t},Xg=e=>e.replaceAll(is,ns).replaceAll(as,""),ep=(e,t)=>os(e,t,Zg),tp=(e,t)=>os(e,t,Xg),os=(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 f=a[s];typeof a[s]=="object"&&a[s]!==null&&(f=i(a[s])),o[u]=f}return o}return qg.includes(e)&&(typeof t=="string"||t instanceof String)&&(n=r(t)),(e==="selected"||e==="filter")&&(n=i(t)),n},ss=(e,t)=>(Object.keys(e).forEach(r=>{const n=e[r];e[r]=t(r,n),typeof n=="object"&&n!==null&&ss(n,t)}),e),us=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},rp=e=>tp("selected",e);var ca;(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"})(ca||(ca={}));var fa;(function(e){e.CAROUSEL="carousel",e.NORMAL="normal",e.IMAGE="image"})(fa||(fa={}));var Je;(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.STATIC="3e/static",e.REF="3e/ref",e.QUERY="3e/query",e.CMS="3e/cms"})(Je||(Je={}));var da;(function(e){e.GROUP="group",e.PRODUCT="product"})(da||(da={}));var ga;(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"})(ga||(ga={}));var pa;(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"})(pa||(pa={}));var ha;(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"})(ha||(ha={}));var ma;(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"})(ma||(ma={}));var va;(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"})(va||(va={}));var ya;(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"})(ya||(ya={}));var ba;(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"})(ba||(ba={}));var Sa;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(Sa||(Sa={}));var Oa;(function(e){e.GROUP="group",e.PRODUCT="product"})(Oa||(Oa={}));var wa;(function(e){e.ORDER_EVENT_ERROR="OrderEventError",e.ORDER_APPLIED_EVENTS="OrderAppliedEvents",e.ORDER_EVENT_FISCAL="OrderEventFiscal",e.ORDER_UPSELL="OrderUpsell"})(wa||(wa={}));const np=e=>e==="true"||e===!0,ip=e=>{const t=document.getElementById(e);t?t.scrollIntoView({behavior:"smooth"}):console.warn(`Error: scrollToId: id: ${e} not found in html structure`)},ls=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)||""},Ea=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===Je.OPTIONS)return i;if(i.items&&i.items.length>0){const a=fs(e,i);if(a)return a}}return null}function ap(e){let t;const r=new Set,n=(f,c)=>{const l=typeof f=="function"?f(t):f;if(l!==t){const d=t;t=c?l:Object.assign({},t,l),r.forEach(g=>g(t,d))}},i=()=>t,a=(f,c=i,l=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let d=c(t);function g(){const p=c(t);if(!l(d,p)){const y=d;f(d=p,y)}}return r.add(g),()=>r.delete(g)},u={setState:n,getState:i,subscribe:(f,c,l)=>c||l?a(f,c,l):(r.add(f),()=>r.delete(f)),destroy:()=>r.clear()};return t=e(n,i,u),u}const op=typeof window=="undefined"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),xa=op?S.useEffect:S.useLayoutEffect;function sp(e){const t=typeof e=="function"?ap(e):e,r=(n=t.getState,i=Object.is)=>{const[,a]=S.useReducer(v=>v+1,0),o=t.getState(),s=S.useRef(o),u=S.useRef(n),f=S.useRef(i),c=S.useRef(!1),l=S.useRef();l.current===void 0&&(l.current=n(o));let d,g=!1;(s.current!==o||u.current!==n||f.current!==i||c.current)&&(d=n(o),g=!i(l.current,d)),xa(()=>{g&&(l.current=d),s.current=o,u.current=n,f.current=i,c.current=!1});const p=S.useRef(o);xa(()=>{const v=()=>{try{const h=t.getState(),E=u.current(h);f.current(l.current,E)||(s.current=h,l.current=E,a())}catch{c.current=!0,a()}},b=t.subscribe(v);return t.getState()!==p.current&&v(),b},[]);const y=g?d:l.current;return S.useDebugValue(y),y};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 up=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}}}))}}),lp=(e,t)=>Pr(e,t,"isSelCntAllowedToIncrement")&&Pr(e,t,"isQtyCntAllowedToIncrement")&&An(e,t,"isQtyCntAllowedToIncrement")&&An(e,t,"isQtyCntAllowedToIncrement"),cp=(e,t,r)=>{var a;const{selCtx:n}=e;return((a=r==null?void 0:r[n])==null?void 0:a.parentKind)===Wn.PRODUCT?Pa(e,t)&&Pr(e,r,"isQtyCntAllowedToIncrement"):Pa(e,t)&&Pr(e,r,"isQtyCntAllowedToIncrement")&&An(e,r,"isQtyCntAllowedToIncrement")},Pa=(e,t)=>{const{qtyMax:r}=e;return Number(t)<Number(r||Number.MAX_SAFE_INTEGER)},Pr=(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",fp=(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]},dp=(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)},gp=(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:f,parentKind:c}=r,{qtyMin:l,qtyMax:d,selMin:g,selMax:p}=i||{};(d||p)&&e(({validationMap:v})=>({validationMap:{...v,[n]:{parentSelCtx:f,isSelCntAllowedToIncrement:a<Number(p||Number.MAX_SAFE_INTEGER),isQtyCntAllowedToIncrement:o<Number(d||Number.MAX_SAFE_INTEGER),parentKind:c,nestedLvl:u,isValid:la(a,Number(g||0),Number(p||Number.MAX_SAFE_INTEGER)+1)&&la(o,Number(l||0),Number(d||Number.MAX_SAFE_INTEGER)+1),isPassedFiltering:s}}}))},isInputEnabled:r=>{const n=t().validationMap;return lp(r,n)},isInputCounterIncrementEnabled:(r,n)=>{const i=t().validationMap,a=dp(r,n);return cp(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}`}))}}),pp=(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=sp((e,t)=>({...up(e),...gp(e,t),...pp(e,t)}));function gs(e,t){if(!t)return null;for(const r of t){if(r.id===e)return r;if(r.items){const n=gs(e,r.items);if(n)return n}}return null}function hp(e,t){return gs(e,t)!==null}function mp(e,t){if(t==null||Me(t))return{};try{const r=es(t);for(const[n,i]of Object.entries(r))i&&typeof i=="object"&&!Array.isArray(i)&&Object.keys(i).forEach(a=>{hp(a,e.items)||(console.warn(`deleting selected selCtx ${n} id ${a}, not found in product`),delete r[n][a])});return us(r)}catch(r){return console.error(r),t}}function vp(e){var b;const[t,r]=S.useState(Number(e.quantity)||1),n=Jg(e),{state:{filter:i={}}={}}=n,a=mp(n,(b=n.state)==null?void 0:b.selected),o=ie(h=>h.setInitialFilter),s=ie(h=>h.setInitialSelected),u=ie(h=>h.setInitialValidate),f=ie(h=>h.resetExpanded),c=ie(h=>h.filter),l=ie(h=>h.setCurrency),d=ie(h=>h.setIsOnSubmittedOnTrue);ie(h=>h.refreshFormDt);const g=ie(h=>h.getInvalidSelCtxArray),p=ie(h=>h.getValidationMap),y=()=>{r(h=>h+1)},v=()=>{t>1&&r(h=>h-1)};return S.useEffect(()=>{u(),o(i),s(a),f()},[e]),{encodedProduct:n,initSelected:a,initFilter:i,filter:c,setCurrency:l,setIsOnSubmittedOnTrue:d,getInvalidSelCtxArray:g,productQuantity:t,getValidationMap:p,increaseProductQuantity:y,decreaseProductQuantity:v}}const ei=(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 f;const u=(f=Object.keys((r==null?void 0:r[s])||{}))==null?void 0:f.filter(c=>{var l;if(((l=r==null?void 0:r[s])==null?void 0:l[c])===(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&&!Me(n)&&s.forEach(u=>{const{items:f=[]}=u;t?i.push(u):a.push(u),f.length>0&&o(f)})};return o(r),{productsToSelect:i,productsToUnselect:a}},yp=(e,t)=>{console.log("LOG1 productsToUnselect",e),e.map(({selCtx:r,id:n})=>{t(`selected.${r}.${n}`,!1)})},hs=(e,t,r)=>{console.log("LOG1 productToSelect",e),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 ms(e,t,r,n){const{selCtx:i,attrs:a={}}=e,o=ie(b=>b.initialSelected),s=ie(b=>b.currency),{setValue:u,getValues:f}=Ye(),{selected:c={},filter:l={}}=f(),d=ei(e,l),g=ie(b=>b.isOnSubmitted),p=ie(b=>b.setValidationMap),[y,v]=fp(e.selCtx,c,e.items);return p({productSelCtx:i,attrs:a,actualQtyCnt:v,actualSelCnt:y,nestedLvl:t,isPassedFiltering:d,parentSelCtx:n,parentKind:r}),S.useEffect(()=>{const{productsToSelect:b,productsToUnselect:h}=ps(e,d);hs(b,u,o)},[d]),{isFilterValidated:d,selected:c,isOnSubmitted:g,selCnt:y,qtyCnt:v,currency:s}}var Mr={exports:{}},kr={};/**
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var S=require("react"),fi=require("react-spring"),tu=require("react-dom");function ru(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}function nu(e){if(e&&e.__esModule)return e;var t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var T=ru(S),st=nu(S);function De(e){return De=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},De(e)}function $e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iu(e,t){if(De(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(De(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qa(e){var t=iu(e,"string");return De(t)=="symbol"?t:t+""}function di(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,Qa(n.key),n)}}function Ie(e,t,r){return t&&di(e.prototype,t),r&&di(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ut(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sn(e,t){return Sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Sn(e,t)}function $r(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&&Sn(e,t)}function Xt(e,t){if(t&&(De(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ut(e)}function We(e){return We=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},We(e)}function Ke(e,t,r){return(t=Qa(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qa(e){if(Array.isArray(e))return e}function au(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gi(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 Ja(e,t){if(e){if(typeof e=="string")return gi(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)?gi(e,t):void 0}}function Za(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ou(e){return qa(e)||au(e)||Ja(e)||Za()}function pi(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 hi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pi(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var su={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)}},uu=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};$e(this,e),this.init(t,r)}return Ie(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||su,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,hi(hi({},{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}(),Be=new uu,lt=function(){function e(){$e(this,e),this.observers={}}return Ie(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 Ft(){var e,t,r=new Promise(function(n,i){e=n,t=i});return r.resolve=e,r.reject=t,r}function mi(e){return e==null?"":""+e}function lu(e,t,r){e.forEach(function(n){t[n]&&(r[n]=t[n])})}function jn(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 vi(e,t,r){var n=jn(e,t,Object),i=n.obj,a=n.k;i[a]=r}function cu(e,t,r,n){var i=jn(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 vr(e,t){var r=jn(e,t),n=r.obj,i=r.k;if(!!n)return n[i]}function yi(e,t,r){var n=vr(e,r);return n!==void 0?n:vr(t,r)}function Xa(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]):Xa(e[n],t[n],r):e[n]=t[n]);return e}function xt(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var fu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function du(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return fu[t]}):e}var Ir=typeof window!="undefined"&&window.navigator&&typeof window.navigator.userAgentData=="undefined"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,gu=[" ",",","?","!",";"];function pu(e,t,r){t=t||"",r=r||"";var n=gu.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 bi(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 or(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bi(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hu(e){var t=mu();return function(){var n=We(e),i;if(t){var a=We(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Xt(this,i)}}function mu(){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 eo(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?eo(u,c,r):void 0}i=i[n[a]]}return i}}var vu=function(e){$r(r,e);var t=hu(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),Ir&&lt.call(ut(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 Ie(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,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 l=vr(this.data,f);return l||!c||typeof o!="string"?l:eo(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 f=[i,a];o&&(f=f.concat(c?o.split(c):o)),i.indexOf(".")>-1&&(f=i.split("."),s=a,a=f[1]),this.addNamespaces(a),vi(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 c=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 l=vr(this.data,f)||{};s?Xa(l,o,u):l=or(or({},l),o),vi(this.data,f,l),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"?or(or({},{}),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}(lt),to={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 Si(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 Se(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Si(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Si(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yu(e){var t=bu();return function(){var n=We(e),i;if(t){var a=We(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Xt(this,i)}}function bu(){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 Oi={},wi=function(e){$r(r,e);var t=yu(r);function r(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return $e(this,r),i=t.call(this),Ir&&lt.call(ut(i)),lu(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,ut(i)),i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Be.create("translator"),i}return Ie(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,f=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!pu(i,o,s);if(c&&!f){var l=i.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:i,namespaces:u};var d=i.split(o);(o!==s||o===s&&this.options.ns.indexOf(d[0])>-1)&&(u=d.shift()),i=d.join(s)}return typeof u=="string"&&(u=[u]),{key:i,namespaces:u}}},{key:"translate",value:function(i,a,o){var s=this;if(De(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,f=this.extractFromKey(i[i.length-1],a),l=f.key,d=f.namespaces,g=d[d.length-1],p=a.lng||this.language,b=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&p.toLowerCase()==="cimode"){if(b){var v=a.nsSeparator||this.options.nsSeparator;return u?(y.res="".concat(g).concat(v).concat(l),y):"".concat(g).concat(v).concat(l)}return u?(y.res=l,y):l}var y=this.resolve(i,a),h=y&&y.res,E=y&&y.usedKey||l,A=y&&y.exactUsedKey||l,w=Object.prototype.toString.apply(h),P=["[object Number]","[object Function]","[object RegExp]"],_=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,I=!this.i18nFormat||this.i18nFormat.handleAsObject,F=typeof h!="string"&&typeof h!="boolean"&&typeof h!="number";if(I&&h&&F&&P.indexOf(w)<0&&!(typeof _=="string"&&w==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var k=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,h,Se(Se({},a),{},{ns:d})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return u?(y.res=k,y):k}if(c){var W=w==="[object Array]",D=W?[]:{},j=W?A:E;for(var U in h)if(Object.prototype.hasOwnProperty.call(h,U)){var B="".concat(j).concat(c).concat(U);D[U]=this.translate(B,Se(Se({},a),{joinArrays:!1,ns:d})),D[U]===B&&(D[U]=h[U])}h=D}}else if(I&&typeof _=="string"&&w==="[object Array]")h=h.join(_),h&&(h=this.extendTranslation(h,i,a,o));else{var q=!1,G=!1,pe=a.count!==void 0&&typeof a.count!="string",he=r.hasDefaultValue(a),X=pe?this.pluralResolver.getSuffix(p,a.count,a):"",ce=a["defaultValue".concat(X)]||a.defaultValue;!this.isValidLookup(h)&&he&&(q=!0,h=ce),this.isValidLookup(h)||(G=!0,h=l);var fe=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,xe=fe&&G?void 0:h,K=he&&ce!==h&&this.options.updateMissing;if(G||q||K){if(this.logger.log(K?"updateKey":"missingKey",p,g,l,K?ce:h),c){var se=this.resolve(l,Se(Se({},a),{},{keySeparator:!1}));se&&se.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 z=[],ae=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ae&&ae[0])for(var ye=0;ye<ae.length;ye++)z.push(ae[ye]);else this.options.saveMissingTo==="all"?z=this.languageUtils.toResolveHierarchy(a.lng||this.language):z.push(a.lng||this.language);var Re=function(H,ne,ie){var be=he&&ie!==h?ie:xe;s.options.missingKeyHandler?s.options.missingKeyHandler(H,g,ne,be,K,a):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(H,g,ne,be,K,a),s.emit("missingKey",H,g,ne,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&pe?z.forEach(function(je){s.pluralResolver.getSuffixes(je,a).forEach(function(H){Re([je],l+H,a["defaultValue".concat(H)]||ce)})}):Re(z,l,ce))}h=this.extendTranslation(h,i,a,y,o),G&&h===l&&this.options.appendNamespaceToMissingKey&&(h="".concat(g,":").concat(l)),(G||q)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(g,":").concat(l):l,q?h:void 0):h=this.options.parseMissingKeyHandler(h))}return u?(y.res=h,y):h}},{key:"extendTranslation",value:function(i,a,o,s,u){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,Se(Se({},this.options.interpolation.defaultVariables),o),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init(Se(Se({},o),{interpolation:Se(Se({},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),l;if(f){var d=i.match(this.interpolator.nestingRegexp);l=d&&d.length}var g=o.replace&&typeof o.replace!="string"?o.replace:o;if(this.options.interpolation.defaultVariables&&(g=Se(Se({},this.options.interpolation.defaultVariables),g)),i=this.interpolator.interpolate(i,g,o.lng||this.language,o),f){var p=i.match(this.interpolator.nestingRegexp),b=p&&p.length;l<b&&(o.nest=!1)}o.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var h=arguments.length,E=new Array(h),A=0;A<h;A++)E[A]=arguments[A];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 v=o.postProcess||this.options.postProcess,y=typeof v=="string"?[v]:v;return i!=null&&y&&y.length&&o.applyPostProcessor!==!1&&(i=to.handle(y,i,a,this.options&&this.options.postProcessPassResolved?Se({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,f,l;return typeof i=="string"&&(i=[i]),i.forEach(function(d){if(!a.isValidLookup(s)){var g=a.extractFromKey(d,o),p=g.key;u=p;var b=g.namespaces;a.options.fallbackNS&&(b=b.concat(a.options.fallbackNS));var v=o.count!==void 0&&typeof o.count!="string",y=v&&!o.ordinal&&o.count===0&&a.pluralResolver.shouldUseIntlApi(),h=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(A){a.isValidLookup(s)||(l=A,!Oi["".concat(E[0],"-").concat(A)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(l)&&(Oi["".concat(E[0],"-").concat(A)]=!0,a.logger.warn('key "'.concat(u,'" for languages "').concat(E.join(", "),`" won't get resolved as namespace "`).concat(l,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(function(w){if(!a.isValidLookup(s)){f=w;var P=[p];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(P,p,w,A,o);else{var _;v&&(_=a.pluralResolver.getSuffix(w,o.count,o));var I="".concat(a.options.pluralSeparator,"zero");if(v&&(P.push(p+_),y&&P.push(p+I)),h){var F="".concat(p).concat(a.options.contextSeparator).concat(o.context);P.push(F),v&&(P.push(F+_),y&&P.push(F+I))}}for(var k;k=P.pop();)a.isValidLookup(s)||(c=k,s=a.getResource(w,A,k,o))}}))})}}),{res:s,usedKey:u,exactUsedKey:c,usedLng:f,usedNS:l}}},{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}(lt);function Qr(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Su=function(){function e(t){$e(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Be.create("languageUtils")}return Ie(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]=Qr(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]=Qr(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Qr(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}(),Ou=[{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}],wu={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)}},Eu=["v1","v2","v3"],Ei={zero:0,one:1,two:2,few:3,many:4,other:5};function xu(){var e={};return Ou.forEach(function(t){t.lngs.forEach(function(r){e[r]={numbers:t.nr,plurals:wu[t.fc]}})}),e}var Pu=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=Be.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=xu()}return Ie(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 Ei[o]-Ei[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!Eu.includes(this.options.compatibilityJSON)}}]),e}();function xi(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 Fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xi(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Cu=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$e(this,e),this.logger=Be.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(r){return r},this.init(t)}return Ie(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:du,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?xt(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?xt(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?xt(n.nestingPrefix):n.nestingPrefixEscaped||xt("$t("),this.nestingSuffix=n.nestingSuffix?xt(n.nestingSuffix):n.nestingSuffixEscaped||xt(")"),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,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(v){return v.replace(/\$/g,"$$$$")}var d=function(y){if(y.indexOf(o.formatSeparator)<0){var h=yi(n,f,y);return o.alwaysFormat?o.format(h,void 0,i,Fe(Fe(Fe({},a),n),{},{interpolationkey:y})):h}var E=y.split(o.formatSeparator),A=E.shift().trim(),w=E.join(o.formatSeparator).trim();return o.format(yi(n,f,A),w,i,Fe(Fe(Fe({},a),n),{},{interpolationkey:A}))};this.resetRegExp();var g=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,p=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,b=[{regex:this.regexpUnescape,safeValue:function(y){return l(y)}},{regex:this.regexp,safeValue:function(y){return o.escapeValue?l(o.escape(y)):l(y)}}];return b.forEach(function(v){for(c=0;s=v.regex.exec(r);){var y=s[1].trim();if(u=d(y),u===void 0)if(typeof g=="function"){var h=g(r,s,a);u=typeof h=="string"?h:""}else if(a&&a.hasOwnProperty(y))u="";else if(p){u=s[0];continue}else o.logger.warn("missed to pass in variable ".concat(y," for interpolating ").concat(r)),u="";else typeof u!="string"&&!o.useRawValueToEscape&&(u=mi(u));var E=v.safeValue(u);if(r=r.replace(s[0],E),p?(v.regex.lastIndex+=u.length,v.regex.lastIndex-=s[0].length):v.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=Fe({},a);u.applyPostProcessor=!1,delete u.defaultValue;function c(g,p){var b=this.nestingOptionsSeparator;if(g.indexOf(b)<0)return g;var v=g.split(new RegExp("".concat(b,"[ ]*{"))),y="{".concat(v[1]);g=v[0],y=this.interpolate(y,u);var h=y.match(/'/g),E=y.match(/"/g);(h&&h.length%2===0&&!E||E.length%2!==0)&&(y=y.replace(/'/g,'"'));try{u=JSON.parse(y),p&&(u=Fe(Fe({},p),u))}catch(A){return this.logger.warn("failed parsing options string in nesting for key ".concat(g),A),"".concat(g).concat(b).concat(y)}return delete u.defaultValue,g}for(;o=this.nestingRegexp.exec(r);){var f=[],l=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){var d=o[1].split(this.formatSeparator).map(function(g){return g.trim()});o[1]=d.shift(),f=d,l=!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=mi(s)),s||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(r)),s=""),l&&(s=f.reduce(function(g,p){return i.format(g,p,a.lng,Fe(Fe({},a),{},{interpolationkey:o[1].trim()}))},s.trim())),r=r.replace(o[0],s),this.regexp.lastIndex=0}return r}}]),e}();function Pi(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 tt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pi(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Au(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=ou(s),c=u[0],f=u.slice(1),l=f.join(":").trim().replace(/^'+|'+$/g,"");r[c.trim()]||(r[c.trim()]=l),l==="false"&&(r[c.trim()]=!1),l==="true"&&(r[c.trim()]=!0),isNaN(l)||(r[c.trim()]=parseInt(l,10))}})}}return{formatName:t,formatOptions:r}}function Pt(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 _u=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$e(this,e),this.logger=Be.create("formatter"),this.options=t,this.formats={number:Pt(function(r,n){var i=new Intl.NumberFormat(r,n);return function(a){return i.format(a)}}),currency:Pt(function(r,n){var i=new Intl.NumberFormat(r,tt(tt({},n),{},{style:"currency"}));return function(a){return i.format(a)}}),datetime:Pt(function(r,n){var i=new Intl.DateTimeFormat(r,tt({},n));return function(a){return i.format(a)}}),relativetime:Pt(function(r,n){var i=new Intl.RelativeTimeFormat(r,tt({},n));return function(a){return i.format(a,n.range||"day")}}),list:Pt(function(r,n){var i=new Intl.ListFormat(r,tt({},n));return function(a){return i.format(a)}})},this.init(t)}return Ie(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()]=Pt(n)}},{key:"format",value:function(r,n,i,a){var o=this,s=n.split(this.formatSeparator),u=s.reduce(function(c,f){var l=Au(f),d=l.formatName,g=l.formatOptions;if(o.formats[d]){var p=c;try{var b=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},v=b.locale||b.lng||a.locale||a.lng||i;p=o.formats[d](c,v,tt(tt(tt({},g),a),b))}catch(y){o.logger.warn(y)}return p}else o.logger.warn("there was no format function for ".concat(d));return c},r);return u}}]),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 Ai(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){Ke(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=We(e),i;if(t){var a=We(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Xt(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 $u(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var Iu=function(e){$r(r,e);var t=Tu(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),Ir&&lt.call(ut(o)),o.backend=n,o.store=i,o.services=a,o.languageUtils=a.languageUtils,o.options=s,o.logger=Be.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 Ie(r,[{key:"queueLoad",value:function(i,a,o,s){var u=this,c={},f={},l={},d={};return i.forEach(function(g){var p=!0;a.forEach(function(b){var v="".concat(g,"|").concat(b);!o.reload&&u.store.hasResourceBundle(g,b)?u.state[v]=2:u.state[v]<0||(u.state[v]===1?f[v]===void 0&&(f[v]=!0):(u.state[v]=1,p=!1,f[v]===void 0&&(f[v]=!0),c[v]===void 0&&(c[v]=!0),d[b]===void 0&&(d[b]=!0)))}),p||(l[g]=!0)}),(Object.keys(c).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(c),pending:Object.keys(f),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(d)}}},{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 f={};this.queue.forEach(function(l){cu(l.loaded,[u],c),$u(l,i),a&&l.errors.push(a),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(function(d){f[d]||(f[d]={});var g=l.loaded[d];g.length&&g.forEach(function(p){f[d][p]===void 0&&(f[d][p]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(function(l){return!l.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,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:c,callback:f});return}return this.readingCalls++,this.backend[o](i,a,function(l,d){if(s.readingCalls--,s.waitingReads.length>0){var g=s.waitingReads.shift();s.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(l&&d&&u<s.maxRetries){setTimeout(function(){s.read.call(s,i,a,o,u+1,c*2,f)},c);return}f(l,d)})}},{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(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],c=s[1];this.read(u,c,"read",void 0,void 0,function(f,l){f&&a.logger.warn("".concat(o,"loading namespace ").concat(c," for language ").concat(u," failed"),f),!f&&l&&a.logger.log("".concat(o,"loaded namespace ").concat(c," for language ").concat(u),l),a.loaded(i,f,l)})}},{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,Ai(Ai({},c),{},{isUpdate:u})),!(!i||!i[0])&&this.store.addResource(i[0],a,o,s))}}]),r}(lt);function Lu(){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(De(t[1])==="object"&&(r=t[1]),typeof t[1]=="string"&&(r.defaultValue=t[1]),typeof t[2]=="string"&&(r.tDescription=t[2]),De(t[2])==="object"||De(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 _i(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 Ti(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 Ue(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ti(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ti(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ru(e){var t=Fu();return function(){var n=We(e),i;if(t){var a=We(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Xt(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 sr(){}function Du(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(r){typeof e[r]=="function"&&(e[r]=e[r].bind(e))})}var yr=function(e){$r(r,e);var t=Ru(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),Ir&&lt.call(ut(n)),n.options=_i(i),n.services={},n.logger=Be,n.modules={external:[]},Du(ut(n)),a&&!n.isInitialized&&!i.isClone){if(!n.options.initImmediate)return n.init(i,a),Xt(n,ut(n));setTimeout(function(){n.init(i,a)},0)}return n}return Ie(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=Lu();this.options=Ue(Ue(Ue({},s),this.options),_i(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Ue(Ue({},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(y){return y?typeof y=="function"?new y:y:null}if(!this.options.isClone){this.modules.logger?Be.init(u(this.modules.logger),this.options):Be.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl!="undefined"&&(c=_u);var f=new Su(this.options);this.store=new vu(this.options.resources,this.options);var l=this.services;l.logger=Be,l.resourceStore=this.store,l.languageUtils=f,l.pluralResolver=new Pu(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(l.formatter=u(c),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new Cu(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new Iu(u(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",function(y){for(var h=arguments.length,E=new Array(h>1?h-1:0),A=1;A<h;A++)E[A-1]=arguments[A];i.emit.apply(i,[y].concat(E))}),this.modules.languageDetector&&(l.languageDetector=u(this.modules.languageDetector),l.languageDetector.init(l,this.options.detection,this.options)),this.modules.i18nFormat&&(l.i18nFormat=u(this.modules.i18nFormat),l.i18nFormat.init&&l.i18nFormat.init(this)),this.translator=new wi(this.services,this.options),this.translator.on("*",function(y){for(var h=arguments.length,E=new Array(h>1?h-1:0),A=1;A<h;A++)E[A-1]=arguments[A];i.emit.apply(i,[y].concat(E))}),this.modules.external.forEach(function(y){y.init&&y.init(i)})}if(this.format=this.options.interpolation.format,o||(o=sr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var g=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];g.forEach(function(y){i[y]=function(){var h;return(h=i.store)[y].apply(h,arguments)}});var p=["addResource","addResources","addResourceBundle","removeResourceBundle"];p.forEach(function(y){i[y]=function(){var h;return(h=i.store)[y].apply(h,arguments),i}});var b=Ft(),v=function(){var h=function(A,w){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(w),o(A,w)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return h(null,i.t.bind(i));i.changeLanguage(i.options.lng,h)};return this.options.resources||!this.options.initImmediate?v():setTimeout(v,0),b}},{key:"loadResources",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:sr,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=[],f=function(g){if(!!g){var p=a.services.languageUtils.toResolveHierarchy(g);p.forEach(function(b){c.indexOf(b)<0&&c.push(b)})}};if(u)f(u);else{var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.forEach(function(d){return f(d)})}this.options.preload&&this.options.preload.forEach(function(d){return f(d)}),this.services.backendConnector.load(c,this.options.ns,function(d){!d&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),s(d)})}else s(null)}},{key:"reloadResources",value:function(i,a,o){var s=Ft();return i||(i=this.languages),a||(a=this.options.ns),o||(o=sr),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"&&to.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=Ft();this.emit("languageChanging",i);var u=function(d){o.language=d,o.languages=o.services.languageUtils.toResolveHierarchy(d),o.resolvedLanguage=void 0,o.setResolvedLanguage(d)},c=function(d,g){g?(u(g),o.translator.changeLanguage(g),o.isLanguageChangingTo=void 0,o.emit("languageChanged",g),o.logger.log("languageChanged",g)):o.isLanguageChangingTo=void 0,s.resolve(function(){return o.t.apply(o,arguments)}),a&&a(d,function(){return o.t.apply(o,arguments)})},f=function(d){!i&&!d&&o.services.languageDetector&&(d=[]);var g=typeof d=="string"?d:o.services.languageUtils.getBestMatchFromCodes(d);g&&(o.language||u(g),o.translator.language||o.translator.changeLanguage(g),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage(g)),o.loadResources(g,function(p){c(p,g)})};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 c(f,l){var d;if(De(l)!=="object"){for(var g=arguments.length,p=new Array(g>2?g-2:0),b=2;b<g;b++)p[b-2]=arguments[b];d=s.options.overloadTranslationOptionHandler([f,l].concat(p))}else d=Ue({},l);d.lng=d.lng||c.lng,d.lngs=d.lngs||c.lngs,d.ns=d.ns||c.ns,d.keyPrefix=d.keyPrefix||o||c.keyPrefix;var v=s.options.keySeparator||".",y=d.keyPrefix?"".concat(d.keyPrefix).concat(v).concat(f):f;return s.t(y,d)};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 f=function(g,p){var b=a.services.backendConnector.state["".concat(g,"|").concat(p)];return b===-1||b===2};if(o.precheck){var l=o.precheck(this,f);if(l!==void 0)return l}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(s,i)&&(!u||f(c,i)))}},{key:"loadNamespaces",value:function(i,a){var o=this,s=Ft();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=Ft();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]:sr,s=Ue(Ue(Ue({},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(f){u[f]=i[f]}),u.services=Ue({},this.services),u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u.translator=new wi(u.services,u.options),u.translator.on("*",function(f){for(var l=arguments.length,d=new Array(l>1?l-1:0),g=1;g<l;g++)d[g-1]=arguments[g];u.emit.apply(u,[f].concat(d))}),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}(lt);Ke(yr,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new yr(e,t)});var ve=yr.createInstance();ve.createInstance=yr.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 er=e=>e.type==="checkbox",At=e=>e instanceof Date,Oe=e=>e==null;const ro=e=>typeof e=="object";var ge=e=>!Oe(e)&&!Array.isArray(e)&&ro(e)&&!At(e),no=e=>ge(e)&&e.target?er(e.target)?e.target.checked:e.target.value:e,Mu=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,io=(e,t)=>e.has(Mu(t)),ku=e=>{const t=e.constructor&&e.constructor.prototype;return ge(t)&&t.hasOwnProperty("isPrototypeOf")},Un=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function de(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(!(Un&&(e instanceof Blob||e instanceof FileList))&&(r||ge(e)))if(t=r?[]:{},!r&&!ku(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=de(e[n]));else return e;return t}var tr=e=>Array.isArray(e)?e.filter(Boolean):[],Z=e=>e===void 0,$=(e,t,r)=>{if(!t||!ge(e))return r;const n=tr(t.split(/[,[\].]+?/)).reduce((i,a)=>Oe(i)?i:i[a],e);return Z(n)||n===e?Z(e[t])?r:e[t]:n},Ve=e=>typeof e=="boolean",Vn=e=>/^\w*$/.test(e),ao=e=>tr(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Q=(e,t,r)=>{let n=-1;const i=Vn(t)?[t]:ao(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=ge(c)||Array.isArray(c)?c:isNaN(+i[n+1])?{}:[]}if(s==="__proto__")return;e[s]=u,e=e[s]}return e};const br={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},_e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Qe={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},oo=T.default.createContext(null),Ye=()=>T.default.useContext(oo),so=e=>{const{children:t,...r}=e;return T.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]!==_e.all&&(t._proxyFormState[o]=!n||_e.all),r&&(r[o]=!0),e[o]}});return i},we=e=>ge(e)&&!Object.keys(e).length,lo=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return we(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||_e.all))},Ee=e=>Array.isArray(e)?e:[e],co=(e,t,r)=>!e||!t||e===t||Ee(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function Lr(e){const t=T.default.useRef(e);t.current=e,T.default.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function fo(e){const t=Ye(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[o,s]=T.default.useState(r._formState),u=T.default.useRef(!0),c=T.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=T.default.useRef(i);return f.current=i,Lr({disabled:n,next:l=>u.current&&co(f.current,l.name,a)&&lo(l,c.current,r._updateFormState)&&s({...r._formState,...l}),subject:r._subjects.state}),T.default.useEffect(()=>(u.current=!0,c.current.isValid&&r._updateValid(!0),()=>{u.current=!1}),[r]),uo(o,r,c.current,!1)}var He=e=>typeof e=="string",go=(e,t,r,n,i)=>He(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);function po(e){const t=Ye(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:o}=e||{},s=T.default.useRef(n);s.current=n,Lr({disabled:a,subject:r._subjects.values,next:f=>{co(s.current,f.name,o)&&c(de(go(s.current,r._names,f.values||r._formValues,!1,i)))}});const[u,c]=T.default.useState(r._getWatch(n,i));return T.default.useEffect(()=>r._removeUnmounted()),u}function ho(e){const t=Ye(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,o=io(i._names.array,r),s=po({control:i,name:r,defaultValue:$(i._formValues,r,$(i._defaultValues,r,e.defaultValue)),exact:!0}),u=fo({control:i,name:r}),c=T.default.useRef(i.register(r,{...e.rules,value:s,...Ve(e.disabled)?{disabled:e.disabled}:{}}));return T.default.useEffect(()=>{const f=i._options.shouldUnregister||a,l=(d,g)=>{const p=$(i._fields,d);p&&p._f&&(p._f.mount=g)};if(l(r,!0),f){const d=de($(i._options.defaultValues,r));Q(i._defaultValues,r,d),Z($(i._formValues,r))&&Q(i._formValues,r,d)}return()=>{(o?f&&!i._state.action:f)?i.unregister(r):l(r,!1)}},[r,i,o,a]),T.default.useEffect(()=>{$(i._fields,r)&&i._updateDisabledField({disabled:n,fields:i._fields,name:r,value:$(i._fields,r)._f.value})},[n,r,i]),{field:{name:r,value:s,...Ve(n)||u.disabled?{disabled:u.disabled||n}:{},onChange:T.default.useCallback(f=>c.current.onChange({target:{value:no(f),name:r},type:br.CHANGE}),[r]),onBlur:T.default.useCallback(()=>c.current.onBlur({target:{value:$(i._formValues,r),name:r},type:br.BLUR}),[r,i]),ref:f=>{const l=$(i._fields,r);l&&f&&(l._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:d=>f.setCustomValidity(d),reportValidity:()=>f.reportValidity()})}},formState:u,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!$(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!$(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!$(u.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!$(u.validatingFields,r)},error:{enumerable:!0,get:()=>$(u.errors,r)}})}}const ju=e=>e.render(ho(e)),Uu="post";function Vu(e){const t=Ye(),[r,n]=T.default.useState(!1),{control:i=t.control,onSubmit:a,children:o,action:s,method:u=Uu,headers:c,encType:f,onError:l,render:d,onSuccess:g,validateStatus:p,...b}=e,v=async y=>{let h=!1,E="";await i.handleSubmit(async A=>{const w=new FormData;let P="";try{P=JSON.stringify(A)}catch{}for(const _ of i._names.mount)w.append(_,$(A,_));if(a&&await a({data:A,event:y,method:u,formData:w,formDataJson:P}),s)try{const _=[c&&c["Content-Type"],f].some(F=>F&&F.includes("json")),I=await fetch(s,{method:u,headers:{...c,...f?{"Content-Type":f}:{}},body:_?P:w});I&&(p?!p(I.status):I.status<200||I.status>=300)?(h=!0,l&&l({response:I}),E=String(I.status)):g&&g({response:I})}catch(_){h=!0,l&&l({error:_})}})(y),h&&e.control&&(e.control._subjects.state.next({isSubmitSuccessful:!1}),e.control.setError("root.server",{type:E}))};return T.default.useEffect(()=>{n(!0)},[]),d?T.default.createElement(T.default.Fragment,null,d({submit:v})):T.default.createElement("form",{noValidate:r,action:s,method:u,encType:f,onSubmit:v,...b},o)}var mo=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},rt=()=>{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)})},qr=(e,t,r={})=>r.shouldFocus||Z(r.shouldFocus)?r.focusName||`${e}.${Z(r.focusIndex)?t:r.focusIndex}.`:"",Kt=e=>({isOnSubmit:!e||e===_e.onSubmit,isOnBlur:e===_e.onBlur,isOnChange:e===_e.onChange,isOnAll:e===_e.all,isOnTouch:e===_e.onTouched}),On=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const _t=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=$(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)break;if(o.ref&&t(o.ref,o.name)&&!n)break;_t(s,t)}else ge(s)&&_t(s,t)}}};var vo=(e,t,r)=>{const n=Ee($(e,r));return Q(n,"root",t[r]),Q(e,r,n),e},Bn=e=>e.type==="file",at=e=>typeof e=="function",Sr=e=>{if(!Un)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},gr=e=>He(e),Hn=e=>e.type==="radio",Or=e=>e instanceof RegExp;const Ni={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&&!Z(e[0].attributes.value)?Z(e[0].value)||e[0].value===""?$i:{value:e[0].value,isValid:!0}:$i:Ni}return Ni};const Ii={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,Ii):Ii;function Li(e,t,r="validate"){if(gr(e)||Array.isArray(e)&&e.every(gr)||Ve(e)&&!e)return{type:r,message:gr(e)?e:"",ref:t}}var Ct=e=>ge(e)&&!Or(e)?e:{value:e,message:""},wn=async(e,t,r,n,i)=>{const{ref:a,refs:o,required:s,maxLength:u,minLength:c,min:f,max:l,pattern:d,validate:g,name:p,valueAsNumber:b,mount:v,disabled:y}=e._f,h=$(t,p);if(!v||y)return{};const E=o?o[0]:a,A=D=>{n&&E.reportValidity&&(E.setCustomValidity(Ve(D)?"":D||""),E.reportValidity())},w={},P=Hn(a),_=er(a),I=P||_,F=(b||Bn(a))&&Z(a.value)&&Z(h)||Sr(a)&&a.value===""||h===""||Array.isArray(h)&&!h.length,k=mo.bind(null,p,r,w),W=(D,j,U,B=Qe.maxLength,q=Qe.minLength)=>{const G=D?j:U;w[p]={type:D?B:q,message:G,ref:a,...k(D?B:q,G)}};if(i?!Array.isArray(h)||!h.length:s&&(!I&&(F||Oe(h))||Ve(h)&&!h||_&&!yo(o).isValid||P&&!bo(o).isValid)){const{value:D,message:j}=gr(s)?{value:!!s,message:s}:Ct(s);if(D&&(w[p]={type:Qe.required,message:j,ref:E,...k(Qe.required,j)},!r))return A(j),w}if(!F&&(!Oe(f)||!Oe(l))){let D,j;const U=Ct(l),B=Ct(f);if(!Oe(h)&&!isNaN(h)){const q=a.valueAsNumber||h&&+h;Oe(U.value)||(D=q>U.value),Oe(B.value)||(j=q<B.value)}else{const q=a.valueAsDate||new Date(h),G=X=>new Date(new Date().toDateString()+" "+X),pe=a.type=="time",he=a.type=="week";He(U.value)&&h&&(D=pe?G(h)>G(U.value):he?h>U.value:q>new Date(U.value)),He(B.value)&&h&&(j=pe?G(h)<G(B.value):he?h<B.value:q<new Date(B.value))}if((D||j)&&(W(!!D,U.message,B.message,Qe.max,Qe.min),!r))return A(w[p].message),w}if((u||c)&&!F&&(He(h)||i&&Array.isArray(h))){const D=Ct(u),j=Ct(c),U=!Oe(D.value)&&h.length>+D.value,B=!Oe(j.value)&&h.length<+j.value;if((U||B)&&(W(U,D.message,j.message),!r))return A(w[p].message),w}if(d&&!F&&He(h)){const{value:D,message:j}=Ct(d);if(Or(D)&&!h.match(D)&&(w[p]={type:Qe.pattern,message:j,ref:a,...k(Qe.pattern,j)},!r))return A(j),w}if(g){if(at(g)){const D=await g(h,t),j=Li(D,E);if(j&&(w[p]={...j,...k(Qe.validate,j.message)},!r))return A(j.message),w}else if(ge(g)){let D={};for(const j in g){if(!we(D)&&!r)break;const U=Li(await g[j](h,t),E,j);U&&(D={...U,...k(j,U.message)},A(U.message),r&&(w[p]=D))}if(!we(D)&&(w[p]={ref:E,...D},!r))return w}}return A(!0),w},Jr=(e,t)=>[...e,...Ee(t)],Zr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Xr(e,t,r){return[...e.slice(0,t),...Ee(r),...e.slice(t)]}var en=(e,t,r)=>Array.isArray(e)?(Z(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],tn=(e,t)=>[...Ee(t),...Ee(e)];function Bu(e,t){let r=0;const n=[...e];for(const i of t)n.splice(i-r,1),r++;return tr(n).length?n:[]}var rn=(e,t)=>Z(t)?[]:Bu(e,Ee(t).sort((r,n)=>r-n)),nn=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]};function Hu(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Z(e)?n++:e[t[n++]];return e}function Wu(e){for(const t in e)if(e.hasOwnProperty(t)&&!Z(e[t]))return!1;return!0}function le(e,t){const r=Array.isArray(t)?t:Vn(t)?[t]:ao(t),n=r.length===1?e:Hu(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(ge(n)&&we(n)||Array.isArray(n)&&Wu(n))&&le(e,r.slice(0,-1)),e}var Ri=(e,t,r)=>(e[t]=r,e);function Gu(e){const t=Ye(),{control:r=t.control,name:n,keyName:i="id",shouldUnregister:a}=e,[o,s]=T.default.useState(r._getFieldArray(n)),u=T.default.useRef(r._getFieldArray(n).map(rt)),c=T.default.useRef(o),f=T.default.useRef(n),l=T.default.useRef(!1);f.current=n,c.current=o,r._names.array.add(n),e.rules&&r.register(n,e.rules),Lr({next:({values:w,name:P})=>{if(P===f.current||!P){const _=$(w,f.current);Array.isArray(_)&&(s(_),u.current=_.map(rt))}},subject:r._subjects.array});const d=T.default.useCallback(w=>{l.current=!0,r._updateFieldArray(n,w)},[r,n]),g=(w,P)=>{const _=Ee(de(w)),I=Jr(r._getFieldArray(n),_);r._names.focus=qr(n,I.length-1,P),u.current=Jr(u.current,_.map(rt)),d(I),s(I),r._updateFieldArray(n,I,Jr,{argA:Zr(w)})},p=(w,P)=>{const _=Ee(de(w)),I=tn(r._getFieldArray(n),_);r._names.focus=qr(n,0,P),u.current=tn(u.current,_.map(rt)),d(I),s(I),r._updateFieldArray(n,I,tn,{argA:Zr(w)})},b=w=>{const P=rn(r._getFieldArray(n),w);u.current=rn(u.current,w),d(P),s(P),r._updateFieldArray(n,P,rn,{argA:w})},v=(w,P,_)=>{const I=Ee(de(P)),F=Xr(r._getFieldArray(n),w,I);r._names.focus=qr(n,w,_),u.current=Xr(u.current,w,I.map(rt)),d(F),s(F),r._updateFieldArray(n,F,Xr,{argA:w,argB:Zr(P)})},y=(w,P)=>{const _=r._getFieldArray(n);nn(_,w,P),nn(u.current,w,P),d(_),s(_),r._updateFieldArray(n,_,nn,{argA:w,argB:P},!1)},h=(w,P)=>{const _=r._getFieldArray(n);en(_,w,P),en(u.current,w,P),d(_),s(_),r._updateFieldArray(n,_,en,{argA:w,argB:P},!1)},E=(w,P)=>{const _=de(P),I=Ri(r._getFieldArray(n),w,_);u.current=[...I].map((F,k)=>!F||k===w?rt():u.current[k]),d(I),s([...I]),r._updateFieldArray(n,I,Ri,{argA:w,argB:_},!0,!1)},A=w=>{const P=Ee(de(w));u.current=P.map(rt),d([...P]),s([...P]),r._updateFieldArray(n,[...P],_=>_,{},!0,!1)};return T.default.useEffect(()=>{if(r._state.action=!1,On(n,r._names)&&r._subjects.state.next({...r._formState}),l.current&&(!Kt(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([n]).then(w=>{const P=$(w.errors,n),_=$(r._formState.errors,n);(_?!P&&_.type||P&&(_.type!==P.type||_.message!==P.message):P&&P.type)&&(P?Q(r._formState.errors,n,P):le(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const w=$(r._fields,n);w&&w._f&&!(Kt(r._options.reValidateMode).isOnSubmit&&Kt(r._options.mode).isOnSubmit)&&wn(w,r._formValues,r._options.criteriaMode===_e.all,r._options.shouldUseNativeValidation,!0).then(P=>!we(P)&&r._subjects.state.next({errors:vo(r._formState.errors,P,n)}))}r._subjects.values.next({name:n,values:{...r._formValues}}),r._names.focus&&_t(r._fields,(w,P)=>{if(r._names.focus&&P.startsWith(r._names.focus)&&w.focus)return w.focus(),1}),r._names.focus="",r._updateValid(),l.current=!1},[o,n,r]),T.default.useEffect(()=>(!$(r._formValues,n)&&r._updateFieldArray(n),()=>{(r._options.shouldUnregister||a)&&r.unregister(n)}),[n,r,i,a]),{swap:T.default.useCallback(y,[d,n,r]),move:T.default.useCallback(h,[d,n,r]),prepend:T.default.useCallback(p,[d,n,r]),append:T.default.useCallback(g,[d,n,r]),remove:T.default.useCallback(b,[d,n,r]),insert:T.default.useCallback(v,[d,n,r]),update:T.default.useCallback(E,[d,n,r]),replace:T.default.useCallback(A,[d,n,r]),fields:T.default.useMemo(()=>o.map((w,P)=>({...w,[i]:u.current[P]||rt()})),[o,i])}}var an=()=>{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=[]}}},wr=e=>Oe(e)||!ro(e);function pt(e,t){if(wr(e)||wr(t))return e===t;if(At(e)&&At(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(At(a)&&At(o)||ge(a)&&ge(o)||Array.isArray(a)&&Array.isArray(o)?!pt(a,o):a!==o)return!1}}return!0}var So=e=>e.type==="select-multiple",Ku=e=>Hn(e)||er(e),on=e=>Sr(e)&&e.isConnected,Oo=e=>{for(const t in e)if(at(e[t]))return!0;return!1};function Er(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])?[]:{},Er(e[n],t[n])):Oe(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])?Z(t)||wr(r[i])?r[i]=Array.isArray(e[i])?Er(e[i],[]):{...Er(e[i])}:wo(e[i],Oe(t)?{}:t[i],r[i]):r[i]=!pt(e[i],t[i]);return r}var ur=(e,t)=>wo(e,t,Er(t)),Eo=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Z(e)?e:t?e===""?NaN:e&&+e:r&&He(e)?new Date(e):n?n(e):e;function sn(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Bn(t)?t.files:Hn(t)?bo(e.refs).value:So(t)?[...t.selectedOptions].map(({value:r})=>r):er(t)?yo(e.refs).value:Eo(Z(t.value)?e.ref.value:t.value,e)}var Yu=(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}},Dt=e=>Z(e)?e:Or(e)?e.source:ge(e)?Or(e.value)?e.value.source:e.value:e,zu=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Fi(e,t,r){const n=$(e,r);if(n||Vn(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 Qu=(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,qu=(e,t)=>!tr($(e,t)).length&&le(e,t);const Ju={mode:_e.onSubmit,reValidateMode:_e.onChange,shouldFocusError:!0};function Zu(e={}){let t={...Ju,...e},r={submitCount:0,isDirty:!1,isLoading:at(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},i=ge(t.defaultValues)||ge(t.values)?de(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:de(i),o={action:!1,mount:!1,watch:!1},s={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,c=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},l={values:an(),array:an(),state:an()},d=Kt(t.mode),g=Kt(t.reValidateMode),p=t.criteriaMode===_e.all,b=m=>O=>{clearTimeout(c),c=setTimeout(m,O)},v=async m=>{if(f.isValid||m){const O=t.resolver?we((await I()).errors):await k(n,!0);O!==r.isValid&&l.state.next({isValid:O})}},y=(m,O)=>{(f.isValidating||f.validatingFields)&&((m||Array.from(s.mount)).forEach(x=>{x&&(O?Q(r.validatingFields,x,O):le(r.validatingFields,x))}),l.state.next({validatingFields:r.validatingFields,isValidating:!we(r.validatingFields)}))},h=(m,O=[],x,R,L=!0,N=!0)=>{if(R&&x){if(o.action=!0,N&&Array.isArray($(n,m))){const M=x($(n,m),R.argA,R.argB);L&&Q(n,m,M)}if(N&&Array.isArray($(r.errors,m))){const M=x($(r.errors,m),R.argA,R.argB);L&&Q(r.errors,m,M),qu(r.errors,m)}if(f.touchedFields&&N&&Array.isArray($(r.touchedFields,m))){const M=x($(r.touchedFields,m),R.argA,R.argB);L&&Q(r.touchedFields,m,M)}f.dirtyFields&&(r.dirtyFields=ur(i,a)),l.state.next({name:m,isDirty:D(m,O),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Q(a,m,O)},E=(m,O)=>{Q(r.errors,m,O),l.state.next({errors:r.errors})},A=m=>{r.errors=m,l.state.next({errors:r.errors,isValid:!1})},w=(m,O,x,R)=>{const L=$(n,m);if(L){const N=$(a,m,Z(x)?$(i,m):x);Z(N)||R&&R.defaultChecked||O?Q(a,m,O?N:sn(L._f)):B(m,N),o.mount&&v()}},P=(m,O,x,R,L)=>{let N=!1,M=!1;const Y={name:m},ue=!!($(n,m)&&$(n,m)._f&&$(n,m)._f.disabled);if(!x||R){f.isDirty&&(M=r.isDirty,r.isDirty=Y.isDirty=D(),N=M!==Y.isDirty);const Pe=ue||pt($(i,m),O);M=!!(!ue&&$(r.dirtyFields,m)),Pe||ue?le(r.dirtyFields,m):Q(r.dirtyFields,m,!0),Y.dirtyFields=r.dirtyFields,N=N||f.dirtyFields&&M!==!Pe}if(x){const Pe=$(r.touchedFields,m);Pe||(Q(r.touchedFields,m,x),Y.touchedFields=r.touchedFields,N=N||f.touchedFields&&Pe!==x)}return N&&L&&l.state.next(Y),N?Y:{}},_=(m,O,x,R)=>{const L=$(r.errors,m),N=f.isValid&&Ve(O)&&r.isValid!==O;if(e.delayError&&x?(u=b(()=>E(m,x)),u(e.delayError)):(clearTimeout(c),u=null,x?Q(r.errors,m,x):le(r.errors,m)),(x?!pt(L,x):L)||!we(R)||N){const M={...R,...N&&Ve(O)?{isValid:O}:{},errors:r.errors,name:m};r={...r,...M},l.state.next(M)}},I=async m=>{y(m,!0);const O=await t.resolver(a,t.context,Yu(m||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return y(m),O},F=async m=>{const{errors:O}=await I(m);if(m)for(const x of m){const R=$(O,x);R?Q(r.errors,x,R):le(r.errors,x)}else r.errors=O;return O},k=async(m,O,x={valid:!0})=>{for(const R in m){const L=m[R];if(L){const{_f:N,...M}=L;if(N){const Y=s.array.has(N.name);y([R],!0);const ue=await wn(L,a,p,t.shouldUseNativeValidation&&!O,Y);if(y([R]),ue[N.name]&&(x.valid=!1,O))break;!O&&($(ue,N.name)?Y?vo(r.errors,ue,N.name):Q(r.errors,N.name,ue[N.name]):le(r.errors,N.name))}M&&await k(M,O,x)}}return x.valid},W=()=>{for(const m of s.unMount){const O=$(n,m);O&&(O._f.refs?O._f.refs.every(x=>!on(x)):!on(O._f.ref))&&z(m)}s.unMount=new Set},D=(m,O)=>(m&&O&&Q(a,m,O),!pt(ce(),i)),j=(m,O,x)=>go(m,s,{...o.mount?a:Z(O)?i:He(m)?{[m]:O}:O},x,O),U=m=>tr($(o.mount?a:i,m,e.shouldUnregister?$(i,m,[]):[])),B=(m,O,x={})=>{const R=$(n,m);let L=O;if(R){const N=R._f;N&&(!N.disabled&&Q(a,m,Eo(O,N)),L=Sr(N.ref)&&Oe(O)?"":O,So(N.ref)?[...N.ref.options].forEach(M=>M.selected=L.includes(M.value)):N.refs?er(N.ref)?N.refs.length>1?N.refs.forEach(M=>(!M.defaultChecked||!M.disabled)&&(M.checked=Array.isArray(L)?!!L.find(Y=>Y===M.value):L===M.value)):N.refs[0]&&(N.refs[0].checked=!!L):N.refs.forEach(M=>M.checked=M.value===L):Bn(N.ref)?N.ref.value="":(N.ref.value=L,N.ref.type||l.values.next({name:m,values:{...a}})))}(x.shouldDirty||x.shouldTouch)&&P(m,L,x.shouldTouch,x.shouldDirty,!0),x.shouldValidate&&X(m)},q=(m,O,x)=>{for(const R in O){const L=O[R],N=`${m}.${R}`,M=$(n,N);(s.array.has(m)||!wr(L)||M&&!M._f)&&!At(L)?q(N,L,x):B(N,L,x)}},G=(m,O,x={})=>{const R=$(n,m),L=s.array.has(m),N=de(O);Q(a,m,N),L?(l.array.next({name:m,values:{...a}}),(f.isDirty||f.dirtyFields)&&x.shouldDirty&&l.state.next({name:m,dirtyFields:ur(i,a),isDirty:D(m,N)})):R&&!R._f&&!Oe(N)?q(m,N,x):B(m,N,x),On(m,s)&&l.state.next({...r}),l.values.next({name:o.mount?m:void 0,values:{...a}})},pe=async m=>{o.mount=!0;const O=m.target;let x=O.name,R=!0;const L=$(n,x),N=()=>O.type?sn(L._f):no(m),M=Y=>{R=Number.isNaN(Y)||Y===$(a,x,Y)};if(L){let Y,ue;const Pe=N(),Et=m.type===br.BLUR||m.type===br.FOCUS_OUT,Zs=!zu(L._f)&&!t.resolver&&!$(r.errors,x)&&!L._f.deps||Qu(Et,$(r.touchedFields,x),r.isSubmitted,g,d),Yr=On(x,s,Et);Q(a,x,Pe),Et?(L._f.onBlur&&L._f.onBlur(m),u&&u(0)):L._f.onChange&&L._f.onChange(m);const zr=P(x,Pe,Et,!1),Xs=!we(zr)||Yr;if(!Et&&l.values.next({name:x,type:m.type,values:{...a}}),Zs)return f.isValid&&v(),Xs&&l.state.next({name:x,...Yr?{}:zr});if(!Et&&Yr&&l.state.next({...r}),t.resolver){const{errors:li}=await I([x]);if(M(Pe),R){const eu=Fi(r.errors,n,x),ci=Fi(li,n,eu.name||x);Y=ci.error,x=ci.name,ue=we(li)}}else y([x],!0),Y=(await wn(L,a,p,t.shouldUseNativeValidation))[x],y([x]),M(Pe),R&&(Y?ue=!1:f.isValid&&(ue=await k(n,!0)));R&&(L._f.deps&&X(L._f.deps),_(x,ue,Y,zr))}},he=(m,O)=>{if($(r.errors,O)&&m.focus)return m.focus(),1},X=async(m,O={})=>{let x,R;const L=Ee(m);if(t.resolver){const N=await F(Z(m)?m:L);x=we(N),R=m?!L.some(M=>$(N,M)):x}else m?(R=(await Promise.all(L.map(async N=>{const M=$(n,N);return await k(M&&M._f?{[N]:M}:M)}))).every(Boolean),!(!R&&!r.isValid)&&v()):R=x=await k(n);return l.state.next({...!He(m)||f.isValid&&x!==r.isValid?{}:{name:m},...t.resolver||!m?{isValid:x}:{},errors:r.errors}),O.shouldFocus&&!R&&_t(n,he,m?L:s.mount),R},ce=m=>{const O={...o.mount?a:i};return Z(m)?O:He(m)?$(O,m):m.map(x=>$(O,x))},fe=(m,O)=>({invalid:!!$((O||r).errors,m),isDirty:!!$((O||r).dirtyFields,m),error:$((O||r).errors,m),isValidating:!!$(r.validatingFields,m),isTouched:!!$((O||r).touchedFields,m)}),xe=m=>{m&&Ee(m).forEach(O=>le(r.errors,O)),l.state.next({errors:m?r.errors:{}})},K=(m,O,x)=>{const R=($(n,m,{_f:{}})._f||{}).ref,L=$(r.errors,m)||{},{ref:N,message:M,type:Y,...ue}=L;Q(r.errors,m,{...ue,...O,ref:R}),l.state.next({name:m,errors:r.errors,isValid:!1}),x&&x.shouldFocus&&R&&R.focus&&R.focus()},se=(m,O)=>at(m)?l.values.subscribe({next:x=>m(j(void 0,O),x)}):j(m,O,!0),z=(m,O={})=>{for(const x of m?Ee(m):s.mount)s.mount.delete(x),s.array.delete(x),O.keepValue||(le(n,x),le(a,x)),!O.keepError&&le(r.errors,x),!O.keepDirty&&le(r.dirtyFields,x),!O.keepTouched&&le(r.touchedFields,x),!O.keepIsValidating&&le(r.validatingFields,x),!t.shouldUnregister&&!O.keepDefaultValue&&le(i,x);l.values.next({values:{...a}}),l.state.next({...r,...O.keepDirty?{isDirty:D()}:{}}),!O.keepIsValid&&v()},ae=({disabled:m,name:O,field:x,fields:R,value:L})=>{if(Ve(m)&&o.mount||!!m){const N=m?void 0:Z(L)?sn(x?x._f:$(R,O)._f):L;Q(a,O,N),P(O,N,!1,!1,!0)}},ye=(m,O={})=>{let x=$(n,m);const R=Ve(O.disabled);return Q(n,m,{...x||{},_f:{...x&&x._f?x._f:{ref:{name:m}},name:m,mount:!0,...O}}),s.mount.add(m),x?ae({field:x,disabled:O.disabled,name:m,value:O.value}):w(m,!0,O.value),{...R?{disabled:O.disabled}:{},...t.progressive?{required:!!O.required,min:Dt(O.min),max:Dt(O.max),minLength:Dt(O.minLength),maxLength:Dt(O.maxLength),pattern:Dt(O.pattern)}:{},name:m,onChange:pe,onBlur:pe,ref:L=>{if(L){ye(m,O),x=$(n,m);const N=Z(L.value)&&L.querySelectorAll&&L.querySelectorAll("input,select,textarea")[0]||L,M=Ku(N),Y=x._f.refs||[];if(M?Y.find(ue=>ue===N):N===x._f.ref)return;Q(n,m,{_f:{...x._f,...M?{refs:[...Y.filter(on),N,...Array.isArray($(i,m))?[{}]:[]],ref:{type:N.type,name:m}}:{ref:N}}}),w(m,!1,void 0,N)}else x=$(n,m,{}),x._f&&(x._f.mount=!1),(t.shouldUnregister||O.shouldUnregister)&&!(io(s.array,m)&&o.action)&&s.unMount.add(m)}}},Re=()=>t.shouldFocusError&&_t(n,he,s.mount),je=m=>{Ve(m)&&(l.state.next({disabled:m}),_t(n,(O,x)=>{const R=$(n,x);R&&(O.disabled=R._f.disabled||m,Array.isArray(R._f.refs)&&R._f.refs.forEach(L=>{L.disabled=R._f.disabled||m}))},0,!1))},H=(m,O)=>async x=>{let R;x&&(x.preventDefault&&x.preventDefault(),x.persist&&x.persist());let L=de(a);if(l.state.next({isSubmitting:!0}),t.resolver){const{errors:N,values:M}=await I();r.errors=N,L=M}else await k(n);if(le(r.errors,"root"),we(r.errors)){l.state.next({errors:{}});try{await m(L,x)}catch(N){R=N}}else O&&await O({...r.errors},x),Re(),setTimeout(Re);if(l.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:we(r.errors)&&!R,submitCount:r.submitCount+1,errors:r.errors}),R)throw R},ne=(m,O={})=>{$(n,m)&&(Z(O.defaultValue)?G(m,de($(i,m))):(G(m,O.defaultValue),Q(i,m,de(O.defaultValue))),O.keepTouched||le(r.touchedFields,m),O.keepDirty||(le(r.dirtyFields,m),r.isDirty=O.defaultValue?D(m,de($(i,m))):D()),O.keepError||(le(r.errors,m),f.isValid&&v()),l.state.next({...r}))},ie=(m,O={})=>{const x=m?de(m):i,R=de(x),L=we(m),N=L?i:R;if(O.keepDefaultValues||(i=x),!O.keepValues){if(O.keepDirtyValues)for(const M of s.mount)$(r.dirtyFields,M)?Q(N,M,$(a,M)):G(M,$(N,M));else{if(Un&&Z(m))for(const M of s.mount){const Y=$(n,M);if(Y&&Y._f){const ue=Array.isArray(Y._f.refs)?Y._f.refs[0]:Y._f.ref;if(Sr(ue)){const Pe=ue.closest("form");if(Pe){Pe.reset();break}}}}n={}}a=e.shouldUnregister?O.keepDefaultValues?de(i):{}:de(N),l.array.next({values:{...N}}),l.values.next({values:{...N}})}s={mount:O.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!O.keepIsValid||!!O.keepDirtyValues,o.watch=!!e.shouldUnregister,l.state.next({submitCount:O.keepSubmitCount?r.submitCount:0,isDirty:L?!1:O.keepDirty?r.isDirty:!!(O.keepDefaultValues&&!pt(m,i)),isSubmitted:O.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:L?{}:O.keepDirtyValues?O.keepDefaultValues&&a?ur(i,a):r.dirtyFields:O.keepDefaultValues&&m?ur(i,m):O.keepDirty?r.dirtyFields:{},touchedFields:O.keepTouched?r.touchedFields:{},errors:O.keepErrors?r.errors:{},isSubmitSuccessful:O.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},be=(m,O)=>ie(at(m)?m(a):m,O);return{control:{register:ye,unregister:z,getFieldState:fe,handleSubmit:H,setError:K,_executeSchema:I,_getWatch:j,_getDirty:D,_updateValid:v,_removeUnmounted:W,_updateFieldArray:h,_updateDisabledField:ae,_getFieldArray:U,_reset:ie,_resetDefaultValues:()=>at(t.defaultValues)&&t.defaultValues().then(m=>{be(m,t.resetOptions),l.state.next({isLoading:!1})}),_updateFormState:m=>{r={...r,...m}},_disableForm:je,_subjects:l,_proxyFormState:f,_setErrors:A,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state(m){o=m},get _defaultValues(){return i},get _names(){return s},set _names(m){s=m},get _formState(){return r},set _formState(m){r=m},get _options(){return t},set _options(m){t={...t,...m}}},trigger:X,register:ye,handleSubmit:H,watch:se,setValue:G,getValues:ce,reset:be,resetField:ne,clearErrors:xe,unregister:z,setError:K,setFocus:(m,O={})=>{const x=$(n,m),R=x&&x._f;if(R){const L=R.refs?R.refs[0]:R.ref;L.focus&&(L.focus(),O.shouldSelect&&L.select())}},getFieldState:fe}}function xo(e={}){const t=T.default.useRef(),r=T.default.useRef(),[n,i]=T.default.useState({isDirty:!1,isValidating:!1,isLoading:at(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:at(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Zu(e),formState:n});const a=t.current.control;return a._options=e,Lr({subject:a._subjects.state,next:o=>{lo(o,a._proxyFormState,a._updateFormState,!0)&&i({...a._formState})}}),T.default.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),T.default.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==n.isDirty&&a._subjects.state.next({isDirty:o})}},[a,n.isDirty]),T.default.useEffect(()=>{e.values&&!pt(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(o=>({...o}))):a._resetDefaultValues()},[e.values,a]),T.default.useEffect(()=>{e.errors&&a._setErrors(e.errors)},[e.errors,a]),T.default.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),T.default.useEffect(()=>{e.shouldUnregister&&a._subjects.values.next({values:a._getWatch()})},[e.shouldUnregister,a]),t.current.formState=uo(n,a),t.current}var Xu=Object.freeze(Object.defineProperty({__proto__:null,Controller:ju,Form:Vu,FormProvider:so,appendErrors:mo,get:$,set:Q,useController:ho,useFieldArray:Gu,useForm:xo,useFormContext:Ye,useFormState:fo,useWatch:po},Symbol.toStringTag,{value:"Module"})),Po=(e=>(e.FULL_PAGE="FULL_PAGE",e.MODAL="MODAL",e))(Po||{}),Co=(e=>(e.SIMPLE="SIMPLE",e.COMPLEX="COMPLEX",e.QUANTITY="QUANTITY",e))(Co||{}),Wn=(e=>(e.SELECT="selCtx",e.FILTER="fltCtx",e))(Wn||{}),Gn=(e=>(e.OPTIONS="3e/group/options",e.CONFIG="3e/group/config",e.PRODUCT="3e/product",e))(Gn||{}),Te=(e=>(e.OK="OK",e.TOO_MUCH="TOO_MUCH",e.NOT_ENOUGHT="NOT_ENOUGHT",e.IGNORE="IGNORE",e))(Te||{});const el=(e,t,r)=>{if(e==="selected"||e==="filter")return[];if(r[t]===e)return[r];let n=_o(e,t,r.items);return n!=null&&n.length||(n=Ao(e,t,r.items),n.length),n},Ao=(e,t,r)=>{const n=tl(r),i=_o(e,t,n);return i!=null&&i.length?i:n!=null&&n.length?Ao(e,t,n):[]},tl=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},rl=(e,t,r,n)=>{const i=el(t,r,n),a=nl(e,i).filter(o=>o!==null&&typeof o!="undefined");return a.length?a[0]:null},nl=(e,t)=>{let r=[];return Array.isArray(t)&&t.length&&(r=t.map(n=>il(e,n))),r},il=(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=al(t),n=No(e,r);return n!=null&&n.length?n:r!=null&&r.length?To(e,r):[]},al=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}):[],Kn=(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=rl(a,n,Wn.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?`${Kn(r,e)||"0"}`:t};var ol=typeof global=="object"&&global&&global.Object===Object&&global,Io=ol,sl=typeof self=="object"&&self&&self.Object===Object&&self,ul=Io||sl||Function("return this")(),ze=ul,ll=ze.Symbol,ct=ll,Lo=Object.prototype,cl=Lo.hasOwnProperty,fl=Lo.toString,Mt=ct?ct.toStringTag:void 0;function dl(e){var t=cl.call(e,Mt),r=e[Mt];try{e[Mt]=void 0;var n=!0}catch{}var i=fl.call(e);return n&&(t?e[Mt]=r:delete e[Mt]),i}var gl=Object.prototype,pl=gl.toString;function hl(e){return pl.call(e)}var ml="[object Null]",vl="[object Undefined]",Di=ct?ct.toStringTag:void 0;function It(e){return e==null?e===void 0?vl:ml:Di&&Di in Object(e)?dl(e):hl(e)}function ft(e){return e!=null&&typeof e=="object"}var yl="[object Symbol]";function bl(e){return typeof e=="symbol"||ft(e)&&It(e)==yl}var Sl=Array.isArray,Tt=Sl,Ol=/\s/;function wl(e){for(var t=e.length;t--&&Ol.test(e.charAt(t)););return t}var El=/^\s+/;function xl(e){return e&&e.slice(0,wl(e)+1).replace(El,"")}function vt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Mi=0/0,Pl=/^[-+]0x[0-9a-f]+$/i,Cl=/^0b[01]+$/i,Al=/^0o[0-7]+$/i,_l=parseInt;function Ro(e){if(typeof e=="number")return e;if(bl(e))return Mi;if(vt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=vt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=xl(e);var r=Cl.test(e);return r||Al.test(e)?_l(e.slice(2),r?2:8):Pl.test(e)?Mi:+e}var ki=1/0,Tl=17976931348623157e292;function ji(e){if(!e)return e===0?e:0;if(e=Ro(e),e===ki||e===-ki){var t=e<0?-1:1;return t*Tl}return e===e?e:0}var Nl="[object AsyncFunction]",$l="[object Function]",Il="[object GeneratorFunction]",Ll="[object Proxy]";function Fo(e){if(!vt(e))return!1;var t=It(e);return t==$l||t==Il||t==Nl||t==Ll}var Rl=ze["__core-js_shared__"],un=Rl,Ui=function(){var e=/[^.]+$/.exec(un&&un.keys&&un.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Fl(e){return!!Ui&&Ui in e}var Dl=Function.prototype,Ml=Dl.toString;function bt(e){if(e!=null){try{return Ml.call(e)}catch{}try{return e+""}catch{}}return""}var kl=/[\\^$.*+?()[\]{}|]/g,jl=/^\[object .+?Constructor\]$/,Ul=Function.prototype,Vl=Object.prototype,Bl=Ul.toString,Hl=Vl.hasOwnProperty,Wl=RegExp("^"+Bl.call(Hl).replace(kl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Gl(e){if(!vt(e)||Fl(e))return!1;var t=Fo(e)?Wl:jl;return t.test(bt(e))}function Kl(e,t){return e==null?void 0:e[t]}function St(e,t){var r=Kl(e,t);return Gl(r)?r:void 0}var Yl=St(ze,"WeakMap"),En=Yl,Vi=Object.create,zl=function(){function e(){}return function(t){if(!vt(t))return{};if(Vi)return Vi(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Ql=zl;function ql(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Jl=function(){try{var e=St(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Bi=Jl;function Zl(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Xl=9007199254740991,ec=/^(?:0|[1-9]\d*)$/;function tc(e,t){var r=typeof e;return t=t==null?Xl:t,!!t&&(r=="number"||r!="symbol"&&ec.test(e))&&e>-1&&e%1==0&&e<t}function Do(e,t,r){t=="__proto__"&&Bi?Bi(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Yn(e,t){return e===t||e!==e&&t!==t}var rc=Object.prototype,nc=rc.hasOwnProperty;function Mo(e,t,r){var n=e[t];(!(nc.call(e,t)&&Yn(n,r))||r===void 0&&!(t in e))&&Do(e,t,r)}function Rr(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?Do(r,s,u):Mo(r,s,u)}return r}var ic=9007199254740991;function ko(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ic}function zn(e){return e!=null&&ko(e.length)&&!Fo(e)}var ac=Object.prototype;function Fr(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ac;return e===r}function oc(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var sc="[object Arguments]";function Hi(e){return ft(e)&&It(e)==sc}var jo=Object.prototype,uc=jo.hasOwnProperty,lc=jo.propertyIsEnumerable,cc=Hi(function(){return arguments}())?Hi:function(e){return ft(e)&&uc.call(e,"callee")&&!lc.call(e,"callee")},Uo=cc;function fc(){return!1}var Vo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wi=Vo&&typeof module=="object"&&module&&!module.nodeType&&module,dc=Wi&&Wi.exports===Vo,Gi=dc?ze.Buffer:void 0,gc=Gi?Gi.isBuffer:void 0,pc=gc||fc,Qt=pc,hc="[object Arguments]",mc="[object Array]",vc="[object Boolean]",yc="[object Date]",bc="[object Error]",Sc="[object Function]",Oc="[object Map]",wc="[object Number]",Ec="[object Object]",xc="[object RegExp]",Pc="[object Set]",Cc="[object String]",Ac="[object WeakMap]",_c="[object ArrayBuffer]",Tc="[object DataView]",Nc="[object Float32Array]",$c="[object Float64Array]",Ic="[object Int8Array]",Lc="[object Int16Array]",Rc="[object Int32Array]",Fc="[object Uint8Array]",Dc="[object Uint8ClampedArray]",Mc="[object Uint16Array]",kc="[object Uint32Array]",te={};te[Nc]=te[$c]=te[Ic]=te[Lc]=te[Rc]=te[Fc]=te[Dc]=te[Mc]=te[kc]=!0;te[hc]=te[mc]=te[_c]=te[vc]=te[Tc]=te[yc]=te[bc]=te[Sc]=te[Oc]=te[wc]=te[Ec]=te[xc]=te[Pc]=te[Cc]=te[Ac]=!1;function jc(e){return ft(e)&&ko(e.length)&&!!te[It(e)]}function Qn(e){return function(t){return e(t)}}var Bo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Yt=Bo&&typeof module=="object"&&module&&!module.nodeType&&module,Uc=Yt&&Yt.exports===Bo,ln=Uc&&Io.process,Vc=function(){try{var e=Yt&&Yt.require&&Yt.require("util").types;return e||ln&&ln.binding&&ln.binding("util")}catch{}}(),Nt=Vc,Ki=Nt&&Nt.isTypedArray,Bc=Ki?Qn(Ki):jc,qn=Bc,Hc=Object.prototype,Wc=Hc.hasOwnProperty;function Ho(e,t){var r=Tt(e),n=!r&&Uo(e),i=!r&&!n&&Qt(e),a=!r&&!n&&!i&&qn(e),o=r||n||i||a,s=o?oc(e.length,String):[],u=s.length;for(var c in e)(t||Wc.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||tc(c,u)))&&s.push(c);return s}function Wo(e,t){return function(r){return e(t(r))}}var Gc=Wo(Object.keys,Object),Kc=Gc,Yc=Object.prototype,zc=Yc.hasOwnProperty;function Go(e){if(!Fr(e))return Kc(e);var t=[];for(var r in Object(e))zc.call(e,r)&&r!="constructor"&&t.push(r);return t}function Jn(e){return zn(e)?Ho(e):Go(e)}function Qc(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var qc=Object.prototype,Jc=qc.hasOwnProperty;function Zc(e){if(!vt(e))return Qc(e);var t=Fr(e),r=[];for(var n in e)n=="constructor"&&(t||!Jc.call(e,n))||r.push(n);return r}function Zn(e){return zn(e)?Ho(e,!0):Zc(e)}var Xc=St(Object,"create"),qt=Xc;function ef(){this.__data__=qt?qt(null):{},this.size=0}function tf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var rf="__lodash_hash_undefined__",nf=Object.prototype,af=nf.hasOwnProperty;function of(e){var t=this.__data__;if(qt){var r=t[e];return r===rf?void 0:r}return af.call(t,e)?t[e]:void 0}var sf=Object.prototype,uf=sf.hasOwnProperty;function lf(e){var t=this.__data__;return qt?t[e]!==void 0:uf.call(t,e)}var cf="__lodash_hash_undefined__";function ff(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=qt&&t===void 0?cf:t,this}function yt(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])}}yt.prototype.clear=ef;yt.prototype.delete=tf;yt.prototype.get=of;yt.prototype.has=lf;yt.prototype.set=ff;function df(){this.__data__=[],this.size=0}function Dr(e,t){for(var r=e.length;r--;)if(Yn(e[r][0],t))return r;return-1}var gf=Array.prototype,pf=gf.splice;function hf(e){var t=this.__data__,r=Dr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():pf.call(t,r,1),--this.size,!0}function mf(e){var t=this.__data__,r=Dr(t,e);return r<0?void 0:t[r][1]}function vf(e){return Dr(this.__data__,e)>-1}function yf(e,t){var r=this.__data__,n=Dr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function et(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])}}et.prototype.clear=df;et.prototype.delete=hf;et.prototype.get=mf;et.prototype.has=vf;et.prototype.set=yf;var bf=St(ze,"Map"),Jt=bf;function Sf(){this.size=0,this.__data__={hash:new yt,map:new(Jt||et),string:new yt}}function Of(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Mr(e,t){var r=e.__data__;return Of(t)?r[typeof t=="string"?"string":"hash"]:r.map}function wf(e){var t=Mr(this,e).delete(e);return this.size-=t?1:0,t}function Ef(e){return Mr(this,e).get(e)}function xf(e){return Mr(this,e).has(e)}function Pf(e,t){var r=Mr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Ot(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])}}Ot.prototype.clear=Sf;Ot.prototype.delete=wf;Ot.prototype.get=Ef;Ot.prototype.has=xf;Ot.prototype.set=Pf;function Ko(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Cf=Wo(Object.getPrototypeOf,Object),Yo=Cf;function Af(){this.__data__=new et,this.size=0}function _f(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Tf(e){return this.__data__.get(e)}function Nf(e){return this.__data__.has(e)}var $f=200;function If(e,t){var r=this.__data__;if(r instanceof et){var n=r.__data__;if(!Jt||n.length<$f-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ot(n)}return r.set(e,t),this.size=r.size,this}function qe(e){var t=this.__data__=new et(e);this.size=t.size}qe.prototype.clear=Af;qe.prototype.delete=_f;qe.prototype.get=Tf;qe.prototype.has=Nf;qe.prototype.set=If;function Lf(e,t){return e&&Rr(t,Jn(t),e)}function Rf(e,t){return e&&Rr(t,Zn(t),e)}var zo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Yi=zo&&typeof module=="object"&&module&&!module.nodeType&&module,Ff=Yi&&Yi.exports===zo,zi=Ff?ze.Buffer:void 0,Qi=zi?zi.allocUnsafe:void 0;function Df(e,t){if(t)return e.slice();var r=e.length,n=Qi?Qi(r):new e.constructor(r);return e.copy(n),n}function Mf(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 Qo(){return[]}var kf=Object.prototype,jf=kf.propertyIsEnumerable,qi=Object.getOwnPropertySymbols,Uf=qi?function(e){return e==null?[]:(e=Object(e),Mf(qi(e),function(t){return jf.call(e,t)}))}:Qo,Xn=Uf;function Vf(e,t){return Rr(e,Xn(e),t)}var Bf=Object.getOwnPropertySymbols,Hf=Bf?function(e){for(var t=[];e;)Ko(t,Xn(e)),e=Yo(e);return t}:Qo,qo=Hf;function Wf(e,t){return Rr(e,qo(e),t)}function Jo(e,t,r){var n=t(e);return Tt(e)?n:Ko(n,r(e))}function xn(e){return Jo(e,Jn,Xn)}function Gf(e){return Jo(e,Zn,qo)}var Kf=St(ze,"DataView"),Pn=Kf,Yf=St(ze,"Promise"),Cn=Yf,zf=St(ze,"Set"),An=zf,Ji="[object Map]",Qf="[object Object]",Zi="[object Promise]",Xi="[object Set]",ea="[object WeakMap]",ta="[object DataView]",qf=bt(Pn),Jf=bt(Jt),Zf=bt(Cn),Xf=bt(An),ed=bt(En),dt=It;(Pn&&dt(new Pn(new ArrayBuffer(1)))!=ta||Jt&&dt(new Jt)!=Ji||Cn&&dt(Cn.resolve())!=Zi||An&&dt(new An)!=Xi||En&&dt(new En)!=ea)&&(dt=function(e){var t=It(e),r=t==Qf?e.constructor:void 0,n=r?bt(r):"";if(n)switch(n){case qf:return ta;case Jf:return Ji;case Zf:return Zi;case Xf:return Xi;case ed:return ea}return t});var $t=dt,td=Object.prototype,rd=td.hasOwnProperty;function nd(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&rd.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var id=ze.Uint8Array,xr=id;function ei(e){var t=new e.constructor(e.byteLength);return new xr(t).set(new xr(e)),t}function ad(e,t){var r=t?ei(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var od=/\w*$/;function sd(e){var t=new e.constructor(e.source,od.exec(e));return t.lastIndex=e.lastIndex,t}var ra=ct?ct.prototype:void 0,na=ra?ra.valueOf:void 0;function ud(e){return na?Object(na.call(e)):{}}function ld(e,t){var r=t?ei(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var cd="[object Boolean]",fd="[object Date]",dd="[object Map]",gd="[object Number]",pd="[object RegExp]",hd="[object Set]",md="[object String]",vd="[object Symbol]",yd="[object ArrayBuffer]",bd="[object DataView]",Sd="[object Float32Array]",Od="[object Float64Array]",wd="[object Int8Array]",Ed="[object Int16Array]",xd="[object Int32Array]",Pd="[object Uint8Array]",Cd="[object Uint8ClampedArray]",Ad="[object Uint16Array]",_d="[object Uint32Array]";function Td(e,t,r){var n=e.constructor;switch(t){case yd:return ei(e);case cd:case fd:return new n(+e);case bd:return ad(e,r);case Sd:case Od:case wd:case Ed:case xd:case Pd:case Cd:case Ad:case _d:return ld(e,r);case dd:return new n;case gd:case md:return new n(e);case pd:return sd(e);case hd:return new n;case vd:return ud(e)}}function Nd(e){return typeof e.constructor=="function"&&!Fr(e)?Ql(Yo(e)):{}}var $d="[object Map]";function Id(e){return ft(e)&&$t(e)==$d}var ia=Nt&&Nt.isMap,Ld=ia?Qn(ia):Id,Rd=Ld,Fd="[object Set]";function Dd(e){return ft(e)&&$t(e)==Fd}var aa=Nt&&Nt.isSet,Md=aa?Qn(aa):Dd,kd=Md,jd=1,Ud=2,Vd=4,Zo="[object Arguments]",Bd="[object Array]",Hd="[object Boolean]",Wd="[object Date]",Gd="[object Error]",Xo="[object Function]",Kd="[object GeneratorFunction]",Yd="[object Map]",zd="[object Number]",es="[object Object]",Qd="[object RegExp]",qd="[object Set]",Jd="[object String]",Zd="[object Symbol]",Xd="[object WeakMap]",eg="[object ArrayBuffer]",tg="[object DataView]",rg="[object Float32Array]",ng="[object Float64Array]",ig="[object Int8Array]",ag="[object Int16Array]",og="[object Int32Array]",sg="[object Uint8Array]",ug="[object Uint8ClampedArray]",lg="[object Uint16Array]",cg="[object Uint32Array]",J={};J[Zo]=J[Bd]=J[eg]=J[tg]=J[Hd]=J[Wd]=J[rg]=J[ng]=J[ig]=J[ag]=J[og]=J[Yd]=J[zd]=J[es]=J[Qd]=J[qd]=J[Jd]=J[Zd]=J[sg]=J[ug]=J[lg]=J[cg]=!0;J[Gd]=J[Xo]=J[Xd]=!1;function pr(e,t,r,n,i,a){var o,s=t&jd,u=t&Ud,c=t&Vd;if(r&&(o=i?r(e,n,i,a):r(e)),o!==void 0)return o;if(!vt(e))return e;var f=Tt(e);if(f){if(o=nd(e),!s)return ql(e,o)}else{var l=$t(e),d=l==Xo||l==Kd;if(Qt(e))return Df(e,s);if(l==es||l==Zo||d&&!i){if(o=u||d?{}:Nd(e),!s)return u?Wf(e,Rf(o,e)):Vf(e,Lf(o,e))}else{if(!J[l])return i?e:{};o=Td(e,l,s)}}a||(a=new qe);var g=a.get(e);if(g)return g;a.set(e,o),kd(e)?e.forEach(function(v){o.add(pr(v,t,r,v,e,a))}):Rd(e)&&e.forEach(function(v,y){o.set(y,pr(v,t,r,y,e,a))});var p=c?u?Gf:xn:u?Zn:Jn,b=f?void 0:p(e);return Zl(b||e,function(v,y){b&&(y=v,v=e[y]),Mo(o,y,pr(v,t,r,y,e,a))}),o}var fg=1,dg=4;function ts(e){return pr(e,fg|dg)}var gg="__lodash_hash_undefined__";function pg(e){return this.__data__.set(e,gg),this}function hg(e){return this.__data__.has(e)}function Pr(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Ot;++t<r;)this.add(e[t])}Pr.prototype.add=Pr.prototype.push=pg;Pr.prototype.has=hg;function mg(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 vg(e,t){return e.has(t)}var yg=1,bg=2;function rs(e,t,r,n,i,a){var o=r&yg,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var l=-1,d=!0,g=r&bg?new Pr:void 0;for(a.set(e,t),a.set(t,e);++l<s;){var p=e[l],b=t[l];if(n)var v=o?n(b,p,l,t,e,a):n(p,b,l,e,t,a);if(v!==void 0){if(v)continue;d=!1;break}if(g){if(!mg(t,function(y,h){if(!vg(g,h)&&(p===y||i(p,y,r,n,a)))return g.push(h)})){d=!1;break}}else if(!(p===b||i(p,b,r,n,a))){d=!1;break}}return a.delete(e),a.delete(t),d}function Sg(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Og(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var wg=1,Eg=2,xg="[object Boolean]",Pg="[object Date]",Cg="[object Error]",Ag="[object Map]",_g="[object Number]",Tg="[object RegExp]",Ng="[object Set]",$g="[object String]",Ig="[object Symbol]",Lg="[object ArrayBuffer]",Rg="[object DataView]",oa=ct?ct.prototype:void 0,cn=oa?oa.valueOf:void 0;function Fg(e,t,r,n,i,a,o){switch(r){case Rg:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Lg:return!(e.byteLength!=t.byteLength||!a(new xr(e),new xr(t)));case xg:case Pg:case _g:return Yn(+e,+t);case Cg:return e.name==t.name&&e.message==t.message;case Tg:case $g:return e==t+"";case Ag:var s=Sg;case Ng:var u=n&wg;if(s||(s=Og),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;n|=Eg,o.set(e,t);var f=rs(s(e),s(t),n,i,a,o);return o.delete(e),f;case Ig:if(cn)return cn.call(e)==cn.call(t)}return!1}var Dg=1,Mg=Object.prototype,kg=Mg.hasOwnProperty;function jg(e,t,r,n,i,a){var o=r&Dg,s=xn(e),u=s.length,c=xn(t),f=c.length;if(u!=f&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:kg.call(t,d)))return!1}var g=a.get(e),p=a.get(t);if(g&&p)return g==t&&p==e;var b=!0;a.set(e,t),a.set(t,e);for(var v=o;++l<u;){d=s[l];var y=e[d],h=t[d];if(n)var E=o?n(h,y,d,t,e,a):n(y,h,d,e,t,a);if(!(E===void 0?y===h||i(y,h,r,n,a):E)){b=!1;break}v||(v=d=="constructor")}if(b&&!v){var A=e.constructor,w=t.constructor;A!=w&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof w=="function"&&w instanceof w)&&(b=!1)}return a.delete(e),a.delete(t),b}var Ug=1,sa="[object Arguments]",ua="[object Array]",lr="[object Object]",Vg=Object.prototype,la=Vg.hasOwnProperty;function Bg(e,t,r,n,i,a){var o=Tt(e),s=Tt(t),u=o?ua:$t(e),c=s?ua:$t(t);u=u==sa?lr:u,c=c==sa?lr:c;var f=u==lr,l=c==lr,d=u==c;if(d&&Qt(e)){if(!Qt(t))return!1;o=!0,f=!1}if(d&&!f)return a||(a=new qe),o||qn(e)?rs(e,t,r,n,i,a):Fg(e,t,u,r,n,i,a);if(!(r&Ug)){var g=f&&la.call(e,"__wrapped__"),p=l&&la.call(t,"__wrapped__");if(g||p){var b=g?e.value():e,v=p?t.value():t;return a||(a=new qe),i(b,v,r,n,a)}}return d?(a||(a=new qe),jg(e,t,r,n,i,a)):!1}function ns(e,t,r,n,i){return e===t?!0:e==null||t==null||!ft(e)&&!ft(t)?e!==e&&t!==t:Bg(e,t,r,n,ns,i)}var Hg=Math.max,Wg=Math.min;function Gg(e,t,r){return e>=Wg(t,r)&&e<Hg(t,r)}function ca(e,t,r){return t=ji(t),r===void 0?(r=t,t=0):r=ji(r),e=Ro(e),Gg(e,t,r)}var Kg="[object Map]",Yg="[object Set]",zg=Object.prototype,Qg=zg.hasOwnProperty;function Me(e){if(e==null)return!0;if(zn(e)&&(Tt(e)||typeof e=="string"||typeof e.splice=="function"||Qt(e)||qn(e)||Uo(e)))return!e.length;var t=$t(e);if(t==Kg||t==Yg)return!e.size;if(Fr(e))return!Go(e).length;for(var r in e)if(Qg.call(e,r))return!1;return!0}function qg(e,t){return ns(e,t)}const Jg=["id","selCtx","fltCtx"],is=".",as="#dot",os="#FIX_NUMBER",Zg=e=>us(ts(e),tp),Xg=e=>{const t=e.replaceAll(is,as);return/^\d+$/.test(t)?`${os}${t}`:t},ep=e=>e.replaceAll(as,is).replaceAll(os,""),tp=(e,t)=>ss(e,t,Xg),rp=(e,t)=>ss(e,t,ep),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 c=a[s];typeof a[s]=="object"&&a[s]!==null&&(c=i(a[s])),o[u]=c}return o}return Jg.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},np=e=>rp("selected",e);var fa;(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"})(fa||(fa={}));var da;(function(e){e.CAROUSEL="carousel",e.NORMAL="normal",e.IMAGE="image"})(da||(da={}));var Je;(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.STATIC="3e/static",e.REF="3e/ref",e.QUERY="3e/query",e.CMS="3e/cms"})(Je||(Je={}));var ga;(function(e){e.GROUP="group",e.PRODUCT="product"})(ga||(ga={}));var pa;(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"})(pa||(pa={}));var ha;(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"})(ha||(ha={}));var ma;(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"})(ma||(ma={}));var va;(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"})(va||(va={}));var ya;(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"})(ya||(ya={}));var ba;(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"})(ba||(ba={}));var Sa;(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"})(Sa||(Sa={}));var Oa;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(Oa||(Oa={}));var wa;(function(e){e.GROUP="group",e.PRODUCT="product"})(wa||(wa={}));var Ea;(function(e){e.ORDER_EVENT_ERROR="OrderEventError",e.ORDER_APPLIED_EVENTS="OrderAppliedEvents",e.ORDER_EVENT_FISCAL="OrderEventFiscal",e.ORDER_UPSELL="OrderUpsell"})(Ea||(Ea={}));const ip=e=>e==="true"||e===!0,ap=e=>{const t=document.getElementById(e);t?t.scrollIntoView({behavior:"smooth"}):console.warn(`Error: scrollToId: id: ${e} not found in html structure`)},cs=e=>`options--${e}`,fs=e=>{const{details:{media:t=[]}={}}=e,r=t.find(n=>n.name==="MAIN_IMG")||t[0]||{};return(r==null?void 0:r.url)||""},xa=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 ds(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===Je.OPTIONS)return i;if(i.items&&i.items.length>0){const a=ds(e,i);if(a)return a}}return null}function op(e){let t;const r=new Set,n=(c,f)=>{const l=typeof c=="function"?c(t):c;if(l!==t){const d=t;t=f?l:Object.assign({},t,l),r.forEach(g=>g(t,d))}},i=()=>t,a=(c,f=i,l=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let d=f(t);function g(){const p=f(t);if(!l(d,p)){const b=d;c(d=p,b)}}return r.add(g),()=>r.delete(g)},u={setState:n,getState:i,subscribe:(c,f,l)=>f||l?a(c,f,l):(r.add(c),()=>r.delete(c)),destroy:()=>r.clear()};return t=e(n,i,u),u}const sp=typeof window=="undefined"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Pa=sp?S.useEffect:S.useLayoutEffect;function up(e){const t=typeof e=="function"?op(e):e,r=(n=t.getState,i=Object.is)=>{const[,a]=S.useReducer(v=>v+1,0),o=t.getState(),s=S.useRef(o),u=S.useRef(n),c=S.useRef(i),f=S.useRef(!1),l=S.useRef();l.current===void 0&&(l.current=n(o));let d,g=!1;(s.current!==o||u.current!==n||c.current!==i||f.current)&&(d=n(o),g=!i(l.current,d)),Pa(()=>{g&&(l.current=d),s.current=o,u.current=n,c.current=i,f.current=!1});const p=S.useRef(o);Pa(()=>{const v=()=>{try{const h=t.getState(),E=u.current(h);c.current(l.current,E)||(s.current=h,l.current=E,a())}catch{f.current=!0,a()}},y=t.subscribe(v);return t.getState()!==p.current&&v(),y},[]);const b=g?d:l.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 lp=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}}}))}}),cp=(e,t)=>Cr(e,t,"isSelCntAllowedToIncrement")&&Cr(e,t,"isQtyCntAllowedToIncrement")&&_n(e,t,"isQtyCntAllowedToIncrement")&&_n(e,t,"isQtyCntAllowedToIncrement"),fp=(e,t,r)=>{var a;const{selCtx:n}=e;return((a=r==null?void 0:r[n])==null?void 0:a.parentKind)===Gn.PRODUCT?Ca(e,t)&&Cr(e,r,"isQtyCntAllowedToIncrement"):Ca(e,t)&&Cr(e,r,"isQtyCntAllowedToIncrement")&&_n(e,r,"isQtyCntAllowedToIncrement")},Ca=(e,t)=>{const{qtyMax:r}=e;return Number(t)<Number(r||Number.MAX_SAFE_INTEGER)},Cr=(e,t,r)=>{var a;const{selCtx:n}=e,i=(a=t==null?void 0:t[n])==null?void 0:a[r];return gs(i)?!0:i},_n=(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 gs(o)?!0:o},gs=e=>typeof e=="undefined",dp=(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]},gp=(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)},pp=(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:c,parentKind:f}=r,{qtyMin:l,qtyMax:d,selMin:g,selMax:p}=i||{};(d||p)&&e(({validationMap:v})=>({validationMap:{...v,[n]:{parentSelCtx:c,isSelCntAllowedToIncrement:a<Number(p||Number.MAX_SAFE_INTEGER),isQtyCntAllowedToIncrement:o<Number(d||Number.MAX_SAFE_INTEGER),parentKind:f,nestedLvl:u,isValid:ca(a,Number(g||0),Number(p||Number.MAX_SAFE_INTEGER)+1)&&ca(o,Number(l||0),Number(d||Number.MAX_SAFE_INTEGER)+1),isPassedFiltering:s}}}))},isInputEnabled:r=>{const n=t().validationMap;return cp(r,n)},isInputCounterIncrementEnabled:(r,n)=>{const i=t().validationMap,a=gp(r,n);return fp(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}`}))}}),hp=(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=up((e,t)=>({...lp(e),...pp(e,t),...hp(e,t)}));function ps(e,t){if(!t)return null;for(const r of t){if(r.id===e)return r;if(r.items){const n=ps(e,r.items);if(n)return n}}return null}function mp(e,t){return ps(e,t)!==null}function vp(e,t){if(t==null||Me(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=>{mp(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 yp(e){var y;const[t,r]=S.useState(Number(e.quantity)||1),n=Zg(e),{state:{filter:i={}}={}}=n,a=vp(n,(y=n.state)==null?void 0:y.selected),o=oe(h=>h.setInitialFilter),s=oe(h=>h.setInitialSelected),u=oe(h=>h.setInitialValidate),c=oe(h=>h.resetExpanded),f=oe(h=>h.filter),l=oe(h=>h.setCurrency),d=oe(h=>h.setIsOnSubmittedOnTrue);oe(h=>h.refreshFormDt);const g=oe(h=>h.getInvalidSelCtxArray),p=oe(h=>h.getValidationMap),b=()=>{r(h=>h+1)},v=()=>{t>1&&r(h=>h-1)};return S.useEffect(()=>{u(),o(i),s(a),c()},[e]),{encodedProduct:n,initSelected:a,initFilter:i,filter:f,setCurrency:l,setIsOnSubmittedOnTrue:d,getInvalidSelCtxArray:g,productQuantity:t,getValidationMap:p,increaseProductQuantity:b,decreaseProductQuantity:v}}const ti=(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 c;const u=(c=Object.keys((r==null?void 0:r[s])||{}))==null?void 0:c.filter(f=>{var l;if(((l=r==null?void 0:r[s])==null?void 0:l[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},hs=(e,t)=>{const{items:r,filter:n}=e,i=[],a=[],o=s=>{s&&!Me(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}},bp=(e,t)=>{console.log("LOG1 productsToUnselect",e),e.map(({selCtx:r,id:n})=>{t(`selected.${r}.${n}`,!1)})},ms=(e,t,r)=>{console.log("LOG1 productToSelect",e),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(y=>y.initialSelected),s=oe(y=>y.currency),{setValue:u,getValues:c}=Ye(),{selected:f={},filter:l={}}=c(),d=ti(e,l),g=oe(y=>y.isOnSubmitted),p=oe(y=>y.setValidationMap),[b,v]=dp(e.selCtx,f,e.items);return p({productSelCtx:i,attrs:a,actualQtyCnt:v,actualSelCnt:b,nestedLvl:t,isPassedFiltering:d,parentSelCtx:n,parentKind:r}),S.useEffect(()=>{const{productsToSelect:y,productsToUnselect:h}=hs(e,d);ms(y,u,o)},[d]),{isFilterValidated:d,selected:f,isOnSubmitted:g,selCnt:b,qtyCnt:v,currency:s}}var kr={exports:{}},jr={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.min.js
5
5
  *
@@ -7,9 +7,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */var bp=T.default,Sp=Symbol.for("react.element"),Op=Symbol.for("react.fragment"),wp=Object.prototype.hasOwnProperty,Ep=bp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xp={key:!0,ref:!0,__self:!0,__source:!0};function vs(e,t,r){var n,i={},a=null,o=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)wp.call(t,n)&&!xp.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:Sp,type:e,key:a,ref:o,props:i,_owner:Ep.current}}kr.Fragment=Op;kr.jsx=vs;kr.jsxs=vs;Mr.exports=kr;const C=Mr.exports.jsx,B=Mr.exports.jsxs,Ge=Mr.exports.Fragment;function Ca(e){const{isOk:t,isErr:r,info:n}=e;return B("p",{className:`${t?"text-green-600":r&&"text-red-600"} ml-1 flex`,children:[t&&Pp,r&&Cp,n]})}const Pp=C("svg",{className:"w-6 h-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:C("polyline",{points:"20 6 9 17 4 12"})}),Cp=C("svg",{className:"w-6 h-6 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","data-testid":"form-exclamation-mark",children:C("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 Ap={defaultAmount:0,defaultCurrency:"USD",defaultPrecision:2},_p={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 zt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?zt=function(t){return typeof t}:zt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zt(e)}function Aa(e){return Tp(e)||Np(e)||$p(e)||Ip()}function Tp(e){if(Array.isArray(e))return e}function Np(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function $p(e,t){if(!!e){if(typeof e=="string")return _a(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 _a(e,t)}}function _a(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 Ip(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
11
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Lp={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=Aa(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=Aa(t),n=r[0],i=r.slice(1),a=n;return i.forEach(function(o){a=a.greaterThan(o)?a:o}),a}};function ys(e){return!isNaN(parseInt(e))&&isFinite(e)}function Rp(e){return ys(e)&&e<=100&&e>=0}function Fp(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 ys(e)&&!Number.isInteger(e)}function Dp(){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 kt(e){return Math.abs(e)%1===.5}function Mp(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),kp(i,t.headers),i.send()})}function kp(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 Wt(e){return typeof e=="undefined"}function bs(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:".",r={};return Object.entries(e).forEach(function(n){if(zt(n[1])==="object"){var i=bs(n[1]);Object.entries(i).forEach(function(a){r[n[0]+t+a[0]]=a[1]})}else r[n[0]]=n[1]}),r}function jp(e){return Boolean(e)&&(zt(e)==="object"||typeof e=="function")&&typeof e.then=="function"}function Ss(){var e=function(n,i){var a=function(u){return Math.pow(10,Dp(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 kt(n)&&Ta(i)?i-1:i},HALF_EVEN:function(n){var i=Math.round(n);return kt(n)?Ta(i)?i:i-1:i},HALF_UP:function(n){return Math.round(n)},HALF_DOWN:function(n){return kt(n)?Math.floor(n):Math.round(n)},HALF_TOWARDS_ZERO:function(n){return kt(n)?Math.sign(n)*Math.floor(Math.abs(n)):Math.round(n)},HALF_AWAY_FROM_ZERO:function(n){return kt(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 Vp=Ss();function Up(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!Wt(n)}):[]},getMinimumFractionDigits:function(){var n=function(a){return a==="."};return Wt(this.getMatches().find(n))?0:this.getMatches()[Vp.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 Wt(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!Wt(this.getMatches().find(function(n){return n===","}))}}}function Bp(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 Mp(t(e.endpoint,{from:i,to:a}),{headers:e.headers})};return{getExchangeRate:function(i,a){return(jp(e.endpoint)?e.endpoint:r(i,a)).then(function(o){return bs(o)[t(e.propertyPath,{from:i,to:a})]})}}}function Zt(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Error;if(!e)throw new r(t)}function Hp(e){Zt(Rp(e),"You must provide a numeric value between 0 and 100.",RangeError)}function Wp(e){Zt(Fp(e),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}function cn(e){Zt(Number.isInteger(e),"You must provide an integer.",TypeError)}var Z=Ss(),Gp=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;cn(n),cn(a);var o=e.globalLocale,s=e.globalFormat,u=e.globalRoundingMode,f=e.globalFormatRoundingMode,c=Object.assign({},e.globalExchangeRatesApi),l=function(p){var y=Object.assign({},Object.assign({},{amount:n,currency:i,precision:a},p),Object.assign({},{locale:this.locale},p));return Object.assign(e({amount:y.amount,currency:y.currency,precision:y.precision}),{locale:y.locale})},d=function(p){Zt(this.hasSameCurrency(p),"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(p){return l.call(this,{locale:p})},getPrecision:function(){return a},convertPrecision:function(p){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f;cn(p);var v=this.getPrecision(),b=p>v,h=b?Z.multiply:Z.divide,E=b?[p,v]:[v,p],A=Math.pow(10,Z.subtract.apply(Z,E));return l.call(this,{amount:Z.round(h(this.getAmount(),A),y),precision:p})},add:function(p){d.call(this,p);var y=e.normalizePrecision([this,p]);return l.call(this,{amount:Z.add(y[0].getAmount(),y[1].getAmount()),precision:y[0].getPrecision()})},subtract:function(p){d.call(this,p);var y=e.normalizePrecision([this,p]);return l.call(this,{amount:Z.subtract(y[0].getAmount(),y[1].getAmount()),precision:y[0].getPrecision()})},multiply:function(p){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;return l.call(this,{amount:Z.round(Z.multiply(this.getAmount(),p),y)})},divide:function(p){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;return l.call(this,{amount:Z.round(Z.divide(this.getAmount(),p),y)})},percentage:function(p){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;return Hp(p),this.multiply(Z.divide(p,100),y)},allocate:function(p){var y=this;Wp(p);for(var v=p.reduce(function(A,w){return Z.add(A,w)}),b=this.getAmount(),h=p.map(function(A){var w=Math.floor(Z.divide(Z.multiply(y.getAmount(),A),v));return b=Z.subtract(b,w),l.call(y,{amount:w})}),E=0;b>0;)p[E]>0&&(h[E]=h[E].add(l.call(this,{amount:1})),b=Z.subtract(b,1)),E+=1;return h},convert:function(p){var y=this,v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b=v.endpoint,h=b===void 0?c.endpoint:b,E=v.propertyPath,A=E===void 0?c.propertyPath||"rates.{{to}}":E,w=v.headers,P=w===void 0?c.headers:w,_=v.roundingMode,L=_===void 0?u:_,F=Object.assign({},{endpoint:h,propertyPath:A,headers:P,roundingMode:L});return Bp(F).getExchangeRate(this.getCurrency(),p).then(function(k){return Zt(!Wt(k),'No rate was found for the destination currency "'.concat(p,'".'),TypeError),l.call(y,{amount:Z.round(Z.multiply(y.getAmount(),parseFloat(k)),F.roundingMode),currency:p})})},equalsTo:function(p){return this.hasSameAmount(p)&&this.hasSameCurrency(p)},lessThan:function(p){d.call(this,p);var y=e.normalizePrecision([this,p]);return y[0].getAmount()<y[1].getAmount()},lessThanOrEqual:function(p){d.call(this,p);var y=e.normalizePrecision([this,p]);return y[0].getAmount()<=y[1].getAmount()},greaterThan:function(p){d.call(this,p);var y=e.normalizePrecision([this,p]);return y[0].getAmount()>y[1].getAmount()},greaterThanOrEqual:function(p){d.call(this,p);var y=e.normalizePrecision([this,p]);return y[0].getAmount()>=y[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(p){return this.getCurrency()===p.getCurrency()},hasSameAmount:function(p){var y=e.normalizePrecision([this,p]);return y[0].getAmount()===y[1].getAmount()},toFormat:function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s,y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f,v=Up(p);return this.toRoundedUnit(v.getMinimumFractionDigits(),y).toLocaleString(this.getLocale(),{currencyDisplay:v.getCurrencyDisplay(),useGrouping:v.getUseGrouping(),minimumFractionDigits:v.getMinimumFractionDigits(),style:v.getStyle(),currency:this.getCurrency()})},toUnit:function(){return Z.divide(this.getAmount(),Math.pow(10,a))},toRoundedUnit:function(p){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f,v=Math.pow(10,p);return Z.divide(Z.round(Z.multiply(this.toUnit(),v),y),v)},toObject:function(){return{amount:n,currency:i,precision:a}},toJSON:function(){return this.toObject()}}},Kp=Object.assign(Gp,Ap,_p,Lp);const pr=(e,t="PLN")=>{e=e.toString();const r=e.replace(",","."),n=Number(r)*100;return isNaN(n)?"0.00":Kp({amount:Math.round(n),currency:t}).toFormat("0,0.00")},Yp=(e,t,r=1)=>{const n=parseFloat(e.toString());let i=!1,a=pr(`${r*n}`);const o=`${pr(`${a}`)}`;return n<parseFloat(t)&&(i=!0,a=`${pr(`${t}`)}`),{displayPriceFrom:i,formattedEndPriceWithPriceMin:a,formattedEndPrice:o}};function jr(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,f=pr(`${u}`);return!t&&i===!1?null:r?B("span",{style:{visibility:`${!t&&o?"hidden":"visible"}`},className:"",children:["\xA0",`+${f}`]}):t<s?B("span",{className:"",children:["\xA0",`od ${f}`]}):C("span",{className:"",children:f})}function zp(e,t){const{selCtx:r,id:n}=e,i=ie(s=>s.expanded),a=S.useMemo(()=>Qp(r,n,t,i),[r,n,t,i]),o=ie(s=>s.toggleExpanded);return{isExpanded:a,toggleExpanded:o}}const Qp=(e,t,r,n)=>{const i=n[e+t+r];return i!==void 0?i:!0};var qp=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Jp={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026","&#x2F;":"/","&#47;":"/"},Zp=function(t){return Jp[t]},Xp=function(t){return t.replace(qp,Zp)};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){Ke(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 _n={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Xp},Os,eh=S.createContext();function th(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_n=Ia(Ia({},_n),e)}function rh(){return _n}var nh=function(){function e(){$e(this,e),this.usedNamespaces={}}return Ie(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 ih(e){Os=e}function ah(){return Os}var oh={type:"3rdParty",init:function(t){th(t.options.react),ih(t)}};function sh(){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 La={};function Tn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];typeof t[0]=="string"&&La[t[0]]||(typeof t[0]=="string"&&(La[t[0]]=new Date),sh.apply(void 0,t))}function Ra(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 uh(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,f){var c=t.services.backendConnector.state["".concat(u,"|").concat(f)];return c===-1||c===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 lh(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return Tn("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}}):uh(e,t,r)}function ch(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,f=!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(c){f=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return s}}function fh(e,t){return Qa(e)||ch(e,t)||qa(e,t)||Ja()}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 fn(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){Ke(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 dh=function(t,r){var n=S.useRef();return S.useEffect(function(){n.current=r?n.current:t},[t,r]),n.current};function ti(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.i18n,n=S.useContext(eh)||{},i=n.i18n,a=n.defaultNS,o=r||i||ah();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new nh),!o){Tn("You will need to pass in an i18next instance by using initReactI18next");var s=function(F){return Array.isArray(F)?F[F.length-1]:F},u=[s,{},!1];return u.t=s,u.i18n={},u.ready=!1,u}o.options.react&&o.options.react.wait!==void 0&&Tn("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var f=fn(fn(fn({},rh()),o.options.react),t),c=f.useSuspense,l=f.keyPrefix,d=e||a||o.options&&o.options.defaultNS;d=typeof d=="string"?[d]:d||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(d);var g=(o.isInitialized||o.initializedStoreOnce)&&d.every(function(L){return lh(L,o,f)});function p(){return o.getFixedT(null,f.nsMode==="fallback"?d:d[0],l)}var y=S.useState(p),v=fh(y,2),b=v[0],h=v[1],E=d.join(),A=dh(E),w=S.useRef(!0);S.useEffect(function(){var L=f.bindI18n,F=f.bindI18nStore;w.current=!0,!g&&!c&&Ra(o,d,function(){w.current&&h(p)}),g&&A&&A!==E&&w.current&&h(p);function k(){w.current&&h(p)}return L&&o&&o.on(L,k),F&&o&&o.store.on(F,k),function(){w.current=!1,L&&o&&L.split(" ").forEach(function(W){return o.off(W,k)}),F&&o&&F.split(" ").forEach(function(W){return o.store.off(W,k)})}},[o,E]);var P=S.useRef(!0);S.useEffect(function(){w.current&&!P.current&&h(p),P.current=!1},[o,l]);var _=[b,o,g];if(_.t=b,_.i18n=o,_.ready=g,g||!g&&!c)return _;throw new Promise(function(L){Ra(o,d,function(){L()})})}var ws=[],gh=ws.forEach,ph=ws.slice;function hh(e){return gh.call(ph.call(arguments,1),function(t){if(t)for(var r in t)e[r]===void 0&&(e[r]=t[r])}),e}var Da=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,mh=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(!Da.test(i.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(i.domain)}if(i.path){if(!Da.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=mh(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)}},vh={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)}},yh={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}},jt=null,ka=function(){if(jt!==null)return jt;try{jt=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{jt=!1}return jt},bh={name:"localStorage",lookup:function(t){var r;if(t.lookupLocalStorage&&ka()){var n=window.localStorage.getItem(t.lookupLocalStorage);n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupLocalStorage&&ka()&&window.localStorage.setItem(r.lookupLocalStorage,t)}},Vt=null,ja=function(){if(Vt!==null)return Vt;try{Vt=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Vt=!1}return Vt},Sh={name:"sessionStorage",lookup:function(t){var r;if(t.lookupSessionStorage&&ja()){var n=window.sessionStorage.getItem(t.lookupSessionStorage);n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupSessionStorage&&ja()&&window.sessionStorage.setItem(r.lookupSessionStorage,t)}},Oh={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}},wh={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}},Eh={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}},xh={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 Ph(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var Es=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 Ie(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=hh(n,this.options||{},Ph()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(vh),this.addDetector(yh),this.addDetector(bh),this.addDetector(Sh),this.addDetector(Oh),this.addDetector(wh),this.addDetector(Eh),this.addDetector(xh)}},{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}();Es.type="languageDetector";const Ch={"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"},Ah={"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"},_h={"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"},Th={"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(Es).use(oh).init({resources:{pl:{translation:Ch},en:{translation:Ah},de:{translation:_h},cs:{translation:Th}}});const Nh=(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=Te.NOT_ENOUGHT)),s>0&&(i+=` ${n("OS.ProductConfigurator.Quantity.Message.UpTo")} ${s}`,s<r&&(a=Te.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=Te.IGNORE),r>=o&&r<=s&&(a=Te.OK),{message:i,validationStatus:a}},$h=(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=Te.NOT_ENOUGHT)),s>0&&(i+=` ${n("OS.ProductConfigurator.Selected.Message.UpTo")} ${s}`,s<r&&(a=Te.TOO_MUCH)),o>=0||s>=0?(i=`${n("OS.ProductConfigurator.Selected.Message.Choose")}${i}`,i+=` ${n("OS.ProductConfigurator.Selected.Message.Options")}`):(i="",a=Te.IGNORE),o===1&&s===1&&(i=`${n("OS.ProductConfigurator.Selected.Message.OneOption")}`),r>=o&&r<=s&&(a=Te.OK),{message:i,validationStatus:a}},Ih=e=>{const{optionsItem:t,parentSelCtx:r,selected:n,isOnSubmitted:i,actualQtyCnt:a,actualSelCnt:o,children:s}=e,{selCtx:u,details:f={},id:c,attrs:l={}}=t,{qtyMin:d,qtyMax:g,selMin:p,selMax:y}=l,{name:v,description:b}=f.literals||{},{t:h}=ti(),{isExpanded:E,toggleExpanded:A}=zp(t,r),{validationStatus:w,message:P}=$h(p,y,o,h),{validationStatus:_,message:L}=Nh(d,g,a,h),F=w===Te.OK,k=_===Te.OK,W=!F&&i&&!!P,D=!k&&i&&!!L;return B("div",{className:"pt-1 mb-3",id:ls(u),children:[B("div",{className:"flex text-xl font-semibold",children:[C("p",{className:"",children:v}),v&&v!==" "&&B(Ge,{children:[C("div",{className:"ml-auto",children:C(jr,{price:Gn(n,t)})}),C("svg",{className:`w-8 h-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:()=>A(u,c,r),children:C("polyline",{points:"18 15 12 9 6 15"})})]})]}),C("p",{className:`${b&&"mb-2"}`,children:b}),!1,C("div",{className:"flex",children:B("div",{children:[C(Ca,{isOk:F,isErr:W,info:P}),C(Ca,{isOk:k,isErr:D,info:L})]})}),C("div",{className:`${E?"block":"hidden"}`,children:s})]})},xs=T.default.createContext(null);function Vr(){const e=S.useContext(xs);if(!e)throw new Error("Missing ComponentsContext");return e}const Lh=e=>{const{optionsItem:t,parentSelCtx:r,nestedLvl:n,parentKind:i,rootProduct:a}=e,{isFilterValidated:o,selected:s,isOnSubmitted:u,selCnt:f,qtyCnt:c,currency:l}=ms(t,n,i,r),{MenuOptionsUI:d}=Vr();if(!o)return null;const g=C(ri,{productItems:t.items,parentProduct:t,rootProduct:a}),p={optionsItem:t,parentSelCtx:r,selected:s,isOnSubmitted:u,actualQtyCnt:c,actualSelCnt:f,currency:l};return d?C(d,{...p,children:g}):C(Ih,{...p,children:g})},Rh=e=>{const{product:t,inputId:r,isDisabled:n,registerProps:i,size:a="lg",children:o}=e,{details:{literals:s}={}}=t,{name:u="",description:f=""}=s||{},c=No(t),l=cs(t);return B("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:[C("input",{type:"checkbox",className:`simple-checkbox checkbox-${a} mr-4`,id:r,disabled:n,value:"1",...i}),l&&C("div",{className:"flex w-20 mr-2 max-h-24",children:C("img",{alt:"Product image",className:"h-auto max-w-full",src:l})}),C("label",{htmlFor:r,className:"flex items-center justify-between w-full",children:B("div",{className:"relative",children:[C("p",{className:"w-full text-lg font-semibold",children:u}),C("p",{className:"text-sm text-gray-600",children:f})]})}),C("div",{className:"ml-auto",children:o}),C("label",{htmlFor:r,children:C(jr,{price:parseFloat(c),addPlusBefore:!0,showIfPriceZero:!0,hiddenIfPriceZero:!0})})]})},Fh=e=>{const{product:t,inputId:r,inputValue:n,registerProps:i,isChecked:a,size:o="lg",children:s}=e,{details:{literals:u}={}}=t,{name:f="",description:c=""}=u||{},l=No(t),d=cs(t);return B("div",{className:"flex items-center justify-between p-2 pl-3 my-1 bg-white border-2 border-gray-200 rounded-xl",children:[C("input",{type:"radio",className:`simple-radio radio-${o} mr-4`,id:r,...i,value:n,checked:a}),d&&C("div",{className:"flex w-20 mr-2 max-h-24",children:C("img",{alt:"Product image",className:"h-auto max-w-full",src:d})}),C("label",{htmlFor:r,className:"flex items-center justify-between w-full",children:B("div",{className:"relative",children:[C("p",{className:"w-full text-lg font-semibold",children:f}),C("p",{className:"text-sm text-gray-600",children:c})]})}),C("div",{className:"ml-auto",children:s}),C("label",{htmlFor:r,children:C(jr,{price:parseFloat(l||"0"),addPlusBefore:!0,showIfPriceZero:!0,hiddenIfPriceZero:!0})})]})};function Ps(e){const{value:t=0,add:r,subtract:n,disabledSubtract:i,disabledAdd:a,size:o="md"}=e;return B("div",{className:`counter counter-${o} flex flex-row justify-center items-center p-1 border-[1px] rounded-md border-[rgba(229,231,235,255)] product-quantity`,children:[C("button",{type:"button",className:"quantity-button small",onClick:n,disabled:i,children:B("svg",{className:"w-4 h-4 text-black",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[C("path",{stroke:"none",d:"M0 0h24v24H0z"}),C("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),C("span",{className:"font-semibold text-gray-700 product-quantity-value",children:t}),C("button",{className:"quantity-button small",type:"button",onClick:r,disabled:a,children:B("svg",{className:"w-4 h-4 text-green-600 ",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[C("path",{stroke:"none",d:"M0 0h24v24H0z"}),C("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),C("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})]})}function Dh(e,t,r){const{watch:n,setValue:i,getValues:a,unregister:o}=Ye(),{id:s,selCtx:u,emit:f={},fltCtx:c}=e,l=n(`selected.${u}.${s}`);return S.useEffect(()=>{var y,v,b;if(!r||r>1)return;const d=`filterWithCnt.${c}`,g=`filterWithCnt.${c}.${u}`,p=`filter.${c}`;if(t&&l&&c)if(Me(f)){const h=a(g);(y=Object.keys(h||{}))==null||y.forEach(E=>{o(`${g}.${E}`);const A=Object.keys(a(d)||{});Me(A)?o(`${p}.${E}`):A.forEach(w=>{w!==u&&!a(`${d}.${w}.${E}`)&&o(`${p}.${E}`)})});return}else{const h=a(g),E=a(d);(v=Object.keys(f))==null||v.forEach(A=>{var w;(w=Object.keys(h||{}))==null||w.forEach(P=>{f[P]||(o(`${p}.${P}`),o(`${g}.${P}`))}),Object.keys(E||{}).forEach(P=>{P!==u&&A in a(d==null?void 0:d[P])&&o(`${d}.${P}.${A}`)}),i(`${p}.${A}`,f[A]),i(`${g}.${A}`,{cnt:1,value:f[A]})});return}l&&c&&!Me(f)&&((b=Object.keys(f))==null||b.forEach(h=>{i(`filter.${c}.${h}`,f[h]);const E=a(`${g}.${h}.cnt`)||0;i(`${g}.${h}`,{cnt:E+1,value:f[h]})}))},[l]),{}}function Mh(){const e=ie(n=>n.getInvalidSelCtxArray),t=ie(n=>n.isInputEnabled),r=ie(n=>n.isInputCounterIncrementEnabled);return{getInvalidSelCtxArray:e,isInputEnabled:t,isInputCounterIncrementEnabled:r}}const Va=(e,t)=>{Object.keys(e).forEach(r=>{t(`selected.${r}`,e[r])})},Nn=(e,t,r)=>{const n=t(`selected.${e}`);r(`selected.${e}`,Object.keys(n).reduce((i,a)=>(i[a]=!1,i),{}))},kh=(e,t,r,n,i,a)=>{var d,g;const{items:o,state:s,emit:u,fltCtx:f,selCtx:c}=r,{selected:l={}}=s||{};if(console.log("selected/unselected product",r,n),n){Va(l,e);const p=y=>{var v;!Array.isArray(y)||Me(s==null?void 0:s.selected)||(v=y==null?void 0:y.filter(b=>{var h,E;return!!((E=(h=s.selected)==null?void 0:h[`${b.selCtx}`])!=null&&E[`${b.id}`])}))==null||v.map(b=>{if(b.state&&"selected"in b.state){const{state:{selected:h}}=b;Va(h,e)}Array.isArray(b.items)&&p(b.items)})};p(o)}else{Object.keys(l).forEach(y=>{Nn(y,t,e)});const p=y=>{!Array.isArray(y)||y.map(v=>{const{selCtx:b}=v;t(`selected.${b}`)&&Nn(b,t,e),p(v.items)})};if(p(o),a&&a<2&&!Me(u)){(d=Object.keys(u))==null||d.forEach(h=>{const E=`filterWithCnt.${f}.${h}.${u[h]}`,A=t(E)||0;A<2?i(E):e(E,A-1)});const y=`filterWithCnt.${f}`,v=`filterWithCnt.${f}.${c}`,b=`filter.${f}`;(g=Object.keys(u))==null||g.forEach(h=>{var A,w,P;const E=t(`${v}.${h}`)||0;if(E)if(E>1)e(`${v}.${h}`,E-1);else{i(`${v}.${h}`);const _=t(y)||{},L=(A=Object.keys(_))==null?void 0:A.filter(F=>F!==c);if(!L)i(`${b}.${h}`);else{const F=L==null?void 0:L.find(k=>{var W;return!!((W=_==null?void 0:_[`${k}`])!=null&&W[`${h}`])});if(!F)i(`${b}.${h}`);else{const k=(P=(w=_==null?void 0:_[`${F}`])==null?void 0:w[`${h}`])==null?void 0:P.value;e(`${b}.${h}`,k)}}}})}}},Cs=(e,t)=>{var r;if(!e.items||Me(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===t&&i.kind===Je.PRODUCT)return i;if(i.kind===Je.OPTIONS&&i.items&&i.items.length>0){const a=Cs(i,t);if(a)return a}}return null};function jh(e,t,r){var pe;const{id:n,selCtx:i,emit:a={},fltCtx:o}=e,{allowMultiple:s,selMin:u,selMax:f}=t,{isInputEnabled:c,isInputCounterIncrementEnabled:l}=Mh(),d=ie(ee=>ee.refreshForm),g=ie(ee=>ee.currency),{watch:p,getValues:y,setValue:v,register:b,unregister:h}=Ye(),E=p(`selected.${i}.${n}`),{selected:A={}}=y(),w=Number(E||0),P=u==="1"&&f==="1";Dh(e,P,r);const _=!P,L=np(s),F=w>(P?1:0),k=l(e,A)&&(c(e)||w),W=Number(((pe=A==null?void 0:A[i])==null?void 0:pe[n])||0)>0,D=c(e)||w,j=`${P?"radio":"selected"}.${i}.${n}`,V=b(j,{onChange:ee=>{G(ee)}}),H=()=>{v(`selected.${i}.${n}`,`${w+1}`)},Q=()=>{var ce,oe;const ee=w-1;if(v(`selected.${i}.${n}`,`${ee}`),_&&ee===0){v(`selected.${i}.${n}`,!1),(ce=Object.keys(a))==null||ce.forEach(te=>{const K=`filterWithCnt.${o}.${te}.${a[te]}`,he=y(K)||0;he<2?h(K):v(K,he-1)});const fe=te=>{!Array.isArray(te)||te.map(K=>{const{selCtx:he}=K;y(`selected.${he}`)&&Nn(he,y,v),fe(K.items)})};if(fe(e.items),r&&r<2&&!Me(a)){const te=`filterWithCnt.${o}`,K=`filterWithCnt.${o}.${i}`,he=`filter.${o}`;(oe=Object.keys(a))==null||oe.forEach(ae=>{var Ae,Re,je;const Ee=y(`${K}.${ae}`)||0;if(Ee)if(Ee>1)v(`${K}.${ae}`,Ee-1);else{h(`${K}.${ae}`);const U=y(te)||{},se=(Ae=Object.keys(U))==null?void 0:Ae.filter(ne=>ne!==i);if(!se)h(`${he}.${ae}`);else{const ne=se==null?void 0:se.find(Se=>{var Gr;return!!((Gr=U==null?void 0:U[`${Se}`])!=null&&Gr[`${ae}`])});if(!ne)h(`${he}.${ae}`);else{const Se=(je=(Re=U==null?void 0:U[`${ne}`])==null?void 0:Re[`${ae}`])==null?void 0:je.value;v(`${he}.${ae}`,Se)}}}})}}},G=ee=>{const{target:{checked:ce,name:oe,defaultValue:fe}}=ee;for(const te of Object.keys(A||{}))P&&te!==(e==null?void 0:e.selCtx)&&(te==null?void 0:te.includes(e.selCtx))&&Cs(e,te)&&v(`selected.${te}`,!1);if(kh(v,y,e,ce,h,r),P){console.log("handleOnInputChange radio",oe,fe);const te="selected."+oe.replace("radio.","").split(".")[0];v(te,{[fe]:"1"}),d()}};return{registerProps:V,isRadio:P,isCheckbox:_,isCounter:L,isDecrementEnabled:F,isIncrementEnabled:k,isChecked:W,isCheckboxEnabled:D,handleCounterIncrementQty:H,handleCounterDecrementQty:Q,counterValue:w,handleOnInputChange:G,inputId:`${i}.${n}`,radioInputValue:n,currency:g}}const Vh=e=>{const{product:t,parentAttrs:r,nestedLvl:n,parentProduct:i,rootProduct:a}=e,{registerProps:o,inputId:s,radioInputValue:u,isRadio:f,isCheckbox:c,isCounter:l,isDecrementEnabled:d,isIncrementEnabled:g,isChecked:p,isCheckboxEnabled:y,counterValue:v,handleCounterIncrementQty:b,handleCounterDecrementQty:h,currency:E}=jh(t,r,n),{MenuProductUI:A}=Vr(),w={product:t,nestedLvl:n,registerProps:o,inputId:s,radioInputValue:u,isRadio:f,isCheckbox:c,isCounter:l,isDecrementEnabled:d,isIncrementEnabled:g,isChecked:p,isCheckboxEnabled:y,counterValue:v,handleCounterIncrementQty:b,handleCounterDecrementQty:h,currency:E,parentProduct:i},P=C(ri,{productItems:t.items,parentProduct:t,nestedLvl:n+1,rootProduct:a});return A?C(A,{...w,children:P}):C(Uh,{...w,children:P})},Uh=e=>{const{product:t,nestedLvl:r,registerProps:n,inputId:i,radioInputValue:a,isRadio:o,isCheckbox:s,isCounter:u,isDecrementEnabled:f,isIncrementEnabled:c,isChecked:l,isCheckboxEnabled:d,counterValue:g,handleCounterIncrementQty:p,handleCounterDecrementQty:y,children:v}=e,b=C(Ps,{value:g,add:p,subtract:y,disabledSubtract:!f,disabledAdd:!c}),h=()=>o?C(Fh,{product:t,inputId:i,inputValue:a,registerProps:n,isChecked:l,children:C(Ge,{children:u&&b})}):s?C(Rh,{product:t,inputId:i,registerProps:n,isDisabled:!d,children:C(Ge,{children:u&&b})}):null,E=!Me(t.items)&&g,A=ci.useTransition(E,{from:{opacity:0,transform:"translateY(-10px)"},enter:{opacity:1,transform:"translateY(0)"}});return B("div",{children:[h(),E?A((w,P)=>P&&C(ci.animated.div,{className:`border-l-[2px] border-gray-300 ${r>=1&&"ml-4 pl-4"}`,style:w,children:v},r+1)):null]})};function Bh(){return{isMenuProductToShow:r=>r.kind===Je.PRODUCT&&Ea(r),isMenuOptionsToShow:r=>[Je.OPTIONS,Je.CONFIG].includes(r.kind)&&Ea(r)}}function ri(e){const{productItems:t,nestedLvl:r=1,parentProduct:n,rootProduct:i}=e,{attrs:a={},selCtx:o,kind:s}=n,{isMenuProductToShow:u,isMenuOptionsToShow:f}=Bh(),{MenuItemsUI:c}=Vr(),d={productItems:t,parentProduct:n,renderMenuItem:g=>f(g)?C(Lh,{optionsItem:g,parentSelCtx:o,parentKind:s,nestedLvl:r,rootProduct:i}):u(g)?C(Vh,{product:g,parentAttrs:a,parentProduct:n,nestedLvl:r,rootProduct:i}):C(Ge,{}),rootProduct:i};return c?C(c,{...d}):C(Hh,{...d})}function Hh(e){const{productItems:t,parentProduct:r,renderMenuItem:n}=e,i=r.kind!==Je.PRODUCT,a=99,o=3,[s,u]=S.useState(i?o:a),{t:f}=ti(),c=()=>{u(a)},l=()=>{u(o)};return C(Ge,{children:t.map((d,g)=>{if(g<s)return B("div",{children:[n(d),s===a&&i&&t.length===g+1&&Ua(f("OS.ProductConfigurator.ShowLess"),l,!1)]},`${r.id}--${d.id}--${g}`);if(g===s)return Ua(f("OS.ProductConfigurator.ShowMore"),c,!0)})})}const Ua=(e,t,r)=>C("div",{className:"flex justify-center w-full",children:B("button",{className:"flex px-2 text-lg font-semibold text-black",onClick:t,children:[e,B("svg",{className:`-mr-2 w-7 h-7 ${!r&&"rotate-180"}`,width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[C("path",{stroke:"none",d:"M0 0h24v24H0z"})," ",C("polyline",{points:"7 7 12 12 17 7"})," ",C("polyline",{points:"7 13 12 18 17 13"})]})]})},`${e}`),As=()=>{const{watch:e}=Ye(),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}),B("div",{className:"flex flex-col items-center py-4",children:[C("h2",{className:"mb-4 text-2xl font-bold tracking-wide",children:"Selected State"}),Object.keys(t).map(a=>C("div",{children:Object.values(t[a]).filter(o=>o).length>0&&B(Ge,{children:[B("p",{className:"text-lg font-semibold",children:[a,":"]}),Object.keys(t[a]).map(o=>C(T.default.Fragment,{children:t[a][o]&&B("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:f}=ti();return B("div",{className:"flex items-center justify-around w-full h-16 px-4",children:[r&&B("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:[B("svg",{className:"w-5 h-5 text-red-600",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[C("path",{stroke:"none",d:"M0 0h24v24H0z"}),C("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),C("line",{x1:"5",y1:"12",x2:"11",y2:"18"}),C("line",{x1:"5",y1:"12",x2:"11",y2:"6"})]}),C("span",{className:"uppercase",children:`${f("OS.ProductConfigurator.Back")}`})]}),C("div",{className:"px-3",children:C(Ps,{value:a,add:o,subtract:s,disabledSubtract:a===1,size:"lg"})}),B("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:[B("svg",{className:"w-5 h-5 mr-2 text-white",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C("circle",{cx:"9",cy:"21",r:"1"})," ",C("circle",{cx:"20",cy:"21",r:"1"}),C("path",{d:"M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"})]}),i?C("span",{children:`${f("OS.ProductConfigurator.Selected.Message.From")} ${t}`}):C("span",{className:"uppercase",children:`${f("OS.ProductConfigurator.Add")} ${t}`})]})]})}const lr=640,_s=e=>{const{isModal:t=!1}=e,[r,n]=S.useState(window.innerWidth),[i,a]=S.useState(window.innerHeight),[o,s]=S.useState(window.innerWidth<=lr),[u,f]=S.useState(window.innerWidth>lr&&!t);function c(){n(window.innerWidth),a(window.innerHeight)}return S.useEffect(()=>(window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c)}),[]),S.useEffect(()=>{f(window.innerWidth>lr&&!t),s(window.innerWidth<=lr)},[r,e,t]),{isSm:u,isMobile:o,width:r,windowHeight:i}};function Ts(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=Ts(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Ut(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Ts(e))&&(n&&(n+=" "),n+=t);return n}var Wh=Object.defineProperty,Gh=(e,t,r)=>t in e?Wh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dn=(e,t,r)=>(Gh(e,typeof t!="symbol"?t+"":t,r),r);class Kh{constructor(){dn(this,"current",this.detect()),dn(this,"handoffState","pending"),dn(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=="undefined"||typeof document=="undefined"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}}let Ze=new Kh,Ne=(e,t)=>{Ze.isServer?S.useEffect(e,t):S.useLayoutEffect(e,t)};function Xe(e){let t=S.useRef(e);return Ne(()=>{t.current=e},[e]),t}let re=function(e){let t=Xe(e);return T.default.useCallback((...r)=>t.current(...r),[t])};function Ur(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function wt(){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 Ur(()=>{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=wt();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 ni(){let[e]=S.useState(wt);return S.useEffect(()=>()=>e.dispose(),[e]),e}function Yh(){let e=typeof document=="undefined";return"useSyncExternalStore"in st?(t=>t.useSyncExternalStore)(st)(()=>()=>{},()=>!1,()=>!e):!1}function Lt(){let e=Yh(),[t,r]=st.useState(Ze.isHandoffComplete);return t&&Ze.isHandoffComplete===!1&&r(!1),st.useEffect(()=>{t!==!0&&r(!0)},[t]),st.useEffect(()=>Ze.handoff(),[]),e?!1:t}var Ha;let Rt=(Ha=T.default.useId)!=null?Ha:function(){let e=Lt(),[t,r]=T.default.useState(e?()=>Ze.nextId():null);return Ne(()=>{t===null&&r(Ze.nextId())},[t]),t!=null?""+t:void 0};function me(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,me),n}function Ns(e){return Ze.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let $n=["[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 gt=(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))(gt||{}),$s=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))($s||{}),zh=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(zh||{});function Qh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll($n)).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 qh(e,t=0){var r;return e===((r=Ns(e))==null?void 0:r.body)?!1:me(t,{[0](){return e.matches($n)},[1](){let n=e;for(;n!==null;){if(n.matches($n))return!0;n=n.parentElement}return!1}})}var Jh=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Jh||{});typeof window!="undefined"&&typeof document!="undefined"&&(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 mt(e){e==null||e.focus({preventScroll:!0})}let Zh=["textarea","input"].join(",");function Xh(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Zh))!=null?r:!1}function em(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 hr(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?em(e):e:Qh(e);i.length>0&&o.length>1&&(o=o.filter(g=>!i.includes(g))),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")})(),f=t&32?{preventScroll:!0}:{},c=0,l=o.length,d;do{if(c>=l||c+l<=0)return 0;let g=u+c;if(t&16)g=(g+l)%l;else{if(g<0)return 3;if(g>=l)return 1}d=o[g],d==null||d.focus(f),c+=s}while(d!==a.activeElement);return t&6&&Xh(d)&&d.select(),2}function Ls(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function tm(){return/Android/gi.test(window.navigator.userAgent)}function rm(){return Ls()||tm()}function cr(e,t,r){let n=Xe(t);S.useEffect(()=>{function i(a){n.current(a)}return document.addEventListener(e,i,r),()=>document.removeEventListener(e,i,r)},[e,r])}function Rs(e,t,r){let n=Xe(t);S.useEffect(()=>{function i(a){n.current(a)}return window.addEventListener(e,i,r),()=>window.removeEventListener(e,i,r)},[e,r])}function nm(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=s(o);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let f=function c(l){return typeof l=="function"?c(l()):Array.isArray(l)||l instanceof Set?l:[l]}(e);for(let c of f){if(c===null)continue;let l=c instanceof HTMLElement?c:c.current;if(l!=null&&l.contains(u)||o.composed&&o.composedPath().includes(l))return}return!qh(u,Is.Loose)&&u.tabIndex!==-1&&o.preventDefault(),t(o,u)}let a=S.useRef(null);cr("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),cr("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),cr("click",o=>{rm()||a.current&&(i(o,()=>a.current),a.current=null)},!0),cr("touchend",o=>i(o,()=>o.target instanceof HTMLElement?o.target:null),!0),Rs("blur",o=>i(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function rr(...e){return S.useMemo(()=>Ns(...e),[...e])}let Fs=Symbol();function im(e,t=!0){return Object.assign(e,{[Fs]:t})}function ke(...e){let t=S.useRef(e);S.useEffect(()=>{t.current=e},[e]);let r=re(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[Fs]))?void 0:r}function ii(e,t){let r=S.useRef([]),n=re(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 Cr(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Ar=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Ar||{}),ot=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ot||{});function Le({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:a=!0,name:o,mergeRefs:s}){s=s!=null?s:am;let u=Ds(t,e);if(a)return fr(u,r,n,o,s);let f=i!=null?i:0;if(f&2){let{static:c=!1,...l}=u;if(c)return fr(l,r,n,o,s)}if(f&1){let{unmount:c=!0,...l}=u;return me(c?0:1,{[0](){return null},[1](){return fr({...l,hidden:!0,style:{display:"none"}},r,n,o,s)}})}return fr(u,r,n,o,s)}function fr(e,t={},r,n,i){let{as:a=r,children:o,refName:s="ref",...u}=gn(e,["unmount","static"]),f=e.ref!==void 0?{[s]:e.ref}:{},c=typeof o=="function"?o(t):o;"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(t));let l={};if(t){let d=!1,g=[];for(let[p,y]of Object.entries(t))typeof y=="boolean"&&(d=!0),y===!0&&g.push(p);d&&(l["data-headlessui-state"]=g.join(" "))}if(a===S.Fragment&&Object.keys(Wa(u)).length>0){if(!S.isValidElement(c)||Array.isArray(c)&&c.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(y=>` - ${y}`).join(`
12
- `),"","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(y=>` - ${y}`).join(`
10
+ */var Sp=T.default,Op=Symbol.for("react.element"),wp=Symbol.for("react.fragment"),Ep=Object.prototype.hasOwnProperty,xp=Sp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Pp={key:!0,ref:!0,__self:!0,__source:!0};function ys(e,t,r){var n,i={},a=null,o=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)Ep.call(t,n)&&!Pp.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:Op,type:e,key:a,ref:o,props:i,_owner:xp.current}}jr.Fragment=wp;jr.jsx=ys;jr.jsxs=ys;kr.exports=jr;const C=kr.exports.jsx,V=kr.exports.jsxs,Ge=kr.exports.Fragment;function Aa(e){const{isOk:t,isErr:r,info:n}=e;return V("p",{className:`${t?"text-green-600":r&&"text-red-600"} ml-1 flex`,children:[t&&Cp,r&&Ap,n]})}const Cp=C("svg",{className:"w-6 h-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:C("polyline",{points:"20 6 9 17 4 12"})}),Ap=C("svg",{className:"w-6 h-6 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","data-testid":"form-exclamation-mark",children:C("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 _p={defaultAmount:0,defaultCurrency:"USD",defaultPrecision:2},Tp={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 zt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?zt=function(t){return typeof t}:zt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zt(e)}function _a(e){return Np(e)||$p(e)||Ip(e)||Lp()}function Np(e){if(Array.isArray(e))return e}function $p(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function Ip(e,t){if(!!e){if(typeof e=="string")return Ta(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 Ta(e,t)}}function Ta(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 Lp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
11
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Rp={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=_a(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=_a(t),n=r[0],i=r.slice(1),a=n;return i.forEach(function(o){a=a.greaterThan(o)?a:o}),a}};function bs(e){return!isNaN(parseInt(e))&&isFinite(e)}function Fp(e){return bs(e)&&e<=100&&e>=0}function Dp(e){return e.length>0&&e.every(function(t){return t>=0})&&e.some(function(t){return t>0})}function Na(e){return e%2===0}function $a(e){return bs(e)&&!Number.isInteger(e)}function Mp(){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 kt(e){return Math.abs(e)%1===.5}function kp(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),jp(i,t.headers),i.send()})}function jp(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 Wt(e){return typeof e=="undefined"}function Ss(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:".",r={};return Object.entries(e).forEach(function(n){if(zt(n[1])==="object"){var i=Ss(n[1]);Object.entries(i).forEach(function(a){r[n[0]+t+a[0]]=a[1]})}else r[n[0]]=n[1]}),r}function Up(e){return Boolean(e)&&(zt(e)==="object"||typeof e=="function")&&typeof e.then=="function"}function Os(){var e=function(n,i){var a=function(u){return Math.pow(10,Mp(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 kt(n)&&Na(i)?i-1:i},HALF_EVEN:function(n){var i=Math.round(n);return kt(n)?Na(i)?i:i-1:i},HALF_UP:function(n){return Math.round(n)},HALF_DOWN:function(n){return kt(n)?Math.floor(n):Math.round(n)},HALF_TOWARDS_ZERO:function(n){return kt(n)?Math.sign(n)*Math.floor(Math.abs(n)):Math.round(n)},HALF_AWAY_FROM_ZERO:function(n){return kt(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 $a(n)||$a(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 Vp=Os();function Bp(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!Wt(n)}):[]},getMinimumFractionDigits:function(){var n=function(a){return a==="."};return Wt(this.getMatches().find(n))?0:this.getMatches()[Vp.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 Wt(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!Wt(this.getMatches().find(function(n){return n===","}))}}}function Hp(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 kp(t(e.endpoint,{from:i,to:a}),{headers:e.headers})};return{getExchangeRate:function(i,a){return(Up(e.endpoint)?e.endpoint:r(i,a)).then(function(o){return Ss(o)[t(e.propertyPath,{from:i,to:a})]})}}}function Zt(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Error;if(!e)throw new r(t)}function Wp(e){Zt(Fp(e),"You must provide a numeric value between 0 and 100.",RangeError)}function Gp(e){Zt(Dp(e),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}function fn(e){Zt(Number.isInteger(e),"You must provide an integer.",TypeError)}var ee=Os(),Kp=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;fn(n),fn(a);var o=e.globalLocale,s=e.globalFormat,u=e.globalRoundingMode,c=e.globalFormatRoundingMode,f=Object.assign({},e.globalExchangeRatesApi),l=function(p){var b=Object.assign({},Object.assign({},{amount:n,currency:i,precision:a},p),Object.assign({},{locale:this.locale},p));return Object.assign(e({amount:b.amount,currency:b.currency,precision:b.precision}),{locale:b.locale})},d=function(p){Zt(this.hasSameCurrency(p),"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(p){return l.call(this,{locale:p})},getPrecision:function(){return a},convertPrecision:function(p){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;fn(p);var v=this.getPrecision(),y=p>v,h=y?ee.multiply:ee.divide,E=y?[p,v]:[v,p],A=Math.pow(10,ee.subtract.apply(ee,E));return l.call(this,{amount:ee.round(h(this.getAmount(),A),b),precision:p})},add:function(p){d.call(this,p);var b=e.normalizePrecision([this,p]);return l.call(this,{amount:ee.add(b[0].getAmount(),b[1].getAmount()),precision:b[0].getPrecision()})},subtract:function(p){d.call(this,p);var b=e.normalizePrecision([this,p]);return l.call(this,{amount:ee.subtract(b[0].getAmount(),b[1].getAmount()),precision:b[0].getPrecision()})},multiply:function(p){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;return l.call(this,{amount:ee.round(ee.multiply(this.getAmount(),p),b)})},divide:function(p){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;return l.call(this,{amount:ee.round(ee.divide(this.getAmount(),p),b)})},percentage:function(p){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;return Wp(p),this.multiply(ee.divide(p,100),b)},allocate:function(p){var b=this;Gp(p);for(var v=p.reduce(function(A,w){return ee.add(A,w)}),y=this.getAmount(),h=p.map(function(A){var w=Math.floor(ee.divide(ee.multiply(b.getAmount(),A),v));return y=ee.subtract(y,w),l.call(b,{amount:w})}),E=0;y>0;)p[E]>0&&(h[E]=h[E].add(l.call(this,{amount:1})),y=ee.subtract(y,1)),E+=1;return h},convert:function(p){var b=this,v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=v.endpoint,h=y===void 0?f.endpoint:y,E=v.propertyPath,A=E===void 0?f.propertyPath||"rates.{{to}}":E,w=v.headers,P=w===void 0?f.headers:w,_=v.roundingMode,I=_===void 0?u:_,F=Object.assign({},{endpoint:h,propertyPath:A,headers:P,roundingMode:I});return Hp(F).getExchangeRate(this.getCurrency(),p).then(function(k){return Zt(!Wt(k),'No rate was found for the destination currency "'.concat(p,'".'),TypeError),l.call(b,{amount:ee.round(ee.multiply(b.getAmount(),parseFloat(k)),F.roundingMode),currency:p})})},equalsTo:function(p){return this.hasSameAmount(p)&&this.hasSameCurrency(p)},lessThan:function(p){d.call(this,p);var b=e.normalizePrecision([this,p]);return b[0].getAmount()<b[1].getAmount()},lessThanOrEqual:function(p){d.call(this,p);var b=e.normalizePrecision([this,p]);return b[0].getAmount()<=b[1].getAmount()},greaterThan:function(p){d.call(this,p);var b=e.normalizePrecision([this,p]);return b[0].getAmount()>b[1].getAmount()},greaterThanOrEqual:function(p){d.call(this,p);var b=e.normalizePrecision([this,p]);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 ee.modulo(this.getAmount(),Math.pow(10,a))!==0},hasCents:function(){return ee.modulo(this.getAmount(),Math.pow(10,a))!==0},hasSameCurrency:function(p){return this.getCurrency()===p.getCurrency()},hasSameAmount:function(p){var b=e.normalizePrecision([this,p]);return b[0].getAmount()===b[1].getAmount()},toFormat:function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c,v=Bp(p);return this.toRoundedUnit(v.getMinimumFractionDigits(),b).toLocaleString(this.getLocale(),{currencyDisplay:v.getCurrencyDisplay(),useGrouping:v.getUseGrouping(),minimumFractionDigits:v.getMinimumFractionDigits(),style:v.getStyle(),currency:this.getCurrency()})},toUnit:function(){return ee.divide(this.getAmount(),Math.pow(10,a))},toRoundedUnit:function(p){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c,v=Math.pow(10,p);return ee.divide(ee.round(ee.multiply(this.toUnit(),v),b),v)},toObject:function(){return{amount:n,currency:i,precision:a}},toJSON:function(){return this.toObject()}}},Yp=Object.assign(Kp,_p,Tp,Rp);const hr=(e,t="PLN")=>{e=e.toString();const r=e.replace(",","."),n=Number(r)*100;return isNaN(n)?"0.00":Yp({amount:Math.round(n),currency:t}).toFormat("0,0.00")},zp=(e,t,r=1)=>{const n=parseFloat(e.toString());let i=!1,a=hr(`${r*n}`);const o=`${hr(`${a}`)}`;return n<parseFloat(t)&&(i=!0,a=`${hr(`${t}`)}`),{displayPriceFrom:i,formattedEndPriceWithPriceMin:a,formattedEndPrice:o}};function Ur(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=hr(`${u}`);return!t&&i===!1?null:r?V("span",{style:{visibility:`${!t&&o?"hidden":"visible"}`},className:"",children:["\xA0",`+${c}`]}):t<s?V("span",{className:"",children:["\xA0",`od ${c}`]}):C("span",{className:"",children:c})}function Qp(e,t){const{selCtx:r,id:n}=e,i=oe(s=>s.expanded),a=S.useMemo(()=>qp(r,n,t,i),[r,n,t,i]),o=oe(s=>s.toggleExpanded);return{isExpanded:a,toggleExpanded:o}}const qp=(e,t,r,n)=>{const i=n[e+t+r];return i!==void 0?i:!0};var Jp=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Zp={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026","&#x2F;":"/","&#47;":"/"},Xp=function(t){return Zp[t]},eh=function(t){return t.replace(Jp,Xp)};function Ia(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 La(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ia(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ia(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Tn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:eh},ws,th=S.createContext();function rh(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Tn=La(La({},Tn),e)}function nh(){return Tn}var ih=function(){function e(){$e(this,e),this.usedNamespaces={}}return Ie(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 ah(e){ws=e}function oh(){return ws}var sh={type:"3rdParty",init:function(t){rh(t.options.react),ah(t)}};function uh(){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 Nn(){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),uh.apply(void 0,t))}function Fa(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 lh(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 f=t.services.backendConnector.state["".concat(u,"|").concat(c)];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 ch(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return Nn("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}}):lh(e,t,r)}function fh(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,c=!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){c=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function dh(e,t){return qa(e)||fh(e,t)||Ja(e,t)||Za()}function Da(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 dn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Da(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Da(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var gh=function(t,r){var n=S.useRef();return S.useEffect(function(){n.current=r?n.current:t},[t,r]),n.current};function ri(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.i18n,n=S.useContext(th)||{},i=n.i18n,a=n.defaultNS,o=r||i||oh();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new ih),!o){Nn("You will need to pass in an i18next instance by using initReactI18next");var s=function(F){return Array.isArray(F)?F[F.length-1]:F},u=[s,{},!1];return u.t=s,u.i18n={},u.ready=!1,u}o.options.react&&o.options.react.wait!==void 0&&Nn("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=dn(dn(dn({},nh()),o.options.react),t),f=c.useSuspense,l=c.keyPrefix,d=e||a||o.options&&o.options.defaultNS;d=typeof d=="string"?[d]:d||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(d);var g=(o.isInitialized||o.initializedStoreOnce)&&d.every(function(I){return ch(I,o,c)});function p(){return o.getFixedT(null,c.nsMode==="fallback"?d:d[0],l)}var b=S.useState(p),v=dh(b,2),y=v[0],h=v[1],E=d.join(),A=gh(E),w=S.useRef(!0);S.useEffect(function(){var I=c.bindI18n,F=c.bindI18nStore;w.current=!0,!g&&!f&&Fa(o,d,function(){w.current&&h(p)}),g&&A&&A!==E&&w.current&&h(p);function k(){w.current&&h(p)}return I&&o&&o.on(I,k),F&&o&&o.store.on(F,k),function(){w.current=!1,I&&o&&I.split(" ").forEach(function(W){return o.off(W,k)}),F&&o&&F.split(" ").forEach(function(W){return o.store.off(W,k)})}},[o,E]);var P=S.useRef(!0);S.useEffect(function(){w.current&&!P.current&&h(p),P.current=!1},[o,l]);var _=[y,o,g];if(_.t=y,_.i18n=o,_.ready=g,g||!g&&!f)return _;throw new Promise(function(I){Fa(o,d,function(){I()})})}var Es=[],ph=Es.forEach,hh=Es.slice;function mh(e){return ph.call(hh.call(arguments,1),function(t){if(t)for(var r in t)e[r]===void 0&&(e[r]=t[r])}),e}var Ma=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,vh=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(!Ma.test(i.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(i.domain)}if(i.path){if(!Ma.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},ka={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=vh(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)}},yh={name:"cookie",lookup:function(t){var r;if(t.lookupCookie&&typeof document!="undefined"){var n=ka.read(t.lookupCookie);n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupCookie&&typeof document!="undefined"&&ka.create(r.lookupCookie,t,r.cookieMinutes,r.cookieDomain,r.cookieOptions)}},bh={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}},jt=null,ja=function(){if(jt!==null)return jt;try{jt=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{jt=!1}return jt},Sh={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)}},Ut=null,Ua=function(){if(Ut!==null)return Ut;try{Ut=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Ut=!1}return Ut},Oh={name:"sessionStorage",lookup:function(t){var r;if(t.lookupSessionStorage&&Ua()){var n=window.sessionStorage.getItem(t.lookupSessionStorage);n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupSessionStorage&&Ua()&&window.sessionStorage.setItem(r.lookupSessionStorage,t)}},wh={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}},Eh={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}},xh={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}},Ph={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 Ch(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var xs=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 Ie(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=mh(n,this.options||{},Ch()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(yh),this.addDetector(bh),this.addDetector(Sh),this.addDetector(Oh),this.addDetector(wh),this.addDetector(Eh),this.addDetector(xh),this.addDetector(Ph)}},{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}();xs.type="languageDetector";const Ah={"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"},_h={"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"},Th={"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"},Nh={"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(xs).use(sh).init({resources:{pl:{translation:Ah},en:{translation:_h},de:{translation:Th},cs:{translation:Nh}}});const $h=(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=Te.NOT_ENOUGHT)),s>0&&(i+=` ${n("OS.ProductConfigurator.Quantity.Message.UpTo")} ${s}`,s<r&&(a=Te.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=Te.IGNORE),r>=o&&r<=s&&(a=Te.OK),{message:i,validationStatus:a}},Ih=(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=Te.NOT_ENOUGHT)),s>0&&(i+=` ${n("OS.ProductConfigurator.Selected.Message.UpTo")} ${s}`,s<r&&(a=Te.TOO_MUCH)),o>=0||s>=0?(i=`${n("OS.ProductConfigurator.Selected.Message.Choose")}${i}`,i+=` ${n("OS.ProductConfigurator.Selected.Message.Options")}`):(i="",a=Te.IGNORE),o===1&&s===1&&(i=`${n("OS.ProductConfigurator.Selected.Message.OneOption")}`),r>=o&&r<=s&&(a=Te.OK),{message:i,validationStatus:a}},Lh=e=>{const{optionsItem:t,parentSelCtx:r,selected:n,isOnSubmitted:i,actualQtyCnt:a,actualSelCnt:o,children:s}=e,{selCtx:u,details:c={},id:f,attrs:l={}}=t,{qtyMin:d,qtyMax:g,selMin:p,selMax:b}=l,{name:v,description:y}=c.literals||{},{t:h}=ri(),{isExpanded:E,toggleExpanded:A}=Qp(t,r),{validationStatus:w,message:P}=Ih(p,b,o,h),{validationStatus:_,message:I}=$h(d,g,a,h),F=w===Te.OK,k=_===Te.OK,W=!F&&i&&!!P,D=!k&&i&&!!I;return V("div",{className:"pt-1 mb-3",id:cs(u),children:[V("div",{className:"flex text-xl font-semibold",children:[C("p",{className:"",children:v}),v&&v!==" "&&V(Ge,{children:[C("div",{className:"ml-auto",children:C(Ur,{price:Kn(n,t)})}),C("svg",{className:`w-8 h-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:()=>A(u,f,r),children:C("polyline",{points:"18 15 12 9 6 15"})})]})]}),C("p",{className:`${y&&"mb-2"}`,children:y}),!1,C("div",{className:"flex",children:V("div",{children:[C(Aa,{isOk:F,isErr:W,info:P}),C(Aa,{isOk:k,isErr:D,info:I})]})}),C("div",{className:`${E?"block":"hidden"}`,children:s})]})},Ps=T.default.createContext(null);function Vr(){const e=S.useContext(Ps);if(!e)throw new Error("Missing ComponentsContext");return e}const Rh=e=>{const{optionsItem:t,parentSelCtx:r,nestedLvl:n,parentKind:i,rootProduct:a}=e,{isFilterValidated:o,selected:s,isOnSubmitted:u,selCnt:c,qtyCnt:f,currency:l}=vs(t,n,i,r),{MenuOptionsUI:d}=Vr();if(!o)return null;const g=C(ni,{productItems:t.items,parentProduct:t,rootProduct:a}),p={optionsItem:t,parentSelCtx:r,selected:s,isOnSubmitted:u,actualQtyCnt:f,actualSelCnt:c,currency:l};return d?C(d,{...p,children:g}):C(Lh,{...p,children:g})},Fh=e=>{const{product:t,inputId:r,isDisabled:n,registerProps:i,size:a="lg",children:o}=e,{details:{literals:s}={}}=t,{name:u="",description:c=""}=s||{},f=$o(t),l=fs(t);return 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:[C("input",{type:"checkbox",className:`simple-checkbox checkbox-${a} mr-4`,id:r,disabled:n,value:"1",...i}),l&&C("div",{className:"flex w-20 mr-2 max-h-24",children:C("img",{alt:"Product image",className:"h-auto max-w-full",src:l})}),C("label",{htmlFor:r,className:"flex items-center justify-between w-full",children:V("div",{className:"relative",children:[C("p",{className:"w-full text-lg font-semibold",children:u}),C("p",{className:"text-sm text-gray-600",children:c})]})}),C("div",{className:"ml-auto",children:o}),C("label",{htmlFor:r,children:C(Ur,{price:parseFloat(f),addPlusBefore:!0,showIfPriceZero:!0,hiddenIfPriceZero:!0})})]})},Dh=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:f=""}=u||{},l=$o(t),d=fs(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:[C("input",{type:"radio",className:`simple-radio radio-${o} mr-4`,id:r,...i,value:n,checked:a}),d&&C("div",{className:"flex w-20 mr-2 max-h-24",children:C("img",{alt:"Product image",className:"h-auto max-w-full",src:d})}),C("label",{htmlFor:r,className:"flex items-center justify-between w-full",children:V("div",{className:"relative",children:[C("p",{className:"w-full text-lg font-semibold",children:c}),C("p",{className:"text-sm text-gray-600",children:f})]})}),C("div",{className:"ml-auto",children:s}),C("label",{htmlFor:r,children:C(Ur,{price:parseFloat(l||"0"),addPlusBefore:!0,showIfPriceZero:!0,hiddenIfPriceZero:!0})})]})};function Cs(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-[1px] rounded-md border-[rgba(229,231,235,255)] product-quantity`,children:[C("button",{type:"button",className:"quantity-button small",onClick:n,disabled:i,children:V("svg",{className:"w-4 h-4 text-black",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[C("path",{stroke:"none",d:"M0 0h24v24H0z"}),C("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),C("span",{className:"font-semibold text-gray-700 product-quantity-value",children:t}),C("button",{className:"quantity-button small",type:"button",onClick:r,disabled:a,children:V("svg",{className:"w-4 h-4 text-green-600 ",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[C("path",{stroke:"none",d:"M0 0h24v24H0z"}),C("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),C("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})]})}function Mh(e,t,r){const{watch:n,setValue:i,getValues:a,unregister:o}=Ye(),{id:s,selCtx:u,emit:c={},fltCtx:f}=e,l=n(`selected.${u}.${s}`);return S.useEffect(()=>{var b,v,y;if(!r||r>1)return;const d=`filterWithCnt.${f}`,g=`filterWithCnt.${f}.${u}`,p=`filter.${f}`;if(t&&l&&f)if(Me(c)){const h=a(g);(b=Object.keys(h||{}))==null||b.forEach(E=>{o(`${g}.${E}`);const A=Object.keys(a(d)||{});Me(A)?o(`${p}.${E}`):A.forEach(w=>{w!==u&&!a(`${d}.${w}.${E}`)&&o(`${p}.${E}`)})});return}else{const h=a(g),E=a(d);(v=Object.keys(c))==null||v.forEach(A=>{var w;(w=Object.keys(h||{}))==null||w.forEach(P=>{c[P]||(o(`${p}.${P}`),o(`${g}.${P}`))}),Object.keys(E||{}).forEach(P=>{P!==u&&A in a(d==null?void 0:d[P])&&o(`${d}.${P}.${A}`)}),i(`${p}.${A}`,c[A]),i(`${g}.${A}`,{cnt:1,value:c[A]})});return}l&&f&&!Me(c)&&((y=Object.keys(c))==null||y.forEach(h=>{i(`filter.${f}.${h}`,c[h]);const E=a(`${g}.${h}.cnt`)||0;i(`${g}.${h}`,{cnt:E+1,value:c[h]})}))},[l]),{}}function kh(){const e=oe(n=>n.getInvalidSelCtxArray),t=oe(n=>n.isInputEnabled),r=oe(n=>n.isInputCounterIncrementEnabled);return{getInvalidSelCtxArray:e,isInputEnabled:t,isInputCounterIncrementEnabled:r}}const Va=(e,t)=>{Object.keys(e).forEach(r=>{t(`selected.${r}`,e[r])})},$n=(e,t,r)=>{const n=t(`selected.${e}`);console.log("changedSelCtx",n),r(`selected.${e}`,Object.keys(n).reduce((i,a)=>(i[a]=!1,i),{}))},jh=(e,t,r,n,i,a)=>{var d,g;const{items:o,state:s,emit:u,fltCtx:c,selCtx:f}=r,{selected:l={}}=s||{};if(console.log("selected/unselected product",r,n),n){Va(l,e);const p=b=>{var v;!Array.isArray(b)||Me(s==null?void 0:s.selected)||(v=b==null?void 0:b.filter(y=>{var h,E;return!!((E=(h=s.selected)==null?void 0:h[`${y.selCtx}`])!=null&&E[`${y.id}`])}))==null||v.map(y=>{if(y.state&&"selected"in y.state){const{state:{selected:h}}=y;Va(h,e)}Array.isArray(y.items)&&p(y.items)})};p(o)}else{Object.keys(l).forEach(b=>{$n(b,t,e)});const p=b=>{!Array.isArray(b)||b.map(v=>{const{selCtx:y}=v;t(`selected.${y}`)&&$n(y,t,e),p(v.items)})};if(p(o),a&&a<2&&!Me(u)){(d=Object.keys(u))==null||d.forEach(h=>{const E=`filterWithCnt.${c}.${h}.${u[h]}`,A=t(E)||0;A<2?i(E):e(E,A-1)});const b=`filterWithCnt.${c}`,v=`filterWithCnt.${c}.${f}`,y=`filter.${c}`;(g=Object.keys(u))==null||g.forEach(h=>{var A,w,P;const E=t(`${v}.${h}`)||0;if(E)if(E>1)e(`${v}.${h}`,E-1);else{i(`${v}.${h}`);const _=t(b)||{},I=(A=Object.keys(_))==null?void 0:A.filter(F=>F!==f);if(!I)i(`${y}.${h}`);else{const F=I==null?void 0:I.find(k=>{var W;return!!((W=_==null?void 0:_[`${k}`])!=null&&W[`${h}`])});if(!F)i(`${y}.${h}`);else{const k=(P=(w=_==null?void 0:_[`${F}`])==null?void 0:w[`${h}`])==null?void 0:P.value;e(`${y}.${h}`,k)}}}})}}},As=(e,t)=>{var r;if(!e.items||Me(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===Je.PRODUCT)return i;if(i.kind===Je.OPTIONS&&i.items&&i.items.length>0){const a=As(i,t);if(a)return a}}return null};function Uh(e,t,r,n){var he;const{id:i,selCtx:a,emit:o={},fltCtx:s}=e,{allowMultiple:u,selMin:c,selMax:f}=t,{isInputEnabled:l,isInputCounterIncrementEnabled:d}=kh(),g=oe(X=>X.refreshForm),p=oe(X=>X.currency),{watch:b,getValues:v,setValue:y,register:h,unregister:E}=Ye(),A=b(`selected.${a}.${i}`),{selected:w={}}=v(),P=Number(A||0),_=c==="1"&&f==="1";Mh(e,_,r);const I=!_,F=ip(u),k=P>(_?1:0),W=d(e,w)&&(l(e)||P),D=Number(((he=w==null?void 0:w[a])==null?void 0:he[i])||0)>0,j=l(e)||P,U=`${_?"radio":"selected"}.${a}.${i}`,B=h(U,{onChange:X=>{pe(X)}}),q=()=>{y(`selected.${a}.${i}`,`${P+1}`)},G=()=>{var ce,fe;const X=P-1;if(y(`selected.${a}.${i}`,`${X}`),I&&X===0){y(`selected.${a}.${i}`,!1),(ce=Object.keys(o))==null||ce.forEach(K=>{const se=`filterWithCnt.${s}.${K}.${o[K]}`,z=v(se)||0;z<2?E(se):y(se,z-1)});const xe=K=>{!Array.isArray(K)||K.map(se=>{const{selCtx:z}=se;v(`selected.${z}`)&&$n(z,v,y),xe(se.items)})};if(xe(e.items),r&&r<2&&!Me(o)){const K=`filterWithCnt.${s}`,se=`filterWithCnt.${s}.${a}`,z=`filter.${s}`;(fe=Object.keys(o))==null||fe.forEach(ae=>{var Re,je,H;const ye=v(`${se}.${ae}`)||0;if(ye)if(ye>1)y(`${se}.${ae}`,ye-1);else{E(`${se}.${ae}`);const ne=v(K)||{},ie=(Re=Object.keys(ne))==null?void 0:Re.filter(be=>be!==a);if(!ie)E(`${z}.${ae}`);else{const be=ie==null?void 0:ie.find(ar=>{var Kr;return!!((Kr=ne==null?void 0:ne[`${ar}`])!=null&&Kr[`${ae}`])});if(!be)E(`${z}.${ae}`);else{const ar=(H=(je=ne==null?void 0:ne[`${be}`])==null?void 0:je[`${ae}`])==null?void 0:H.value;y(`${z}.${ae}`,ar)}}}})}}},pe=X=>{var se;const{target:{checked:ce,name:fe,defaultValue:xe}}=X,K=(se=n==null?void 0:n.items)==null?void 0:se.filter(z=>z.id!==e.id);for(const z of Object.keys(w||{})){const ae=K!=null&&K.some(ye=>!!As(ye,z))?z:!1;console.log("isImportantItem",ae),ae&&y(`selected.${z}`,!1)}if(jh(y,v,e,ce,E,r),_){console.log("handleOnInputChange radio",fe,xe);const z="selected."+fe.replace("radio.","").split(".")[0];y(z,{[xe]:"1"}),g()}};return{registerProps:B,isRadio:_,isCheckbox:I,isCounter:F,isDecrementEnabled:k,isIncrementEnabled:W,isChecked:D,isCheckboxEnabled:j,handleCounterIncrementQty:q,handleCounterDecrementQty:G,counterValue:P,handleOnInputChange:pe,inputId:`${a}.${i}`,radioInputValue:i,currency:p}}const Vh=e=>{const{product:t,parentAttrs:r,nestedLvl:n,parentProduct:i,rootProduct:a}=e,{registerProps:o,inputId:s,radioInputValue:u,isRadio:c,isCheckbox:f,isCounter:l,isDecrementEnabled:d,isIncrementEnabled:g,isChecked:p,isCheckboxEnabled:b,counterValue:v,handleCounterIncrementQty:y,handleCounterDecrementQty:h,currency:E}=Uh(t,r,n,i),{MenuProductUI:A}=Vr(),w={product:t,nestedLvl:n,registerProps:o,inputId:s,radioInputValue:u,isRadio:c,isCheckbox:f,isCounter:l,isDecrementEnabled:d,isIncrementEnabled:g,isChecked:p,isCheckboxEnabled:b,counterValue:v,handleCounterIncrementQty:y,handleCounterDecrementQty:h,currency:E,parentProduct:i},P=C(ni,{productItems:t.items,parentProduct:t,nestedLvl:n+1,rootProduct:a});return A?C(A,{...w,children:P}):C(Bh,{...w,children:P})},Bh=e=>{const{product:t,nestedLvl:r,registerProps:n,inputId:i,radioInputValue:a,isRadio:o,isCheckbox:s,isCounter:u,isDecrementEnabled:c,isIncrementEnabled:f,isChecked:l,isCheckboxEnabled:d,counterValue:g,handleCounterIncrementQty:p,handleCounterDecrementQty:b,children:v}=e,y=C(Cs,{value:g,add:p,subtract:b,disabledSubtract:!c,disabledAdd:!f}),h=()=>o?C(Dh,{product:t,inputId:i,inputValue:a,registerProps:n,isChecked:l,children:C(Ge,{children:u&&y})}):s?C(Fh,{product:t,inputId:i,registerProps:n,isDisabled:!d,children:C(Ge,{children:u&&y})}):null,E=!Me(t.items)&&g,A=fi.useTransition(E,{from:{opacity:0,transform:"translateY(-10px)"},enter:{opacity:1,transform:"translateY(0)"}});return V("div",{children:[h(),E?A((w,P)=>P&&C(fi.animated.div,{className:`border-l-[2px] border-gray-300 ${r>=1&&"ml-4 pl-4"}`,style:w,children:v},r+1)):null]})};function Hh(){return{isMenuProductToShow:r=>r.kind===Je.PRODUCT&&xa(r),isMenuOptionsToShow:r=>[Je.OPTIONS,Je.CONFIG].includes(r.kind)&&xa(r)}}function ni(e){const{productItems:t,nestedLvl:r=1,parentProduct:n,rootProduct:i}=e,{attrs:a={},selCtx:o,kind:s}=n,{isMenuProductToShow:u,isMenuOptionsToShow:c}=Hh(),{MenuItemsUI:f}=Vr(),d={productItems:t,parentProduct:n,renderMenuItem:g=>c(g)?C(Rh,{optionsItem:g,parentSelCtx:o,parentKind:s,nestedLvl:r,rootProduct:i}):u(g)?C(Vh,{product:g,parentAttrs:a,parentProduct:n,nestedLvl:r,rootProduct:i}):C(Ge,{}),rootProduct:i};return f?C(f,{...d}):C(Wh,{...d})}function Wh(e){const{productItems:t,parentProduct:r,renderMenuItem:n}=e,i=r.kind!==Je.PRODUCT,a=99,o=3,[s,u]=S.useState(i?o:a),{t:c}=ri(),f=()=>{u(a)},l=()=>{u(o)};return C(Ge,{children:t.map((d,g)=>{if(g<s)return V("div",{children:[n(d),s===a&&i&&t.length===g+1&&Ba(c("OS.ProductConfigurator.ShowLess"),l,!1)]},`${r.id}--${d.id}--${g}`);if(g===s)return Ba(c("OS.ProductConfigurator.ShowMore"),f,!0)})})}const Ba=(e,t,r)=>C("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 w-7 h-7 ${!r&&"rotate-180"}`,width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[C("path",{stroke:"none",d:"M0 0h24v24H0z"})," ",C("polyline",{points:"7 7 12 12 17 7"})," ",C("polyline",{points:"7 13 12 18 17 13"})]})]})},`${e}`),_s=()=>{const{watch:e}=Ye(),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:[C("h2",{className:"mb-4 text-2xl font-bold tracking-wide",children:"Selected State"}),Object.keys(t).map(a=>C("div",{children:Object.values(t[a]).filter(o=>o).length>0&&V(Ge,{children:[V("p",{className:"text-lg font-semibold",children:[a,":"]}),Object.keys(t[a]).map(o=>C(T.default.Fragment,{children:t[a][o]&&V("p",{children:[o,":",t[a][o].toString()]})},o))]})},a))]})};function Ha(e){const{finalPrice:t,isBackIcon:r=!0,handleGoBack:n,displayPriceFrom:i=!1,productQuantity:a,increaseProductQuantity:o,decreaseProductQuantity:s,handleOnSubmit:u}=e,{t:c}=ri();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:"w-5 h-5 text-red-600",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[C("path",{stroke:"none",d:"M0 0h24v24H0z"}),C("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),C("line",{x1:"5",y1:"12",x2:"11",y2:"18"}),C("line",{x1:"5",y1:"12",x2:"11",y2:"6"})]}),C("span",{className:"uppercase",children:`${c("OS.ProductConfigurator.Back")}`})]}),C("div",{className:"px-3",children:C(Cs,{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:"w-5 h-5 mr-2 text-white",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C("circle",{cx:"9",cy:"21",r:"1"})," ",C("circle",{cx:"20",cy:"21",r:"1"}),C("path",{d:"M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"})]}),i?C("span",{children:`${c("OS.ProductConfigurator.Selected.Message.From")} ${t}`}):C("span",{className:"uppercase",children:`${c("OS.ProductConfigurator.Add")} ${t}`})]})]})}const cr=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<=cr),[u,c]=S.useState(window.innerWidth>cr&&!t);function f(){n(window.innerWidth),a(window.innerHeight)}return S.useEffect(()=>(window.addEventListener("resize",f),()=>{window.removeEventListener("resize",f)}),[]),S.useEffect(()=>{c(window.innerWidth>cr&&!t),s(window.innerWidth<=cr)},[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 Vt(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Ns(e))&&(n&&(n+=" "),n+=t);return n}var Gh=Object.defineProperty,Kh=(e,t,r)=>t in e?Gh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gn=(e,t,r)=>(Kh(e,typeof t!="symbol"?t+"":t,r),r);class Yh{constructor(){gn(this,"current",this.detect()),gn(this,"handoffState","pending"),gn(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=="undefined"||typeof document=="undefined"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}}let Ze=new Yh,Ne=(e,t)=>{Ze.isServer?S.useEffect(e,t):S.useLayoutEffect(e,t)};function Xe(e){let t=S.useRef(e);return Ne(()=>{t.current=e},[e]),t}let re=function(e){let t=Xe(e);return T.default.useCallback((...r)=>t.current(...r),[t])};function Br(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function wt(){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 Br(()=>{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=wt();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 ii(){let[e]=S.useState(wt);return S.useEffect(()=>()=>e.dispose(),[e]),e}function zh(){let e=typeof document=="undefined";return"useSyncExternalStore"in st?(t=>t.useSyncExternalStore)(st)(()=>()=>{},()=>!1,()=>!e):!1}function Lt(){let e=zh(),[t,r]=st.useState(Ze.isHandoffComplete);return t&&Ze.isHandoffComplete===!1&&r(!1),st.useEffect(()=>{t!==!0&&r(!0)},[t]),st.useEffect(()=>Ze.handoff(),[]),e?!1:t}var Wa;let Rt=(Wa=T.default.useId)!=null?Wa:function(){let e=Lt(),[t,r]=T.default.useState(e?()=>Ze.nextId():null);return Ne(()=>{t===null&&r(Ze.nextId())},[t]),t!=null?""+t:void 0};function me(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,me),n}function $s(e){return Ze.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let In=["[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 gt=(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))(gt||{}),Is=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Is||{}),Qh=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Qh||{});function qh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(In)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ls=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ls||{});function Jh(e,t=0){var r;return e===((r=$s(e))==null?void 0:r.body)?!1:me(t,{[0](){return e.matches(In)},[1](){let n=e;for(;n!==null;){if(n.matches(In))return!0;n=n.parentElement}return!1}})}var Zh=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Zh||{});typeof window!="undefined"&&typeof document!="undefined"&&(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 mt(e){e==null||e.focus({preventScroll:!0})}let Xh=["textarea","input"].join(",");function em(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Xh))!=null?r:!1}function tm(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 mr(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?tm(e):e:qh(e);i.length>0&&o.length>1&&(o=o.filter(g=>!i.includes(g))),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")})(),c=t&32?{preventScroll:!0}:{},f=0,l=o.length,d;do{if(f>=l||f+l<=0)return 0;let g=u+f;if(t&16)g=(g+l)%l;else{if(g<0)return 3;if(g>=l)return 1}d=o[g],d==null||d.focus(c),f+=s}while(d!==a.activeElement);return t&6&&em(d)&&d.select(),2}function Rs(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function rm(){return/Android/gi.test(window.navigator.userAgent)}function nm(){return Rs()||rm()}function fr(e,t,r){let n=Xe(t);S.useEffect(()=>{function i(a){n.current(a)}return document.addEventListener(e,i,r),()=>document.removeEventListener(e,i,r)},[e,r])}function Fs(e,t,r){let n=Xe(t);S.useEffect(()=>{function i(a){n.current(a)}return window.addEventListener(e,i,r),()=>window.removeEventListener(e,i,r)},[e,r])}function im(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=s(o);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let c=function f(l){return typeof l=="function"?f(l()):Array.isArray(l)||l instanceof Set?l:[l]}(e);for(let f of c){if(f===null)continue;let l=f instanceof HTMLElement?f:f.current;if(l!=null&&l.contains(u)||o.composed&&o.composedPath().includes(l))return}return!Jh(u,Ls.Loose)&&u.tabIndex!==-1&&o.preventDefault(),t(o,u)}let a=S.useRef(null);fr("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),fr("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),fr("click",o=>{nm()||a.current&&(i(o,()=>a.current),a.current=null)},!0),fr("touchend",o=>i(o,()=>o.target instanceof HTMLElement?o.target:null),!0),Fs("blur",o=>i(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function rr(...e){return S.useMemo(()=>$s(...e),[...e])}let Ds=Symbol();function am(e,t=!0){return Object.assign(e,{[Ds]:t})}function ke(...e){let t=S.useRef(e);S.useEffect(()=>{t.current=e},[e]);let r=re(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[Ds]))?void 0:r}function ai(e,t){let r=S.useRef([]),n=re(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 Ar(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var _r=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(_r||{}),ot=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ot||{});function Le({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:a=!0,name:o,mergeRefs:s}){s=s!=null?s:om;let u=Ms(t,e);if(a)return dr(u,r,n,o,s);let c=i!=null?i:0;if(c&2){let{static:f=!1,...l}=u;if(f)return dr(l,r,n,o,s)}if(c&1){let{unmount:f=!0,...l}=u;return me(f?0:1,{[0](){return null},[1](){return dr({...l,hidden:!0,style:{display:"none"}},r,n,o,s)}})}return dr(u,r,n,o,s)}function dr(e,t={},r,n,i){let{as:a=r,children:o,refName:s="ref",...u}=pn(e,["unmount","static"]),c=e.ref!==void 0?{[s]:e.ref}:{},f=typeof o=="function"?o(t):o;"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(t));let l={};if(t){let d=!1,g=[];for(let[p,b]of Object.entries(t))typeof b=="boolean"&&(d=!0),b===!0&&g.push(p);d&&(l["data-headlessui-state"]=g.join(" "))}if(a===S.Fragment&&Object.keys(Ga(u)).length>0){if(!S.isValidElement(f)||Array.isArray(f)&&f.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(`
12
+ `),"","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(`
13
13
  `)].join(`
14
- `));let d=c.props,g=typeof(d==null?void 0:d.className)=="function"?(...y)=>Cr(d==null?void 0:d.className(...y),u.className):Cr(d==null?void 0:d.className,u.className),p=g?{className:g}:{};return S.cloneElement(c,Object.assign({},Ds(c.props,Wa(gn(u,["ref"]))),l,f,{ref:i(c.ref,f.ref)},p))}return S.createElement(a,Object.assign({},gn(u,["ref"]),a!==S.Fragment&&f,a!==S.Fragment&&l),c)}function am(...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 Ds(...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 Ce(e){var t;return Object.assign(S.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Wa(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function gn(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let om="div";var _r=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(_r||{});function sm(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 Le({ourProps:a,theirProps:i,slot:{},defaultTag:om,name:"Hidden"})}let In=Ce(sm),ai=S.createContext(null);ai.displayName="OpenClosedContext";var Pe=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Pe||{});function oi(){return S.useContext(ai)}function um({value:e,children:t}){return T.default.createElement(ai.Provider,{value:e},t)}function lm(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window!="undefined"&&typeof document!="undefined"&&(document.addEventListener("DOMContentLoaded",t),t())}let it=[];lm(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&it[0]!==t.target&&(it.unshift(t.target),it=it.filter(r=>r!=null&&r.isConnected),it.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 cm(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&&fm(r)?!1:n}function fm(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}var Ms=(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))(Ms||{});function ks(e,t,r,n){let i=Xe(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])}function nr(){let e=S.useRef(!1);return Ne(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function js(e){let t=re(e),r=S.useRef(!1);S.useEffect(()=>(r.current=!1,()=>{r.current=!0,Ur(()=>{r.current&&t()})}),[t])}var Gt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Gt||{});function dm(){let e=S.useRef(0);return Rs("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Vs(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 gm="div";var Us=(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))(Us||{});function pm(e,t){let r=S.useRef(null),n=ke(r,t),{initialFocus:i,containers:a,features:o=30,...s}=e;Lt()||(o=1);let u=rr(r);vm({ownerDocument:u},Boolean(o&16));let f=ym({ownerDocument:u,container:r,initialFocus:i},Boolean(o&2));bm({ownerDocument:u,container:r,containers:a,previousActiveElement:f},Boolean(o&8));let c=dm(),l=re(y=>{let v=r.current;!v||(b=>b())(()=>{me(c.current,{[Gt.Forwards]:()=>{hr(v,gt.First,{skipElements:[y.relatedTarget]})},[Gt.Backwards]:()=>{hr(v,gt.Last,{skipElements:[y.relatedTarget]})}})})}),d=ni(),g=S.useRef(!1),p={ref:n,onKeyDown(y){y.key=="Tab"&&(g.current=!0,d.requestAnimationFrame(()=>{g.current=!1}))},onBlur(y){let v=Vs(a);r.current instanceof HTMLElement&&v.add(r.current);let b=y.relatedTarget;b instanceof HTMLElement&&b.dataset.headlessuiFocusGuard!=="true"&&(Bs(v,b)||(g.current?hr(r.current,me(c.current,{[Gt.Forwards]:()=>gt.Next,[Gt.Backwards]:()=>gt.Previous})|gt.WrapAround,{relativeTo:y.target}):y.target instanceof HTMLElement&&mt(y.target)))}};return T.default.createElement(T.default.Fragment,null,Boolean(o&4)&&T.default.createElement(In,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:l,features:_r.Focusable}),Le({ourProps:p,theirProps:s,defaultTag:gm,name:"FocusTrap"}),Boolean(o&4)&&T.default.createElement(In,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:l,features:_r.Focusable}))}let hm=Ce(pm),Bt=Object.assign(hm,{features:Us});function mm(e=!0){let t=S.useRef(it.slice());return ii(([r],[n])=>{n===!0&&r===!1&&Ur(()=>{t.current.splice(0)}),n===!1&&r===!0&&(t.current=it.slice())},[e,it,t]),re(()=>{var r;return(r=t.current.find(n=>n!=null&&n.isConnected))!=null?r:null})}function vm({ownerDocument:e},t){let r=mm(t);ii(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&mt(r())},[t]),js(()=>{t&&mt(r())})}function ym({ownerDocument:e,container:t,initialFocus:r},n){let i=S.useRef(null),a=nr();return ii(()=>{if(!n)return;let o=t.current;o&&Ur(()=>{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?mt(r.current):hr(o,gt.First)===$s.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),i.current=e==null?void 0:e.activeElement})},[n]),i}function bm({ownerDocument:e,container:t,containers:r,previousActiveElement:n},i){let a=nr();ks(e==null?void 0:e.defaultView,"focus",o=>{if(!i||!a.current)return;let s=Vs(r);t.current instanceof HTMLElement&&s.add(t.current);let u=n.current;if(!u)return;let f=o.target;f&&f instanceof HTMLElement?Bs(s,f)?(n.current=f,mt(f)):(o.preventDefault(),o.stopPropagation(),mt(u)):mt(n.current)},!0)}function Bs(e,t){for(let r of e)if(r.contains(t))return!0;return!1}let Hs=S.createContext(!1);function Sm(){return S.useContext(Hs)}function Ln(e){return T.default.createElement(Hs.Provider,{value:e.force},e.children)}function Om(e){let t=Sm(),r=S.useContext(Ws),n=rr(e),[i,a]=S.useState(()=>{if(!t&&r!==null||Ze.isServer)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 wm=S.Fragment;function Em(e,t){let r=e,n=S.useRef(null),i=ke(im(c=>{n.current=c}),t),a=rr(n),o=Om(n),[s]=S.useState(()=>{var c;return Ze.isServer?null:(c=a==null?void 0:a.createElement("div"))!=null?c:null}),u=S.useContext(Rn),f=Lt();return Ne(()=>{!o||!s||o.contains(s)||(s.setAttribute("data-headlessui-portal",""),o.appendChild(s))},[o,s]),Ne(()=>{if(s&&u)return u.register(s)},[u,s]),js(()=>{var c;!o||!s||(s instanceof Node&&o.contains(s)&&o.removeChild(s),o.childNodes.length<=0&&((c=o.parentElement)==null||c.removeChild(o)))}),f?!o||!s?null:eu.createPortal(Le({ourProps:{ref:i},theirProps:r,defaultTag:wm,name:"Portal"}),s):null}let xm=S.Fragment,Ws=S.createContext(null);function Pm(e,t){let{target:r,...n}=e,i={ref:ke(t)};return T.default.createElement(Ws.Provider,{value:r},Le({ourProps:i,theirProps:n,defaultTag:xm,name:"Popover.Group"}))}let Rn=S.createContext(null);function Cm(){let e=S.useContext(Rn),t=S.useRef([]),r=re(a=>(t.current.push(a),e&&e.register(a),()=>n(a))),n=re(a=>{let o=t.current.indexOf(a);o!==-1&&t.current.splice(o,1),e&&e.unregister(a)}),i=S.useMemo(()=>({register:r,unregister:n,portals:t}),[r,n,t]);return[t,S.useMemo(()=>function({children:a}){return T.default.createElement(Rn.Provider,{value:i},a)},[i])]}let Am=Ce(Em),_m=Ce(Pm),Fn=Object.assign(Am,{Group:_m});function Tm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const Nm=typeof Object.is=="function"?Object.is:Tm,{useState:$m,useEffect:Im,useLayoutEffect:Lm,useDebugValue:Rm}=st;function Fm(e,t,r){const n=t(),[{inst:i},a]=$m({inst:{value:n,getSnapshot:t}});return Lm(()=>{i.value=n,i.getSnapshot=t,pn(i)&&a({inst:i})},[e,n,t]),Im(()=>(pn(i)&&a({inst:i}),e(()=>{pn(i)&&a({inst:i})})),[e]),Rm(n),n}function pn(e){const t=e.getSnapshot,r=e.value;try{const n=t();return!Nm(r,n)}catch{return!0}}function Dm(e,t,r){return t()}const Mm=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",km=!Mm,jm=km?Dm:Fm,Vm="useSyncExternalStore"in st?(e=>e.useSyncExternalStore)(st):jm;function Um(e){return Vm(e.subscribe,e.getSnapshot,e.getSnapshot)}function Bm(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 Hm(){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 Wm(){return Ls()?{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=wt();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:f}=new URL(u.href),c=e.querySelector(f);c&&!n(c)&&(o=c)}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 Gm(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Km(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let ht=Bm(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:wt(),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:Km(r)},i=[Wm(),Hm(),Gm()];i.forEach(({before:a})=>a==null?void 0:a(n)),i.forEach(({after:a})=>a==null?void 0:a(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});ht.subscribe(()=>{let e=ht.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)&&ht.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&ht.dispatch("TEARDOWN",r)}});function Ym(e,t,r){let n=Um(ht),i=e?n.get(e):void 0,a=i?i.count>0:!1;return Ne(()=>{if(!(!e||!t))return ht.dispatch("PUSH",e,r),()=>ht.dispatch("POP",e,r)},[t,e]),a}let hn=new Map,Ht=new Map;function Ga(e,t=!0){Ne(()=>{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=Ht.get(n))!=null?o:1;if(s===1?Ht.delete(n):Ht.set(n,s-1),s!==1)return;let u=hn.get(n);u&&(u["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",u["aria-hidden"]),n.inert=u.inert,hn.delete(n))}let a=(r=Ht.get(n))!=null?r:0;return Ht.set(n,a+1),a!==0||(hn.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0),i},[e,t])}function zm({defaultContainers:e=[],portals:t,mainTreeNodeRef:r}={}){var n;let i=S.useRef((n=r==null?void 0:r.current)!=null?n:null),a=rr(i),o=re(()=>{var s,u,f;let c=[];for(let l of e)l!==null&&(l instanceof HTMLElement?c.push(l):"current"in l&&l.current instanceof HTMLElement&&c.push(l.current));if(t!=null&&t.current)for(let l of t.current)c.push(l);for(let l of(s=a==null?void 0:a.querySelectorAll("html > *, body > *"))!=null?s:[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l.id!=="headlessui-portal-root"&&(l.contains(i.current)||l.contains((f=(u=i.current)==null?void 0:u.getRootNode())==null?void 0:f.host)||c.some(d=>l.contains(d))||c.push(l));return c});return{resolveContainers:o,contains:re(s=>o().some(u=>u.contains(s))),mainTreeNodeRef:i,MainTreeNode:S.useMemo(()=>function(){return r!=null?null:T.default.createElement(In,{features:_r.Hidden,ref:i})},[i,r])}}let si=S.createContext(()=>{});si.displayName="StackContext";var Dn=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Dn||{});function Qm(){return S.useContext(si)}function qm({children:e,onUpdate:t,type:r,element:n,enabled:i}){let a=Qm(),o=re((...s)=>{t==null||t(...s),a(...s)});return Ne(()=>{let s=i===void 0||i===!0;return s&&o(0,r,n),()=>{s&&o(1,r,n)}},[o,r,n,i]),T.default.createElement(si.Provider,{value:o},e)}let Gs=S.createContext(null);function Ks(){let e=S.useContext(Gs);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,Ks),t}return e}function Jm(){let[e,t]=S.useState([]);return[e.length>0?e.join(" "):void 0,S.useMemo(()=>function(r){let n=re(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 T.default.createElement(Gs.Provider,{value:i},r.children)},[t])]}let Zm="p";function Xm(e,t){let r=Rt(),{id:n=`headlessui-description-${r}`,...i}=e,a=Ks(),o=ke(t);Ne(()=>a.register(n),[n,a.register]);let s={ref:o,...a.props,id:n};return Le({ourProps:s,theirProps:i,slot:a.slot||{},defaultTag:Zm,name:a.name||"Description"})}let ev=Ce(Xm),tv=Object.assign(ev,{});var rv=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(rv||{}),nv=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(nv||{});let iv={[0](e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Tr=S.createContext(null);Tr.displayName="DialogContext";function ir(e){let t=S.useContext(Tr);if(t===null){let r=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ir),r}return t}function av(e,t,r=()=>[document.body]){Ym(e,t,n=>{var i;return{containers:[...(i=n.containers)!=null?i:[],r]}})}function ov(e,t){return me(t.type,iv,e,t)}let sv="div",uv=Ar.RenderStrategy|Ar.Static;function lv(e,t){let r=Rt(),{id:n=`headlessui-dialog-${r}`,open:i,onClose:a,initialFocus:o,role:s="dialog",__demoMode:u=!1,...f}=e,[c,l]=S.useState(0),d=S.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(d.current||(d.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let g=oi();i===void 0&&g!==null&&(i=(g&Pe.Open)===Pe.Open);let p=S.useRef(null),y=ke(p,t),v=rr(p),b=e.hasOwnProperty("open")||g!==null,h=e.hasOwnProperty("onClose");if(!b&&!h)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!b)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!h)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,[A,w]=S.useReducer(ov,{titleId:null,descriptionId:null,panelRef:S.createRef()}),P=re(()=>a(!1)),_=re(U=>w({type:0,id:U})),L=Lt()?u?!1:E===0:!1,F=c>1,k=S.useContext(Tr)!==null,[W,D]=Cm(),j={get current(){var U;return(U=A.panelRef.current)!=null?U:p.current}},{resolveContainers:V,mainTreeNodeRef:H,MainTreeNode:Q}=zm({portals:W,defaultContainers:[j]}),G=F?"parent":"leaf",pe=g!==null?(g&Pe.Closing)===Pe.Closing:!1,ee=(()=>k||pe?!1:L)(),ce=S.useCallback(()=>{var U,se;return(se=Array.from((U=v==null?void 0:v.querySelectorAll("body > *"))!=null?U:[]).find(ne=>ne.id==="headlessui-portal-root"?!1:ne.contains(H.current)&&ne instanceof HTMLElement))!=null?se:null},[H]);Ga(ce,ee);let oe=(()=>F?!0:L)(),fe=S.useCallback(()=>{var U,se;return(se=Array.from((U=v==null?void 0:v.querySelectorAll("[data-headlessui-portal]"))!=null?U:[]).find(ne=>ne.contains(H.current)&&ne instanceof HTMLElement))!=null?se:null},[H]);Ga(fe,oe);let te=(()=>!(!L||F))();nm(V,U=>{U.preventDefault(),P()},te);let K=(()=>!(F||E!==0))();ks(v==null?void 0:v.defaultView,"keydown",U=>{K&&(U.defaultPrevented||U.key===Ms.Escape&&(U.preventDefault(),U.stopPropagation(),P()))});let he=(()=>!(pe||E!==0||k))();av(v,he,V),S.useEffect(()=>{if(E!==0||!p.current)return;let U=new ResizeObserver(se=>{for(let ne of se){let Se=ne.target.getBoundingClientRect();Se.x===0&&Se.y===0&&Se.width===0&&Se.height===0&&P()}});return U.observe(p.current),()=>U.disconnect()},[E,p,P]);let[ae,Ee]=Jm(),Ae=S.useMemo(()=>[{dialogState:E,close:P,setTitleId:_},A],[E,A,P,_]),Re=S.useMemo(()=>({open:E===0}),[E]),je={ref:y,id:n,role:s,"aria-modal":E===0?!0:void 0,"aria-labelledby":A.titleId,"aria-describedby":ae};return T.default.createElement(qm,{type:"Dialog",enabled:E===0,element:p,onUpdate:re((U,se)=>{se==="Dialog"&&me(U,{[Dn.Add]:()=>l(ne=>ne+1),[Dn.Remove]:()=>l(ne=>ne-1)})})},T.default.createElement(Ln,{force:!0},T.default.createElement(Fn,null,T.default.createElement(Tr.Provider,{value:Ae},T.default.createElement(Fn.Group,{target:p},T.default.createElement(Ln,{force:!1},T.default.createElement(Ee,{slot:Re,name:"Dialog.Description"},T.default.createElement(Bt,{initialFocus:o,containers:V,features:L?me(G,{parent:Bt.features.RestoreFocus,leaf:Bt.features.All&~Bt.features.FocusLock}):Bt.features.None},T.default.createElement(D,null,Le({ourProps:je,theirProps:f,slot:Re,defaultTag:sv,features:uv,visible:E===0,name:"Dialog"}))))))))),T.default.createElement(Q,null))}let cv="div";function fv(e,t){let r=Rt(),{id:n=`headlessui-dialog-overlay-${r}`,...i}=e,[{dialogState:a,close:o}]=ir("Dialog.Overlay"),s=ke(t),u=re(c=>{if(c.target===c.currentTarget){if(cm(c.currentTarget))return c.preventDefault();c.preventDefault(),c.stopPropagation(),o()}}),f=S.useMemo(()=>({open:a===0}),[a]);return Le({ourProps:{ref:s,id:n,"aria-hidden":!0,onClick:u},theirProps:i,slot:f,defaultTag:cv,name:"Dialog.Overlay"})}let dv="div";function gv(e,t){let r=Rt(),{id:n=`headlessui-dialog-backdrop-${r}`,...i}=e,[{dialogState:a},o]=ir("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 T.default.createElement(Ln,{force:!0},T.default.createElement(Fn,null,Le({ourProps:{ref:s,id:n,"aria-hidden":!0},theirProps:i,slot:u,defaultTag:dv,name:"Dialog.Backdrop"})))}let pv="div";function hv(e,t){let r=Rt(),{id:n=`headlessui-dialog-panel-${r}`,...i}=e,[{dialogState:a},o]=ir("Dialog.Panel"),s=ke(t,o.panelRef),u=S.useMemo(()=>({open:a===0}),[a]),f=re(c=>{c.stopPropagation()});return Le({ourProps:{ref:s,id:n,onClick:f},theirProps:i,slot:u,defaultTag:pv,name:"Dialog.Panel"})}let mv="h2";function vv(e,t){let r=Rt(),{id:n=`headlessui-dialog-title-${r}`,...i}=e,[{dialogState:a,setTitleId:o}]=ir("Dialog.Title"),s=ke(t);S.useEffect(()=>(o(n),()=>o(null)),[n,o]);let u=S.useMemo(()=>({open:a===0}),[a]);return Le({ourProps:{ref:s,id:n},theirProps:i,slot:u,defaultTag:mv,name:"Dialog.Title"})}let yv=Ce(lv),bv=Ce(gv),Sv=Ce(hv),Ov=Ce(fv),wv=Ce(vv),Ka=Object.assign(yv,{Backdrop:bv,Panel:Sv,Overlay:Ov,Title:wv,Description:tv});function Ev(e=0){let[t,r]=S.useState(e),n=nr(),i=S.useCallback(u=>{n.current&&r(f=>f|u)},[t,n]),a=S.useCallback(u=>Boolean(t&u),[t]),o=S.useCallback(u=>{n.current&&r(f=>f&~u)},[r,n]),s=S.useCallback(u=>{n.current&&r(f=>f^u)},[r]);return{flags:t,addFlag:i,hasFlag:a,removeFlag:o,toggleFlag:s}}function xv(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}function mn(e,...t){e&&t.length>0&&e.classList.add(...t)}function vn(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Pv(e,t){let r=wt();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(e),[a,o]=[n,i].map(u=>{let[f=0]=u.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,l)=>l-c);return f}),s=a+o;if(s!==0){r.group(f=>{f.setTimeout(()=>{t(),f.dispose()},s),f.addEventListener(e,"transitionrun",c=>{c.target===c.currentTarget&&f.dispose()})});let u=r.addEventListener(e,"transitionend",f=>{f.target===f.currentTarget&&(t(),u())})}else t();return r.add(()=>t()),r.dispose}function Cv(e,t,r,n){let i=r?"enter":"leave",a=wt(),o=n!==void 0?xv(n):()=>{};i==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=me(i,{enter:()=>t.enter,leave:()=>t.leave}),u=me(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),f=me(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return vn(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),mn(e,...t.base,...s,...f),a.nextFrame(()=>{vn(e,...t.base,...s,...f),mn(e,...t.base,...s,...u),Pv(e,()=>(vn(e,...t.base,...s),mn(e,...t.base,...t.entered),o()))}),a.dispose}function Av({immediate:e,container:t,direction:r,classes:n,onStart:i,onStop:a}){let o=nr(),s=ni(),u=Xe(r);Ne(()=>{e&&(u.current="enter")},[e]),Ne(()=>{let f=wt();s.add(f.dispose);let c=t.current;if(c&&u.current!=="idle"&&o.current)return f.dispose(),i.current(u.current),f.add(Cv(c,n.current,u.current==="enter",()=>{f.dispose(),a.current(u.current)})),f.dispose},[r])}function nt(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Br=S.createContext(null);Br.displayName="TransitionContext";var _v=(e=>(e.Visible="visible",e.Hidden="hidden",e))(_v||{});function Tv(){let e=S.useContext(Br);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Nv(){let e=S.useContext(Hr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Hr=S.createContext(null);Hr.displayName="NestingContext";function Wr(e){return"children"in e?Wr(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Ys(e,t){let r=Xe(e),n=S.useRef([]),i=nr(),a=ni(),o=re((g,p=ot.Hidden)=>{let y=n.current.findIndex(({el:v})=>v===g);y!==-1&&(me(p,{[ot.Unmount](){n.current.splice(y,1)},[ot.Hidden](){n.current[y].state="hidden"}}),a.microTask(()=>{var v;!Wr(n)&&i.current&&((v=r.current)==null||v.call(r))}))}),s=re(g=>{let p=n.current.find(({el:y})=>y===g);return p?p.state!=="visible"&&(p.state="visible"):n.current.push({el:g,state:"visible"}),()=>o(g,ot.Unmount)}),u=S.useRef([]),f=S.useRef(Promise.resolve()),c=S.useRef({enter:[],leave:[],idle:[]}),l=re((g,p,y)=>{u.current.splice(0),t&&(t.chains.current[p]=t.chains.current[p].filter(([v])=>v!==g)),t==null||t.chains.current[p].push([g,new Promise(v=>{u.current.push(v)})]),t==null||t.chains.current[p].push([g,new Promise(v=>{Promise.all(c.current[p].map(([b,h])=>h)).then(()=>v())})]),p==="enter"?f.current=f.current.then(()=>t==null?void 0:t.wait.current).then(()=>y(p)):y(p)}),d=re((g,p,y)=>{Promise.all(c.current[p].splice(0).map(([v,b])=>b)).then(()=>{var v;(v=u.current.shift())==null||v()}).then(()=>y(p))});return S.useMemo(()=>({children:n,register:s,unregister:o,onStart:l,onStop:d,wait:f,chains:c}),[s,o,n,l,d,c,f])}function $v(){}let Iv=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Ya(e){var t;let r={};for(let n of Iv)r[n]=(t=e[n])!=null?t:$v;return r}function Lv(e){let t=S.useRef(Ya(e));return S.useEffect(()=>{t.current=Ya(e)},[e]),t}let Rv="div",zs=Ar.RenderStrategy;function Fv(e,t){var r,n;let{beforeEnter:i,afterEnter:a,beforeLeave:o,afterLeave:s,enter:u,enterFrom:f,enterTo:c,entered:l,leave:d,leaveFrom:g,leaveTo:p,...y}=e,v=S.useRef(null),b=ke(v,t),h=(r=y.unmount)==null||r?ot.Unmount:ot.Hidden,{show:E,appear:A,initial:w}=Tv(),[P,_]=S.useState(E?"visible":"hidden"),L=Nv(),{register:F,unregister:k}=L;S.useEffect(()=>F(v),[F,v]),S.useEffect(()=>{if(h===ot.Hidden&&v.current){if(E&&P!=="visible"){_("visible");return}return me(P,{hidden:()=>k(v),visible:()=>F(v)})}},[P,v,F,k,E,h]);let W=Xe({base:nt(y.className),enter:nt(u),enterFrom:nt(f),enterTo:nt(c),entered:nt(l),leave:nt(d),leaveFrom:nt(g),leaveTo:nt(p)}),D=Lv({beforeEnter:i,afterEnter:a,beforeLeave:o,afterLeave:s}),j=Lt();S.useEffect(()=>{if(j&&P==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,P,j]);let V=w&&!A,H=A&&E&&w,Q=(()=>!j||V?"idle":E?"enter":"leave")(),G=Ev(0),pe=re(K=>me(K,{enter:()=>{G.addFlag(Pe.Opening),D.current.beforeEnter()},leave:()=>{G.addFlag(Pe.Closing),D.current.beforeLeave()},idle:()=>{}})),ee=re(K=>me(K,{enter:()=>{G.removeFlag(Pe.Opening),D.current.afterEnter()},leave:()=>{G.removeFlag(Pe.Closing),D.current.afterLeave()},idle:()=>{}})),ce=Ys(()=>{_("hidden"),k(v)},L),oe=S.useRef(!1);Av({immediate:H,container:v,classes:W,direction:Q,onStart:Xe(K=>{oe.current=!0,ce.onStart(v,K,pe)}),onStop:Xe(K=>{oe.current=!1,ce.onStop(v,K,ee),K==="leave"&&!Wr(ce)&&(_("hidden"),k(v))})});let fe=y,te={ref:b};return H?fe={...fe,className:Cr(y.className,...W.current.enter,...W.current.enterFrom)}:oe.current&&(fe.className=Cr(y.className,(n=v.current)==null?void 0:n.className),fe.className===""&&delete fe.className),T.default.createElement(Hr.Provider,{value:ce},T.default.createElement(um,{value:me(P,{visible:Pe.Open,hidden:Pe.Closed})|G.flags},Le({ourProps:te,theirProps:fe,defaultTag:Rv,features:zs,visible:P==="visible",name:"Transition.Child"})))}function Dv(e,t){let{show:r,appear:n=!1,unmount:i=!0,...a}=e,o=S.useRef(null),s=ke(o,t);Lt();let u=oi();if(r===void 0&&u!==null&&(r=(u&Pe.Open)===Pe.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,c]=S.useState(r?"visible":"hidden"),l=Ys(()=>{c("hidden")}),[d,g]=S.useState(!0),p=S.useRef([r]);Ne(()=>{d!==!1&&p.current[p.current.length-1]!==r&&(p.current.push(r),g(!1))},[p,r]);let y=S.useMemo(()=>({show:r,appear:n,initial:d}),[r,n,d]);S.useEffect(()=>{if(r)c("visible");else if(!Wr(l))c("hidden");else{let E=o.current;if(!E)return;let A=E.getBoundingClientRect();A.x===0&&A.y===0&&A.width===0&&A.height===0&&c("hidden")}},[r,l]);let v={unmount:i},b=re(()=>{var E;d&&g(!1),(E=e.beforeEnter)==null||E.call(e)}),h=re(()=>{var E;d&&g(!1),(E=e.beforeLeave)==null||E.call(e)});return T.default.createElement(Hr.Provider,{value:l},T.default.createElement(Br.Provider,{value:y},Le({ourProps:{...v,as:S.Fragment,children:T.default.createElement(Qs,{ref:s,...v,...a,beforeEnter:b,beforeLeave:h})},theirProps:{},defaultTag:S.Fragment,features:zs,visible:f==="visible",name:"Transition"})))}function Mv(e,t){let r=S.useContext(Br)!==null,n=oi()!==null;return T.default.createElement(T.default.Fragment,null,!r&&n?T.default.createElement(Mn,{ref:t,...e}):T.default.createElement(Qs,{ref:t,...e}))}let Mn=Ce(Dv),Qs=Ce(Fv),kv=Ce(Mv),yn=Object.assign(Mn,{Child:kv,Root:Mn});function jv(e){const{children:t,isOpen:r,handleClose:n}=e,{isMobile:i}=_s({isModal:!0});return C(Ge,{children:C(yn,{appear:!0,show:r,as:S.Fragment,children:C(Ka,{as:"div",className:"fixed inset-0 z-10 overflow-y-auto",style:{backgroundColor:"rgba(0,0,0,.75)"},onClose:n,children:B("div",{className:"min-h-screen text-center sm:px-4",children:[C(yn.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:C(Ka.Overlay,{className:"fixed inset-0"})}),C("span",{className:"inline-block h-screen align-middle","aria-hidden":"true",children:"\u200B"}),C(yn.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:B("div",{id:"modal-content",className:"inline-block overflow-hidden sm:rounded-2xl align-middle transition-all bg-white sm:shadow-xl h-[100vh] sm:h-auto sm:max-h-[90vh] w-full sm:w-[640px]",children:[C("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:C("div",{className:"",children:B("svg",{className:"w-8 h-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:[C("path",{stroke:"none",d:"M0 0h24v24H0z"})," ",C("line",{x1:"5",y1:"12",x2:"19",y2:"12"})," ",C("line",{x1:"5",y1:"12",x2:"11",y2:"18"})," ",C("line",{x1:"5",y1:"12",x2:"11",y2:"6"})]})})}),C("div",{className:"w-full",style:{height:`${i?"calc(100% - 56px)":"auto"}`},children:t})]})})]})})})})}function Vv(e){var V,H,Q,G;const{product:t,isOpen:r,handleGoBack:n,showDebugState:i=!1,countedProductPrice:a,productQuantity:o,increaseProductQuantity:s,decreaseProductQuantity:u,handleOnSubmit:f,children:c}=e,{minPrice:l="0"}=t,[d,g]=S.useState("auto"),[p,y]=S.useState(0);S.useEffect(()=>{y(1);const pe=setTimeout(()=>{w||y(2)},250);return()=>{clearTimeout(pe)}},[]);const{displayPriceFrom:v,formattedEndPrice:b}=Yp(a,l,o),h=S.useRef(),E=S.useRef(),{isSm:A,isMobile:w,windowHeight:P}=_s({isModal:!0}),_=B(Ge,{children:[B("div",{className:Ut("px-4 w-full",A&&"sm:sticky sm:top-0 sm:w-2/5"),ref:h,children:[t.details.media&&t.details.media[0].url&&C("img",{className:Ut("mx-auto mt-2 mb-6 max-h-[250px]",A&&"max-h-[450px]"),alt:t.details.literals.name,src:(V=t.details)==null?void 0:V.media[0].url}),C("div",{className:Ut(!i&&"hidden"),children:C(As,{})})]}),B("div",{className:Ut("w-full",A&&"sm:w-3/5"),ref:E,children:[B("div",{className:"items-center w-full p-4",children:[B("div",{className:"flex justify-between w-full mb-4 text-2xl font-semibold",children:[B("span",{className:"",children:[t.details.literals.name," "]}),C(jr,{price:e.countedProductPrice,minPrice:l})]}),C("span",{className:"text-gray-600",children:(H=t.details.literals)==null?void 0:H.description})]}),B("div",{className:`items-center justify-center w-full px-4 product-configuration ${(t==null?void 0:t.items)&&"py-2 bg-gray-100"}`,children:[c,C("div",{className:"sm:h-[64px]"})]}),A&&C("div",{className:"-mt-5 mb-2 bg-gray-100",children:C(Ba,{finalPrice:b,isBackIcon:!1,handleGoBack:n,displayPriceFrom:v})})]})]}),L=(Q=h==null?void 0:h.current)==null?void 0:Q.clientHeight,F=(G=E==null?void 0:E.current)==null?void 0:G.clientHeight,k=L+F;k>window.innerHeight*.8||isNaN(k)?d!=="80vh"&&g("80vh"):d!=="auto"&&g("auto");const W=`${P-64-56}px`,D=!A,j={"--mobile-submit-row-top":`${P-64-80}px`};return C(jv,{isOpen:Boolean(r),handleClose:n,children:B("div",{id:"product-configurator-view",className:"w-full h-full",style:{overflow:"hidden",textAlign:"left"},children:[C("div",{className:Ut("flex relative flex-col items-start w-full form-body stretch",!D&&"sm:flex-row-reverse sm:pb-0",!w&&"mobile-scrollbar"),style:{height:`${w?W:d}`,minHeight:"400px",overflowY:"scroll"},children:_}),D&&C("div",{className:`w-full h-16 bg-white sm:fixed sm:bottom-0 ${w?"submit-row-mobile":"submit-row"}`,style:j,children:C(Ba,{handleGoBack:n,finalPrice:b,isBackIcon:!1,productQuantity:o,increaseProductQuantity:s,decreaseProductQuantity:u,handleOnSubmit:f})})]})})}const Uv=e=>{const{product:t}=e,{MenuProductRootUI:r}=Vr(),n=Me(t.items)?C(Ge,{}):C(ri,{productItems:t.items,parentProduct:t,rootProduct:t});return r?C(r,{...e,children:n}):C(Vv,{...e,children:n})};const qs=T.default.createContext(null);function Bv({rootProduct:e,children:t}){return C(qs.Provider,{value:{rootProduct:e},children:t})}function Hv(){const e=S.useContext(qs);if(!e)throw new Error("Missing ComponentsContext");return e}function Wv(e){const{product:t,lang:r="en",handleAddToCart:n,handleGoBack:i,isOpen:a,handleClose:o,currency:s,showDebugState:u=!1}=e,{price:f}=t,{encodedProduct:c,initSelected:l,initFilter:d,productQuantity:g,setIsOnSubmittedOnTrue:p,getInvalidSelCtxArray:y,getValidationMap:v,increaseProductQuantity:b,decreaseProductQuantity:h,setCurrency:E}=vp(t),[A,w]=S.useState(v());S.useEffect(()=>{ve.changeLanguage(r)},[r]),S.useEffect(()=>{E(s)},[s]),S.useEffect(()=>{const W=v();Qg(W,A)||w(W)});const P=Eo({defaultValues:{selected:l,filter:d}}),{getValues:_}=P,L=Number((parseFloat(f||"0")+Gn(_("selected"),c)).toFixed(2)),F=()=>{var D;console.log("onSubmit"),p();const W=y();if(W.length)ip(ls(W[0])),console.log({invalidContextNames:W});else{console.log("selected",_("selected"));const j=rp(us(_("selected"))),V=_("filter");(D=Object.keys(j||{}))==null||D.forEach(H=>{const Q=fs(H,t);Q&&(ei(Q,V)||delete j[H])}),console.log("decodedCleanedSelected: ",j),n({price:L,quantity:g,selected:j,filter:V})}},k=()=>F();return C(Ge,{children:C(Bv,{rootProduct:t,children:C(xs.Provider,{value:e.components,children:C(oo,{...P,children:B("form",{children:[u&&C("div",{className:"hidden",children:C(As,{})}),C(Uv,{product:c,productQuantity:g,validationMap:A,isOpen:a,handleClose:o,handleGoBack:i,handleOnSubmit:k,countedProductPrice:L,countedProductTotalPrice:L*g,increaseProductQuantity:b,decreaseProductQuantity:h,currency:s})]})})})})})}exports.ContextType=Hn;exports.MainView=xo;exports.ProductConfigurator=Wv;exports.ProductKinds=Wn;exports.ProductTypes=Po;exports.SelMinSelMaxStatus=Te;exports.getProductToChangeInForm=ps;exports.hookForm=Zu;exports.selectProductsInForm=hs;exports.unselectProductsInForm=yp;exports.useMenuOptions=ms;exports.useProductData=Hv;exports.validateProductFilter=ei;
14
+ `));let d=f.props,g=typeof(d==null?void 0:d.className)=="function"?(...b)=>Ar(d==null?void 0:d.className(...b),u.className):Ar(d==null?void 0:d.className,u.className),p=g?{className:g}:{};return S.cloneElement(f,Object.assign({},Ms(f.props,Ga(pn(u,["ref"]))),l,c,{ref:i(f.ref,c.ref)},p))}return S.createElement(a,Object.assign({},pn(u,["ref"]),a!==S.Fragment&&c,a!==S.Fragment&&l),f)}function om(...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 Ms(...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 Ae(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 pn(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let sm="div";var Tr=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Tr||{});function um(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 Le({ourProps:a,theirProps:i,slot:{},defaultTag:sm,name:"Hidden"})}let Ln=Ae(um),oi=S.createContext(null);oi.displayName="OpenClosedContext";var Ce=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ce||{});function si(){return S.useContext(oi)}function lm({value:e,children:t}){return T.default.createElement(oi.Provider,{value:e},t)}function cm(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window!="undefined"&&typeof document!="undefined"&&(document.addEventListener("DOMContentLoaded",t),t())}let it=[];cm(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&it[0]!==t.target&&(it.unshift(t.target),it=it.filter(r=>r!=null&&r.isConnected),it.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 fm(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&&dm(r)?!1:n}function dm(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}var ks=(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))(ks||{});function js(e,t,r,n){let i=Xe(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])}function nr(){let e=S.useRef(!1);return Ne(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Us(e){let t=re(e),r=S.useRef(!1);S.useEffect(()=>(r.current=!1,()=>{r.current=!0,Br(()=>{r.current&&t()})}),[t])}var Gt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Gt||{});function gm(){let e=S.useRef(0);return Fs("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Vs(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 pm="div";var Bs=(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))(Bs||{});function hm(e,t){let r=S.useRef(null),n=ke(r,t),{initialFocus:i,containers:a,features:o=30,...s}=e;Lt()||(o=1);let u=rr(r);ym({ownerDocument:u},Boolean(o&16));let c=bm({ownerDocument:u,container:r,initialFocus:i},Boolean(o&2));Sm({ownerDocument:u,container:r,containers:a,previousActiveElement:c},Boolean(o&8));let f=gm(),l=re(b=>{let v=r.current;!v||(y=>y())(()=>{me(f.current,{[Gt.Forwards]:()=>{mr(v,gt.First,{skipElements:[b.relatedTarget]})},[Gt.Backwards]:()=>{mr(v,gt.Last,{skipElements:[b.relatedTarget]})}})})}),d=ii(),g=S.useRef(!1),p={ref:n,onKeyDown(b){b.key=="Tab"&&(g.current=!0,d.requestAnimationFrame(()=>{g.current=!1}))},onBlur(b){let v=Vs(a);r.current instanceof HTMLElement&&v.add(r.current);let y=b.relatedTarget;y instanceof HTMLElement&&y.dataset.headlessuiFocusGuard!=="true"&&(Hs(v,y)||(g.current?mr(r.current,me(f.current,{[Gt.Forwards]:()=>gt.Next,[Gt.Backwards]:()=>gt.Previous})|gt.WrapAround,{relativeTo:b.target}):b.target instanceof HTMLElement&&mt(b.target)))}};return T.default.createElement(T.default.Fragment,null,Boolean(o&4)&&T.default.createElement(Ln,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:l,features:Tr.Focusable}),Le({ourProps:p,theirProps:s,defaultTag:pm,name:"FocusTrap"}),Boolean(o&4)&&T.default.createElement(Ln,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:l,features:Tr.Focusable}))}let mm=Ae(hm),Bt=Object.assign(mm,{features:Bs});function vm(e=!0){let t=S.useRef(it.slice());return ai(([r],[n])=>{n===!0&&r===!1&&Br(()=>{t.current.splice(0)}),n===!1&&r===!0&&(t.current=it.slice())},[e,it,t]),re(()=>{var r;return(r=t.current.find(n=>n!=null&&n.isConnected))!=null?r:null})}function ym({ownerDocument:e},t){let r=vm(t);ai(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&mt(r())},[t]),Us(()=>{t&&mt(r())})}function bm({ownerDocument:e,container:t,initialFocus:r},n){let i=S.useRef(null),a=nr();return ai(()=>{if(!n)return;let o=t.current;o&&Br(()=>{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?mt(r.current):mr(o,gt.First)===Is.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),i.current=e==null?void 0:e.activeElement})},[n]),i}function Sm({ownerDocument:e,container:t,containers:r,previousActiveElement:n},i){let a=nr();js(e==null?void 0:e.defaultView,"focus",o=>{if(!i||!a.current)return;let s=Vs(r);t.current instanceof HTMLElement&&s.add(t.current);let u=n.current;if(!u)return;let c=o.target;c&&c instanceof HTMLElement?Hs(s,c)?(n.current=c,mt(c)):(o.preventDefault(),o.stopPropagation(),mt(u)):mt(n.current)},!0)}function Hs(e,t){for(let r of e)if(r.contains(t))return!0;return!1}let Ws=S.createContext(!1);function Om(){return S.useContext(Ws)}function Rn(e){return T.default.createElement(Ws.Provider,{value:e.force},e.children)}function wm(e){let t=Om(),r=S.useContext(Gs),n=rr(e),[i,a]=S.useState(()=>{if(!t&&r!==null||Ze.isServer)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 Em=S.Fragment;function xm(e,t){let r=e,n=S.useRef(null),i=ke(am(f=>{n.current=f}),t),a=rr(n),o=wm(n),[s]=S.useState(()=>{var f;return Ze.isServer?null:(f=a==null?void 0:a.createElement("div"))!=null?f:null}),u=S.useContext(Fn),c=Lt();return Ne(()=>{!o||!s||o.contains(s)||(s.setAttribute("data-headlessui-portal",""),o.appendChild(s))},[o,s]),Ne(()=>{if(s&&u)return u.register(s)},[u,s]),Us(()=>{var f;!o||!s||(s instanceof Node&&o.contains(s)&&o.removeChild(s),o.childNodes.length<=0&&((f=o.parentElement)==null||f.removeChild(o)))}),c?!o||!s?null:tu.createPortal(Le({ourProps:{ref:i},theirProps:r,defaultTag:Em,name:"Portal"}),s):null}let Pm=S.Fragment,Gs=S.createContext(null);function Cm(e,t){let{target:r,...n}=e,i={ref:ke(t)};return T.default.createElement(Gs.Provider,{value:r},Le({ourProps:i,theirProps:n,defaultTag:Pm,name:"Popover.Group"}))}let Fn=S.createContext(null);function Am(){let e=S.useContext(Fn),t=S.useRef([]),r=re(a=>(t.current.push(a),e&&e.register(a),()=>n(a))),n=re(a=>{let o=t.current.indexOf(a);o!==-1&&t.current.splice(o,1),e&&e.unregister(a)}),i=S.useMemo(()=>({register:r,unregister:n,portals:t}),[r,n,t]);return[t,S.useMemo(()=>function({children:a}){return T.default.createElement(Fn.Provider,{value:i},a)},[i])]}let _m=Ae(xm),Tm=Ae(Cm),Dn=Object.assign(_m,{Group:Tm});function Nm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const $m=typeof Object.is=="function"?Object.is:Nm,{useState:Im,useEffect:Lm,useLayoutEffect:Rm,useDebugValue:Fm}=st;function Dm(e,t,r){const n=t(),[{inst:i},a]=Im({inst:{value:n,getSnapshot:t}});return Rm(()=>{i.value=n,i.getSnapshot=t,hn(i)&&a({inst:i})},[e,n,t]),Lm(()=>(hn(i)&&a({inst:i}),e(()=>{hn(i)&&a({inst:i})})),[e]),Fm(n),n}function hn(e){const t=e.getSnapshot,r=e.value;try{const n=t();return!$m(r,n)}catch{return!0}}function Mm(e,t,r){return t()}const km=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",jm=!km,Um=jm?Mm:Dm,Vm="useSyncExternalStore"in st?(e=>e.useSyncExternalStore)(st):Um;function Bm(e){return Vm(e.subscribe,e.getSnapshot,e.getSnapshot)}function Hm(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 Wm(){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 Gm(){return Rs()?{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=wt();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),f=e.querySelector(c);f&&!n(f)&&(o=f)}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 Km(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Ym(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let ht=Hm(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:wt(),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:Ym(r)},i=[Gm(),Wm(),Km()];i.forEach(({before:a})=>a==null?void 0:a(n)),i.forEach(({after:a})=>a==null?void 0:a(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});ht.subscribe(()=>{let e=ht.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)&&ht.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&ht.dispatch("TEARDOWN",r)}});function zm(e,t,r){let n=Bm(ht),i=e?n.get(e):void 0,a=i?i.count>0:!1;return Ne(()=>{if(!(!e||!t))return ht.dispatch("PUSH",e,r),()=>ht.dispatch("POP",e,r)},[t,e]),a}let mn=new Map,Ht=new Map;function Ka(e,t=!0){Ne(()=>{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=Ht.get(n))!=null?o:1;if(s===1?Ht.delete(n):Ht.set(n,s-1),s!==1)return;let u=mn.get(n);u&&(u["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",u["aria-hidden"]),n.inert=u.inert,mn.delete(n))}let a=(r=Ht.get(n))!=null?r:0;return Ht.set(n,a+1),a!==0||(mn.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0),i},[e,t])}function Qm({defaultContainers:e=[],portals:t,mainTreeNodeRef:r}={}){var n;let i=S.useRef((n=r==null?void 0:r.current)!=null?n:null),a=rr(i),o=re(()=>{var s,u,c;let f=[];for(let l of e)l!==null&&(l instanceof HTMLElement?f.push(l):"current"in l&&l.current instanceof HTMLElement&&f.push(l.current));if(t!=null&&t.current)for(let l of t.current)f.push(l);for(let l of(s=a==null?void 0:a.querySelectorAll("html > *, body > *"))!=null?s:[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l.id!=="headlessui-portal-root"&&(l.contains(i.current)||l.contains((c=(u=i.current)==null?void 0:u.getRootNode())==null?void 0:c.host)||f.some(d=>l.contains(d))||f.push(l));return f});return{resolveContainers:o,contains:re(s=>o().some(u=>u.contains(s))),mainTreeNodeRef:i,MainTreeNode:S.useMemo(()=>function(){return r!=null?null:T.default.createElement(Ln,{features:Tr.Hidden,ref:i})},[i,r])}}let ui=S.createContext(()=>{});ui.displayName="StackContext";var Mn=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Mn||{});function qm(){return S.useContext(ui)}function Jm({children:e,onUpdate:t,type:r,element:n,enabled:i}){let a=qm(),o=re((...s)=>{t==null||t(...s),a(...s)});return Ne(()=>{let s=i===void 0||i===!0;return s&&o(0,r,n),()=>{s&&o(1,r,n)}},[o,r,n,i]),T.default.createElement(ui.Provider,{value:o},e)}let Ks=S.createContext(null);function Ys(){let e=S.useContext(Ks);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,Ys),t}return e}function Zm(){let[e,t]=S.useState([]);return[e.length>0?e.join(" "):void 0,S.useMemo(()=>function(r){let n=re(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 T.default.createElement(Ks.Provider,{value:i},r.children)},[t])]}let Xm="p";function ev(e,t){let r=Rt(),{id:n=`headlessui-description-${r}`,...i}=e,a=Ys(),o=ke(t);Ne(()=>a.register(n),[n,a.register]);let s={ref:o,...a.props,id:n};return Le({ourProps:s,theirProps:i,slot:a.slot||{},defaultTag:Xm,name:a.name||"Description"})}let tv=Ae(ev),rv=Object.assign(tv,{});var nv=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(nv||{}),iv=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(iv||{});let av={[0](e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Nr=S.createContext(null);Nr.displayName="DialogContext";function ir(e){let t=S.useContext(Nr);if(t===null){let r=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ir),r}return t}function ov(e,t,r=()=>[document.body]){zm(e,t,n=>{var i;return{containers:[...(i=n.containers)!=null?i:[],r]}})}function sv(e,t){return me(t.type,av,e,t)}let uv="div",lv=_r.RenderStrategy|_r.Static;function cv(e,t){let r=Rt(),{id:n=`headlessui-dialog-${r}`,open:i,onClose:a,initialFocus:o,role:s="dialog",__demoMode:u=!1,...c}=e,[f,l]=S.useState(0),d=S.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(d.current||(d.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let g=si();i===void 0&&g!==null&&(i=(g&Ce.Open)===Ce.Open);let p=S.useRef(null),b=ke(p,t),v=rr(p),y=e.hasOwnProperty("open")||g!==null,h=e.hasOwnProperty("onClose");if(!y&&!h)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!y)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!h)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,[A,w]=S.useReducer(sv,{titleId:null,descriptionId:null,panelRef:S.createRef()}),P=re(()=>a(!1)),_=re(H=>w({type:0,id:H})),I=Lt()?u?!1:E===0:!1,F=f>1,k=S.useContext(Nr)!==null,[W,D]=Am(),j={get current(){var H;return(H=A.panelRef.current)!=null?H:p.current}},{resolveContainers:U,mainTreeNodeRef:B,MainTreeNode:q}=Qm({portals:W,defaultContainers:[j]}),G=F?"parent":"leaf",pe=g!==null?(g&Ce.Closing)===Ce.Closing:!1,he=(()=>k||pe?!1:I)(),X=S.useCallback(()=>{var H,ne;return(ne=Array.from((H=v==null?void 0:v.querySelectorAll("body > *"))!=null?H:[]).find(ie=>ie.id==="headlessui-portal-root"?!1:ie.contains(B.current)&&ie instanceof HTMLElement))!=null?ne:null},[B]);Ka(X,he);let ce=(()=>F?!0:I)(),fe=S.useCallback(()=>{var H,ne;return(ne=Array.from((H=v==null?void 0:v.querySelectorAll("[data-headlessui-portal]"))!=null?H:[]).find(ie=>ie.contains(B.current)&&ie instanceof HTMLElement))!=null?ne:null},[B]);Ka(fe,ce);let xe=(()=>!(!I||F))();im(U,H=>{H.preventDefault(),P()},xe);let K=(()=>!(F||E!==0))();js(v==null?void 0:v.defaultView,"keydown",H=>{K&&(H.defaultPrevented||H.key===ks.Escape&&(H.preventDefault(),H.stopPropagation(),P()))});let se=(()=>!(pe||E!==0||k))();ov(v,se,U),S.useEffect(()=>{if(E!==0||!p.current)return;let H=new ResizeObserver(ne=>{for(let ie of ne){let be=ie.target.getBoundingClientRect();be.x===0&&be.y===0&&be.width===0&&be.height===0&&P()}});return H.observe(p.current),()=>H.disconnect()},[E,p,P]);let[z,ae]=Zm(),ye=S.useMemo(()=>[{dialogState:E,close:P,setTitleId:_},A],[E,A,P,_]),Re=S.useMemo(()=>({open:E===0}),[E]),je={ref:b,id:n,role:s,"aria-modal":E===0?!0:void 0,"aria-labelledby":A.titleId,"aria-describedby":z};return T.default.createElement(Jm,{type:"Dialog",enabled:E===0,element:p,onUpdate:re((H,ne)=>{ne==="Dialog"&&me(H,{[Mn.Add]:()=>l(ie=>ie+1),[Mn.Remove]:()=>l(ie=>ie-1)})})},T.default.createElement(Rn,{force:!0},T.default.createElement(Dn,null,T.default.createElement(Nr.Provider,{value:ye},T.default.createElement(Dn.Group,{target:p},T.default.createElement(Rn,{force:!1},T.default.createElement(ae,{slot:Re,name:"Dialog.Description"},T.default.createElement(Bt,{initialFocus:o,containers:U,features:I?me(G,{parent:Bt.features.RestoreFocus,leaf:Bt.features.All&~Bt.features.FocusLock}):Bt.features.None},T.default.createElement(D,null,Le({ourProps:je,theirProps:c,slot:Re,defaultTag:uv,features:lv,visible:E===0,name:"Dialog"}))))))))),T.default.createElement(q,null))}let fv="div";function dv(e,t){let r=Rt(),{id:n=`headlessui-dialog-overlay-${r}`,...i}=e,[{dialogState:a,close:o}]=ir("Dialog.Overlay"),s=ke(t),u=re(f=>{if(f.target===f.currentTarget){if(fm(f.currentTarget))return f.preventDefault();f.preventDefault(),f.stopPropagation(),o()}}),c=S.useMemo(()=>({open:a===0}),[a]);return Le({ourProps:{ref:s,id:n,"aria-hidden":!0,onClick:u},theirProps:i,slot:c,defaultTag:fv,name:"Dialog.Overlay"})}let gv="div";function pv(e,t){let r=Rt(),{id:n=`headlessui-dialog-backdrop-${r}`,...i}=e,[{dialogState:a},o]=ir("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 T.default.createElement(Rn,{force:!0},T.default.createElement(Dn,null,Le({ourProps:{ref:s,id:n,"aria-hidden":!0},theirProps:i,slot:u,defaultTag:gv,name:"Dialog.Backdrop"})))}let hv="div";function mv(e,t){let r=Rt(),{id:n=`headlessui-dialog-panel-${r}`,...i}=e,[{dialogState:a},o]=ir("Dialog.Panel"),s=ke(t,o.panelRef),u=S.useMemo(()=>({open:a===0}),[a]),c=re(f=>{f.stopPropagation()});return Le({ourProps:{ref:s,id:n,onClick:c},theirProps:i,slot:u,defaultTag:hv,name:"Dialog.Panel"})}let vv="h2";function yv(e,t){let r=Rt(),{id:n=`headlessui-dialog-title-${r}`,...i}=e,[{dialogState:a,setTitleId:o}]=ir("Dialog.Title"),s=ke(t);S.useEffect(()=>(o(n),()=>o(null)),[n,o]);let u=S.useMemo(()=>({open:a===0}),[a]);return Le({ourProps:{ref:s,id:n},theirProps:i,slot:u,defaultTag:vv,name:"Dialog.Title"})}let bv=Ae(cv),Sv=Ae(pv),Ov=Ae(mv),wv=Ae(dv),Ev=Ae(yv),Ya=Object.assign(bv,{Backdrop:Sv,Panel:Ov,Overlay:wv,Title:Ev,Description:rv});function xv(e=0){let[t,r]=S.useState(e),n=nr(),i=S.useCallback(u=>{n.current&&r(c=>c|u)},[t,n]),a=S.useCallback(u=>Boolean(t&u),[t]),o=S.useCallback(u=>{n.current&&r(c=>c&~u)},[r,n]),s=S.useCallback(u=>{n.current&&r(c=>c^u)},[r]);return{flags:t,addFlag:i,hasFlag:a,removeFlag:o,toggleFlag:s}}function Pv(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}function vn(e,...t){e&&t.length>0&&e.classList.add(...t)}function yn(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Cv(e,t){let r=wt();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(f=>f.includes("ms")?parseFloat(f):parseFloat(f)*1e3).sort((f,l)=>l-f);return c}),s=a+o;if(s!==0){r.group(c=>{c.setTimeout(()=>{t(),c.dispose()},s),c.addEventListener(e,"transitionrun",f=>{f.target===f.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 Av(e,t,r,n){let i=r?"enter":"leave",a=wt(),o=n!==void 0?Pv(n):()=>{};i==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=me(i,{enter:()=>t.enter,leave:()=>t.leave}),u=me(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=me(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return yn(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),vn(e,...t.base,...s,...c),a.nextFrame(()=>{yn(e,...t.base,...s,...c),vn(e,...t.base,...s,...u),Cv(e,()=>(yn(e,...t.base,...s),vn(e,...t.base,...t.entered),o()))}),a.dispose}function _v({immediate:e,container:t,direction:r,classes:n,onStart:i,onStop:a}){let o=nr(),s=ii(),u=Xe(r);Ne(()=>{e&&(u.current="enter")},[e]),Ne(()=>{let c=wt();s.add(c.dispose);let f=t.current;if(f&&u.current!=="idle"&&o.current)return c.dispose(),i.current(u.current),c.add(Av(f,n.current,u.current==="enter",()=>{c.dispose(),a.current(u.current)})),c.dispose},[r])}function nt(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Hr=S.createContext(null);Hr.displayName="TransitionContext";var Tv=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Tv||{});function Nv(){let e=S.useContext(Hr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function $v(){let e=S.useContext(Wr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Wr=S.createContext(null);Wr.displayName="NestingContext";function Gr(e){return"children"in e?Gr(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function zs(e,t){let r=Xe(e),n=S.useRef([]),i=nr(),a=ii(),o=re((g,p=ot.Hidden)=>{let b=n.current.findIndex(({el:v})=>v===g);b!==-1&&(me(p,{[ot.Unmount](){n.current.splice(b,1)},[ot.Hidden](){n.current[b].state="hidden"}}),a.microTask(()=>{var v;!Gr(n)&&i.current&&((v=r.current)==null||v.call(r))}))}),s=re(g=>{let p=n.current.find(({el:b})=>b===g);return p?p.state!=="visible"&&(p.state="visible"):n.current.push({el:g,state:"visible"}),()=>o(g,ot.Unmount)}),u=S.useRef([]),c=S.useRef(Promise.resolve()),f=S.useRef({enter:[],leave:[],idle:[]}),l=re((g,p,b)=>{u.current.splice(0),t&&(t.chains.current[p]=t.chains.current[p].filter(([v])=>v!==g)),t==null||t.chains.current[p].push([g,new Promise(v=>{u.current.push(v)})]),t==null||t.chains.current[p].push([g,new Promise(v=>{Promise.all(f.current[p].map(([y,h])=>h)).then(()=>v())})]),p==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>b(p)):b(p)}),d=re((g,p,b)=>{Promise.all(f.current[p].splice(0).map(([v,y])=>y)).then(()=>{var v;(v=u.current.shift())==null||v()}).then(()=>b(p))});return S.useMemo(()=>({children:n,register:s,unregister:o,onStart:l,onStop:d,wait:c,chains:f}),[s,o,n,l,d,f,c])}function Iv(){}let Lv=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function za(e){var t;let r={};for(let n of Lv)r[n]=(t=e[n])!=null?t:Iv;return r}function Rv(e){let t=S.useRef(za(e));return S.useEffect(()=>{t.current=za(e)},[e]),t}let Fv="div",Qs=_r.RenderStrategy;function Dv(e,t){var r,n;let{beforeEnter:i,afterEnter:a,beforeLeave:o,afterLeave:s,enter:u,enterFrom:c,enterTo:f,entered:l,leave:d,leaveFrom:g,leaveTo:p,...b}=e,v=S.useRef(null),y=ke(v,t),h=(r=b.unmount)==null||r?ot.Unmount:ot.Hidden,{show:E,appear:A,initial:w}=Nv(),[P,_]=S.useState(E?"visible":"hidden"),I=$v(),{register:F,unregister:k}=I;S.useEffect(()=>F(v),[F,v]),S.useEffect(()=>{if(h===ot.Hidden&&v.current){if(E&&P!=="visible"){_("visible");return}return me(P,{hidden:()=>k(v),visible:()=>F(v)})}},[P,v,F,k,E,h]);let W=Xe({base:nt(b.className),enter:nt(u),enterFrom:nt(c),enterTo:nt(f),entered:nt(l),leave:nt(d),leaveFrom:nt(g),leaveTo:nt(p)}),D=Rv({beforeEnter:i,afterEnter:a,beforeLeave:o,afterLeave:s}),j=Lt();S.useEffect(()=>{if(j&&P==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,P,j]);let U=w&&!A,B=A&&E&&w,q=(()=>!j||U?"idle":E?"enter":"leave")(),G=xv(0),pe=re(K=>me(K,{enter:()=>{G.addFlag(Ce.Opening),D.current.beforeEnter()},leave:()=>{G.addFlag(Ce.Closing),D.current.beforeLeave()},idle:()=>{}})),he=re(K=>me(K,{enter:()=>{G.removeFlag(Ce.Opening),D.current.afterEnter()},leave:()=>{G.removeFlag(Ce.Closing),D.current.afterLeave()},idle:()=>{}})),X=zs(()=>{_("hidden"),k(v)},I),ce=S.useRef(!1);_v({immediate:B,container:v,classes:W,direction:q,onStart:Xe(K=>{ce.current=!0,X.onStart(v,K,pe)}),onStop:Xe(K=>{ce.current=!1,X.onStop(v,K,he),K==="leave"&&!Gr(X)&&(_("hidden"),k(v))})});let fe=b,xe={ref:y};return B?fe={...fe,className:Ar(b.className,...W.current.enter,...W.current.enterFrom)}:ce.current&&(fe.className=Ar(b.className,(n=v.current)==null?void 0:n.className),fe.className===""&&delete fe.className),T.default.createElement(Wr.Provider,{value:X},T.default.createElement(lm,{value:me(P,{visible:Ce.Open,hidden:Ce.Closed})|G.flags},Le({ourProps:xe,theirProps:fe,defaultTag:Fv,features:Qs,visible:P==="visible",name:"Transition.Child"})))}function Mv(e,t){let{show:r,appear:n=!1,unmount:i=!0,...a}=e,o=S.useRef(null),s=ke(o,t);Lt();let u=si();if(r===void 0&&u!==null&&(r=(u&Ce.Open)===Ce.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=S.useState(r?"visible":"hidden"),l=zs(()=>{f("hidden")}),[d,g]=S.useState(!0),p=S.useRef([r]);Ne(()=>{d!==!1&&p.current[p.current.length-1]!==r&&(p.current.push(r),g(!1))},[p,r]);let b=S.useMemo(()=>({show:r,appear:n,initial:d}),[r,n,d]);S.useEffect(()=>{if(r)f("visible");else if(!Gr(l))f("hidden");else{let E=o.current;if(!E)return;let A=E.getBoundingClientRect();A.x===0&&A.y===0&&A.width===0&&A.height===0&&f("hidden")}},[r,l]);let v={unmount:i},y=re(()=>{var E;d&&g(!1),(E=e.beforeEnter)==null||E.call(e)}),h=re(()=>{var E;d&&g(!1),(E=e.beforeLeave)==null||E.call(e)});return T.default.createElement(Wr.Provider,{value:l},T.default.createElement(Hr.Provider,{value:b},Le({ourProps:{...v,as:S.Fragment,children:T.default.createElement(qs,{ref:s,...v,...a,beforeEnter:y,beforeLeave:h})},theirProps:{},defaultTag:S.Fragment,features:Qs,visible:c==="visible",name:"Transition"})))}function kv(e,t){let r=S.useContext(Hr)!==null,n=si()!==null;return T.default.createElement(T.default.Fragment,null,!r&&n?T.default.createElement(kn,{ref:t,...e}):T.default.createElement(qs,{ref:t,...e}))}let kn=Ae(Mv),qs=Ae(Dv),jv=Ae(kv),bn=Object.assign(kn,{Child:jv,Root:kn});function Uv(e){const{children:t,isOpen:r,handleClose:n}=e,{isMobile:i}=Ts({isModal:!0});return C(Ge,{children:C(bn,{appear:!0,show:r,as:S.Fragment,children:C(Ya,{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:[C(bn.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:C(Ya.Overlay,{className:"fixed inset-0"})}),C("span",{className:"inline-block h-screen align-middle","aria-hidden":"true",children:"\u200B"}),C(bn.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-[100vh] sm:h-auto sm:max-h-[90vh] w-full sm:w-[640px]",children:[C("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:C("div",{className:"",children:V("svg",{className:"w-8 h-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:[C("path",{stroke:"none",d:"M0 0h24v24H0z"})," ",C("line",{x1:"5",y1:"12",x2:"19",y2:"12"})," ",C("line",{x1:"5",y1:"12",x2:"11",y2:"18"})," ",C("line",{x1:"5",y1:"12",x2:"11",y2:"6"})]})})}),C("div",{className:"w-full",style:{height:`${i?"calc(100% - 56px)":"auto"}`},children:t})]})})]})})})})}function Vv(e){var U,B,q,G;const{product:t,isOpen:r,handleGoBack:n,showDebugState:i=!1,countedProductPrice:a,productQuantity:o,increaseProductQuantity:s,decreaseProductQuantity:u,handleOnSubmit:c,children:f}=e,{minPrice:l="0"}=t,[d,g]=S.useState("auto"),[p,b]=S.useState(0);S.useEffect(()=>{b(1);const pe=setTimeout(()=>{w||b(2)},250);return()=>{clearTimeout(pe)}},[]);const{displayPriceFrom:v,formattedEndPrice:y}=zp(a,l,o),h=S.useRef(),E=S.useRef(),{isSm:A,isMobile:w,windowHeight:P}=Ts({isModal:!0}),_=V(Ge,{children:[V("div",{className:Vt("px-4 w-full",A&&"sm:sticky sm:top-0 sm:w-2/5"),ref:h,children:[t.details.media&&t.details.media[0].url&&C("img",{className:Vt("mx-auto mt-2 mb-6 max-h-[250px]",A&&"max-h-[450px]"),alt:t.details.literals.name,src:(U=t.details)==null?void 0:U.media[0].url}),C("div",{className:Vt(!i&&"hidden"),children:C(_s,{})})]}),V("div",{className:Vt("w-full",A&&"sm:w-3/5"),ref:E,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:[t.details.literals.name," "]}),C(Ur,{price:e.countedProductPrice,minPrice:l})]}),C("span",{className:"text-gray-600",children:(B=t.details.literals)==null?void 0:B.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,C("div",{className:"sm:h-[64px]"})]}),A&&C("div",{className:"-mt-5 mb-2 bg-gray-100",children:C(Ha,{finalPrice:y,isBackIcon:!1,handleGoBack:n,displayPriceFrom:v})})]})]}),I=(q=h==null?void 0:h.current)==null?void 0:q.clientHeight,F=(G=E==null?void 0:E.current)==null?void 0:G.clientHeight,k=I+F;k>window.innerHeight*.8||isNaN(k)?d!=="80vh"&&g("80vh"):d!=="auto"&&g("auto");const W=`${P-64-56}px`,D=!A,j={"--mobile-submit-row-top":`${P-64-80}px`};return C(Uv,{isOpen:Boolean(r),handleClose:n,children:V("div",{id:"product-configurator-view",className:"w-full h-full",style:{overflow:"hidden",textAlign:"left"},children:[C("div",{className:Vt("flex relative flex-col items-start w-full form-body stretch",!D&&"sm:flex-row-reverse sm:pb-0",!w&&"mobile-scrollbar"),style:{height:`${w?W:d}`,minHeight:"400px",overflowY:"scroll"},children:_}),D&&C("div",{className:`w-full h-16 bg-white sm:fixed sm:bottom-0 ${w?"submit-row-mobile":"submit-row"}`,style:j,children:C(Ha,{handleGoBack:n,finalPrice:y,isBackIcon:!1,productQuantity:o,increaseProductQuantity:s,decreaseProductQuantity:u,handleOnSubmit:c})})]})})}const Bv=e=>{const{product:t}=e,{MenuProductRootUI:r}=Vr(),n=Me(t.items)?C(Ge,{}):C(ni,{productItems:t.items,parentProduct:t,rootProduct:t});return console.log("MenuProductRootUI CHECK",r),r?C(r,{...e,children:n}):C(Vv,{...e,children:n})};const Js=T.default.createContext(null);function Hv({rootProduct:e,children:t}){return C(Js.Provider,{value:{rootProduct:e},children:t})}function Wv(){const e=S.useContext(Js);if(!e)throw new Error("Missing ComponentsContext");return e}function Gv(e){const{product:t,lang:r="en",handleAddToCart:n,handleGoBack:i,isOpen:a,handleClose:o,currency:s,showDebugState:u=!1}=e,{price:c}=t,{encodedProduct:f,initSelected:l,initFilter:d,productQuantity:g,setIsOnSubmittedOnTrue:p,getInvalidSelCtxArray:b,getValidationMap:v,increaseProductQuantity:y,decreaseProductQuantity:h,setCurrency:E}=yp(t),[A,w]=S.useState(v());S.useEffect(()=>{ve.changeLanguage(r)},[r]),S.useEffect(()=>{E(s)},[s]),S.useEffect(()=>{const W=v();qg(W,A)||w(W)});const P=xo({defaultValues:{selected:l,filter:d}}),{getValues:_}=P,I=Number((parseFloat(c||"0")+Kn(_("selected"),f)).toFixed(2)),F=()=>{var D;console.log("onSubmit"),p();const W=b();if(W.length)ap(cs(W[0])),console.log({invalidContextNames:W});else{console.log("selected",_("selected"));const j=np(ls(_("selected"))),U=_("filter");(D=Object.keys(j||{}))==null||D.forEach(B=>{const q=ds(B,t);q&&(ti(q,U)||delete j[B])}),console.log("decodedCleanedSelected: ",j),n({price:I,quantity:g,selected:j,filter:U})}},k=()=>F();return C(Ge,{children:C(Hv,{rootProduct:t,children:C(Ps.Provider,{value:e.components,children:C(so,{...P,children:V("form",{children:[u&&C("div",{className:"hidden",children:C(_s,{})}),C(Bv,{product:f,productQuantity:g,validationMap:A,isOpen:a,handleClose:o,handleGoBack:i,handleOnSubmit:k,countedProductPrice:I,countedProductTotalPrice:I*g,increaseProductQuantity:y,decreaseProductQuantity:h,currency:s})]})})})})})}exports.ContextType=Wn;exports.MainView=Po;exports.ProductConfigurator=Gv;exports.ProductKinds=Gn;exports.ProductTypes=Co;exports.SelMinSelMaxStatus=Te;exports.getProductToChangeInForm=hs;exports.hookForm=Xu;exports.selectProductsInForm=ms;exports.unselectProductsInForm=bp;exports.useMenuOptions=vs;exports.useProductData=Wv;exports.validateProductFilter=ti;
15
15
  //# sourceMappingURL=index.cjs.js.map