@sme.up/ketchup2 1.0.0 → 1.0.1
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/basic-components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/hooks/useTranslator.d.ts +3 -4
- package/dist/hooks/useTranslator.d.ts.map +1 -1
- package/dist/ketchup2.cjs.js +21 -21
- package/dist/ketchup2.css +1 -1
- package/dist/ketchup2.es.js +2177 -2118
- package/dist/types/translation.d.ts +4 -0
- package/dist/types/translation.d.ts.map +1 -1
- package/dist/utils/date.d.ts +101 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/translation.d.ts +2 -4
- package/dist/utils/translation.d.ts.map +1 -1
- package/dist/utils/wrapper-types/date.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/ketchup2.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Mr=Object.defineProperty;var Fr=(n,e,t)=>e in n?Mr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Pe=(n,e,t)=>Fr(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const U=require("react");function Vr(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const Xe=Vr(U);var Ze={exports:{}},Fe={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Mt;function Yr(){if(Mt)return Fe;Mt=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(r,s,a){var i=null;if(a!==void 0&&(i=""+a),s.key!==void 0&&(i=""+s.key),"key"in s){a={};for(var o in s)o!=="key"&&(a[o]=s[o])}else a=s;return s=a.ref,{$$typeof:n,type:r,key:i,ref:s!==void 0?s:null,props:a}}return Fe.Fragment=e,Fe.jsx=t,Fe.jsxs=t,Fe}var Ve={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,46 +14,46 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
at`)?" (<anonymous>)":-1<
|
|
19
|
-
`+
|
|
20
|
-
`),
|
|
21
|
-
`);for(
|
|
22
|
-
`+he[
|
|
17
|
+
*/var Ft;function Ur(){return Ft||(Ft=1,process.env.NODE_ENV!=="production"&&function(){function n(d){if(d==null)return null;if(typeof d=="function")return d.$$typeof===Z?null:d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case C:return"Fragment";case v:return"Portal";case q:return"Profiler";case L:return"StrictMode";case K:return"Suspense";case te:return"SuspenseList"}if(typeof d=="object")switch(typeof d.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),d.$$typeof){case $:return(d.displayName||"Context")+".Provider";case V:return(d._context.displayName||"Context")+".Consumer";case Y:var M=d.render;return d=d.displayName,d||(d=M.displayName||M.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case X:return M=d.displayName||null,M!==null?M:n(d.type)||"Memo";case ce:M=d._payload,d=d._init;try{return n(d(M))}catch{}}return null}function e(d){return""+d}function t(d){try{e(d);var M=!1}catch{M=!0}if(M){M=console;var F=M.error,re=typeof Symbol=="function"&&Symbol.toStringTag&&d[Symbol.toStringTag]||d.constructor.name||"Object";return F.call(M,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",re),e(d)}}function r(){}function s(){if(S===0){A=console.log,N=console.info,I=console.warn,H=console.error,ee=console.group,z=console.groupCollapsed,oe=console.groupEnd;var d={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}S++}function a(){if(S--,S===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:m({},d,{value:A}),info:m({},d,{value:N}),warn:m({},d,{value:I}),error:m({},d,{value:H}),group:m({},d,{value:ee}),groupCollapsed:m({},d,{value:z}),groupEnd:m({},d,{value:oe})})}0>S&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function i(d){if(T===void 0)try{throw Error()}catch(F){var M=F.stack.trim().match(/\n( *(at )?)/);T=M&&M[1]||"",k=-1<F.stack.indexOf(`
|
|
18
|
+
at`)?" (<anonymous>)":-1<F.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
+
`+T+d+k}function o(d,M){if(!d||G)return"";var F=ne.get(d);if(F!==void 0)return F;G=!0,F=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var re=null;re=P.H,P.H=null,s();try{var de={DetermineComponentFrameRoot:function(){try{if(M){var De=function(){throw Error()};if(Object.defineProperty(De.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(De,[])}catch(Oe){var Je=Oe}Reflect.construct(d,[],De)}else{try{De.call()}catch(Oe){Je=Oe}d.call(De.prototype)}}else{try{throw Error()}catch(Oe){Je=Oe}(De=d())&&typeof De.catch=="function"&&De.catch(function(){})}}catch(Oe){if(Oe&&Je&&typeof Oe.stack=="string")return[Oe.stack,Je.stack]}return[null,null]}};de.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var le=Object.getOwnPropertyDescriptor(de.DetermineComponentFrameRoot,"name");le&&le.configurable&&Object.defineProperty(de.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var J=de.DetermineComponentFrameRoot(),_e=J[0],$e=J[1];if(_e&&$e){var he=_e.split(`
|
|
20
|
+
`),Ae=$e.split(`
|
|
21
|
+
`);for(J=le=0;le<he.length&&!he[le].includes("DetermineComponentFrameRoot");)le++;for(;J<Ae.length&&!Ae[J].includes("DetermineComponentFrameRoot");)J++;if(le===he.length||J===Ae.length)for(le=he.length-1,J=Ae.length-1;1<=le&&0<=J&&he[le]!==Ae[J];)J--;for(;1<=le&&0<=J;le--,J--)if(he[le]!==Ae[J]){if(le!==1||J!==1)do if(le--,J--,0>J||he[le]!==Ae[J]){var Me=`
|
|
22
|
+
`+he[le].replace(" at new "," at ");return d.displayName&&Me.includes("<anonymous>")&&(Me=Me.replace("<anonymous>",d.displayName)),typeof d=="function"&&ne.set(d,Me),Me}while(1<=le&&0<=J);break}}}finally{G=!1,P.H=re,a(),Error.prepareStackTrace=F}return he=(he=d?d.displayName||d.name:"")?i(he):"",typeof d=="function"&&ne.set(d,he),he}function l(d){if(d==null)return"";if(typeof d=="function"){var M=d.prototype;return o(d,!(!M||!M.isReactComponent))}if(typeof d=="string")return i(d);switch(d){case K:return i("Suspense");case te:return i("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case Y:return d=o(d.render,!1),d;case X:return l(d.type);case ce:M=d._payload,d=d._init;try{return l(d(M))}catch{}}return""}function c(){var d=P.A;return d===null?null:d.getOwner()}function f(d){if(y.call(d,"key")){var M=Object.getOwnPropertyDescriptor(d,"key").get;if(M&&M.isReactWarning)return!1}return d.key!==void 0}function u(d,M){function F(){pe||(pe=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",M))}F.isReactWarning=!0,Object.defineProperty(d,"key",{get:F,configurable:!0})}function p(){var d=n(this.type);return ve[d]||(ve[d]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),d=this.props.ref,d!==void 0?d:null}function h(d,M,F,re,de,le){return F=le.ref,d={$$typeof:D,type:d,key:M,props:le,_owner:de},(F!==void 0?F:null)!==null?Object.defineProperty(d,"ref",{enumerable:!1,get:p}):Object.defineProperty(d,"ref",{enumerable:!1,value:null}),d._store={},Object.defineProperty(d._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(d,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(d.props),Object.freeze(d)),d}function g(d,M,F,re,de,le){if(typeof d=="string"||typeof d=="function"||d===C||d===q||d===L||d===K||d===te||d===Q||typeof d=="object"&&d!==null&&(d.$$typeof===ce||d.$$typeof===X||d.$$typeof===$||d.$$typeof===V||d.$$typeof===Y||d.$$typeof===_||d.getModuleId!==void 0)){var J=M.children;if(J!==void 0)if(re)if(R(J)){for(re=0;re<J.length;re++)b(J[re],d);Object.freeze&&Object.freeze(J)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else b(J,d)}else J="",(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(J+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),d===null?re="null":R(d)?re="array":d!==void 0&&d.$$typeof===D?(re="<"+(n(d.type)||"Unknown")+" />",J=" Did you accidentally export a JSX literal instead of a component?"):re=typeof d,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",re,J);if(y.call(M,"key")){J=n(d);var _e=Object.keys(M).filter(function(he){return he!=="key"});re=0<_e.length?"{key: someKey, "+_e.join(": ..., ")+": ...}":"{key: someKey}",me[J+re]||(_e=0<_e.length?"{"+_e.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
23
|
let props = %s;
|
|
24
24
|
<%s {...props} />
|
|
25
25
|
React keys must be passed directly to JSX without using spread:
|
|
26
26
|
let props = %s;
|
|
27
|
-
<%s key={someKey} {...props} />`,re,
|
|
27
|
+
<%s key={someKey} {...props} />`,re,J,_e,J),me[J+re]=!0)}if(J=null,F!==void 0&&(t(F),J=""+F),f(M)&&(t(M.key),J=""+M.key),"key"in M){F={};for(var $e in M)$e!=="key"&&(F[$e]=M[$e])}else F=M;return J&&u(F,typeof d=="function"?d.displayName||d.name||"Unknown":d),h(d,J,le,de,c(),F)}function b(d,M){if(typeof d=="object"&&d&&d.$$typeof!==ie){if(R(d))for(var F=0;F<d.length;F++){var re=d[F];E(re)&&x(re,M)}else if(E(d))d._store&&(d._store.validated=1);else if(d===null||typeof d!="object"?F=null:(F=W&&d[W]||d["@@iterator"],F=typeof F=="function"?F:null),typeof F=="function"&&F!==d.entries&&(F=F.call(d),F!==d))for(;!(d=F.next()).done;)E(d.value)&&x(d.value,M)}}function E(d){return typeof d=="object"&&d!==null&&d.$$typeof===D}function x(d,M){if(d._store&&!d._store.validated&&d.key==null&&(d._store.validated=1,M=w(M),!we[M])){we[M]=!0;var F="";d&&d._owner!=null&&d._owner!==c()&&(F=null,typeof d._owner.tag=="number"?F=n(d._owner.type):typeof d._owner.name=="string"&&(F=d._owner.name),F=" It was passed a child from "+F+".");var re=P.getCurrentStack;P.getCurrentStack=function(){var de=l(d.type);return re&&(de+=re()||""),de},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',M,F),P.getCurrentStack=re}}function w(d){var M="",F=c();return F&&(F=n(F.type))&&(M=`
|
|
28
28
|
|
|
29
|
-
Check the render method of \``+
|
|
29
|
+
Check the render method of \``+F+"`."),M||(d=n(d))&&(M=`
|
|
30
30
|
|
|
31
|
-
Check the top-level render call using <`+
|
|
31
|
+
Check the top-level render call using <`+d+">."),M}var j=U,D=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),$=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),ce=Symbol.for("react.lazy"),Q=Symbol.for("react.offscreen"),W=Symbol.iterator,Z=Symbol.for("react.client.reference"),P=j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,y=Object.prototype.hasOwnProperty,m=Object.assign,_=Symbol.for("react.client.reference"),R=Array.isArray,S=0,A,N,I,H,ee,z,oe;r.__reactDisabledLog=!0;var T,k,G=!1,ne=new(typeof WeakMap=="function"?WeakMap:Map),ie=Symbol.for("react.client.reference"),pe,ve={},me={},we={};Ve.Fragment=C,Ve.jsx=function(d,M,F,re,de){return g(d,M,F,!1,re,de)},Ve.jsxs=function(d,M,F,re,de){return g(d,M,F,!0,re,de)}}()),Ve}var Vt;function Wr(){return Vt||(Vt=1,process.env.NODE_ENV==="production"?Ze.exports=Yr():Ze.exports=Ur()),Ze.exports}var O=Wr();function Hr(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}function it(){return it=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},it.apply(null,arguments)}function Dt(n,e){return Dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},Dt(n,e)}function qr(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,Dt(n,e)}function yt(n,e,t){if(t||arguments.length===2)for(var r=0,s=e.length,a;r<s;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return n.concat(a||Array.prototype.slice.call(e))}var Qe={};/*!
|
|
32
32
|
* content-type
|
|
33
33
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
34
34
|
* MIT Licensed
|
|
35
|
-
*/var
|
|
35
|
+
*/var Yt;function Kr(){if(Yt)return Qe;Yt=1;var n=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,e=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,t=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,r=/\\([\u000b\u0020-\u00ff])/g,s=/([\\"])/g,a=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;Qe.format=i,Qe.parse=o;function i(u){if(!u||typeof u!="object")throw new TypeError("argument obj is required");var p=u.parameters,h=u.type;if(!h||!a.test(h))throw new TypeError("invalid type");var g=h;if(p&&typeof p=="object")for(var b,E=Object.keys(p).sort(),x=0;x<E.length;x++){if(b=E[x],!t.test(b))throw new TypeError("invalid parameter name");g+="; "+b+"="+c(p[b])}return g}function o(u){if(!u)throw new TypeError("argument string is required");var p=typeof u=="object"?l(u):u;if(typeof p!="string")throw new TypeError("argument string is required to be a string");var h=p.indexOf(";"),g=h!==-1?p.slice(0,h).trim():p.trim();if(!a.test(g))throw new TypeError("invalid media type");var b=new f(g.toLowerCase());if(h!==-1){var E,x,w;for(n.lastIndex=h;x=n.exec(p);){if(x.index!==h)throw new TypeError("invalid parameter format");h+=x[0].length,E=x[1].toLowerCase(),w=x[2],w.charCodeAt(0)===34&&(w=w.slice(1,-1),w.indexOf("\\")!==-1&&(w=w.replace(r,"$1"))),b.parameters[E]=w}if(h!==p.length)throw new TypeError("invalid parameter format")}return b}function l(u){var p;if(typeof u.getHeader=="function"?p=u.getHeader("content-type"):typeof u.headers=="object"&&(p=u.headers&&u.headers["content-type"]),typeof p!="string")throw new TypeError("content-type header is missing from object");return p}function c(u){var p=String(u);if(t.test(p))return p;if(p.length>0&&!e.test(p))throw new TypeError("invalid parameter value");return'"'+p.replace(s,"\\$1")+'"'}function f(u){this.parameters=Object.create(null),this.type=u}return Qe}var Br=Kr(),Ne=new Map,wr=function(e){return e.cloneNode(!0)},Ut=function(){return window.location.protocol==="file:"},_r=function(e,t,r){var s=new XMLHttpRequest;s.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&s.readyState===2){var a=s.getResponseHeader("Content-Type");if(!a)throw new Error("Content type not found");var i=Br.parse(a).type;if(!(i==="image/svg+xml"||i==="text/plain"))throw new Error("Invalid content type: ".concat(i))}if(s.readyState===4){if(s.status===404||s.responseXML===null)throw new Error(Ut()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(s.status===200||Ut()&&s.status===0)r(null,s);else throw new Error("There was a problem injecting the SVG: "+s.status+" "+s.statusText)}}catch(o){if(s.abort(),o instanceof Error)r(o,s);else throw o}},s.open("GET",e),s.withCredentials=t,s.overrideMimeType&&s.overrideMimeType("text/xml"),s.send()},Ce={},Wt=function(e,t){Ce[e]=Ce[e]||[],Ce[e].push(t)},zr=function(e){for(var t=function(i,o){setTimeout(function(){if(Array.isArray(Ce[e])){var l=Ne.get(e),c=Ce[e][i];l instanceof SVGSVGElement&&c(null,wr(l)),l instanceof Error&&c(l),i===Ce[e].length-1&&delete Ce[e]}},0)},r=0,s=Ce[e].length;r<s;r++)t(r)},Gr=function(e,t,r){if(Ne.has(e)){var s=Ne.get(e);if(s===void 0){Wt(e,r);return}if(s instanceof SVGSVGElement){r(null,wr(s));return}}Ne.set(e,void 0),Wt(e,r),_r(e,t,function(a,i){var o;a?Ne.set(e,a):((o=i.responseXML)===null||o===void 0?void 0:o.documentElement)instanceof SVGSVGElement&&Ne.set(e,i.responseXML.documentElement),zr(e)})},Jr=function(e,t,r){_r(e,t,function(s,a){var i;s?r(s):((i=a.responseXML)===null||i===void 0?void 0:i.documentElement)instanceof SVGSVGElement&&r(null,a.responseXML.documentElement)})},Xr=0,Zr=function(){return++Xr},be=[],Ht={},Qr="http://www.w3.org/2000/svg",vt="http://www.w3.org/1999/xlink",qt=function(e,t,r,s,a,i,o){var l=e.getAttribute("data-src")||e.getAttribute("src");if(!l){o(new Error("Invalid data-src or src attribute"));return}if(be.indexOf(e)!==-1){be.splice(be.indexOf(e),1),e=null;return}be.push(e),e.setAttribute("src","");var c=s?Gr:Jr;c(l,a,function(f,u){if(!u){be.splice(be.indexOf(e),1),e=null,o(f);return}var p=e.getAttribute("id");p&&u.setAttribute("id",p);var h=e.getAttribute("title");h&&u.setAttribute("title",h);var g=e.getAttribute("width");g&&u.setAttribute("width",g);var b=e.getAttribute("height");b&&u.setAttribute("height",b);var E=Array.from(new Set(yt(yt(yt([],(u.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();u.setAttribute("class",E);var x=e.getAttribute("style");x&&u.setAttribute("style",x),u.setAttribute("data-src",l);var w=[].filter.call(e.attributes,function(Z){return/^data-\w[\w-]*$/.test(Z.name)});if(Array.prototype.forEach.call(w,function(Z){Z.name&&Z.value&&u.setAttribute(Z.name,Z.value)}),r){var j={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},D,v,C,L,q;Object.keys(j).forEach(function(Z){D=Z,C=j[Z],v=u.querySelectorAll(D+"[id]");for(var P=function(R,S){L=v[R].id,q=L+"-"+Zr();var A;Array.prototype.forEach.call(C,function(k){A=u.querySelectorAll("["+k+'*="'+L+'"]');for(var G=0,ne=A.length;G<ne;G++){var ie=A[G].getAttribute(k);ie&&!ie.match(new RegExp('url\\("?#'+L+'"?\\)'))||A[G].setAttribute(k,"url(#"+q+")")}});for(var N=u.querySelectorAll("[*|href]"),I=[],H=0,ee=N.length;H<ee;H++){var z=N[H].getAttributeNS(vt,"href");z&&z.toString()==="#"+v[R].id&&I.push(N[H])}for(var oe=0,T=I.length;oe<T;oe++)I[oe].setAttributeNS(vt,"href","#"+q);v[R].id=q},y=0,m=v.length;y<m;y++)P(y)})}u.removeAttribute("xmlns:a");for(var V=u.querySelectorAll("script"),$=[],Y,K,te=0,X=V.length;te<X;te++)K=V[te].getAttribute("type"),(!K||K==="application/ecmascript"||K==="application/javascript"||K==="text/javascript")&&(Y=V[te].innerText||V[te].textContent,Y&&$.push(Y),u.removeChild(V[te]));if($.length>0&&(t==="always"||t==="once"&&!Ht[l])){for(var ce=0,Q=$.length;ce<Q;ce++)new Function($[ce])(window);Ht[l]=!0}var W=u.querySelectorAll("style");if(Array.prototype.forEach.call(W,function(Z){Z.textContent+=""}),u.setAttribute("xmlns",Qr),u.setAttribute("xmlns:xlink",vt),i(u),!e.parentNode){be.splice(be.indexOf(e),1),e=null,o(new Error("Parent node is null"));return}e.parentNode.replaceChild(u,e),be.splice(be.indexOf(e),1),e=null,o(null,u)})},en=function(e,t){var r=t===void 0?{}:t,s=r.afterAll,a=s===void 0?function(){}:s,i=r.afterEach,o=i===void 0?function(){}:i,l=r.beforeEach,c=l===void 0?function(){}:l,f=r.cacheRequests,u=f===void 0?!0:f,p=r.evalScripts,h=p===void 0?"never":p,g=r.httpRequestWithCredentials,b=g===void 0?!1:g,E=r.renumerateIRIElements,x=E===void 0?!0:E;if(e&&"length"in e)for(var w=0,j=0,D=e.length;j<D;j++)qt(e[j],h,x,u,b,c,function(v,C){o(v,C),e&&"length"in e&&e.length===++w&&a(w)});else e?qt(e,h,x,u,b,c,function(v,C){o(v,C),a(1),e=null}):a(0)},et={exports:{}},tt={exports:{}},se={};/** @license React v16.13.1
|
|
36
36
|
* react-is.production.min.js
|
|
37
37
|
*
|
|
38
38
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the MIT license found in the
|
|
41
41
|
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var
|
|
42
|
+
*/var Kt;function tn(){if(Kt)return se;Kt=1;var n=typeof Symbol=="function"&&Symbol.for,e=n?Symbol.for("react.element"):60103,t=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,i=n?Symbol.for("react.provider"):60109,o=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,c=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,u=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,E=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function j(v){if(typeof v=="object"&&v!==null){var C=v.$$typeof;switch(C){case e:switch(v=v.type,v){case l:case c:case r:case a:case s:case u:return v;default:switch(v=v&&v.$$typeof,v){case o:case f:case g:case h:case i:return v;default:return C}}case t:return C}}}function D(v){return j(v)===c}return se.AsyncMode=l,se.ConcurrentMode=c,se.ContextConsumer=o,se.ContextProvider=i,se.Element=e,se.ForwardRef=f,se.Fragment=r,se.Lazy=g,se.Memo=h,se.Portal=t,se.Profiler=a,se.StrictMode=s,se.Suspense=u,se.isAsyncMode=function(v){return D(v)||j(v)===l},se.isConcurrentMode=D,se.isContextConsumer=function(v){return j(v)===o},se.isContextProvider=function(v){return j(v)===i},se.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},se.isForwardRef=function(v){return j(v)===f},se.isFragment=function(v){return j(v)===r},se.isLazy=function(v){return j(v)===g},se.isMemo=function(v){return j(v)===h},se.isPortal=function(v){return j(v)===t},se.isProfiler=function(v){return j(v)===a},se.isStrictMode=function(v){return j(v)===s},se.isSuspense=function(v){return j(v)===u},se.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===c||v===a||v===s||v===u||v===p||typeof v=="object"&&v!==null&&(v.$$typeof===g||v.$$typeof===h||v.$$typeof===i||v.$$typeof===o||v.$$typeof===f||v.$$typeof===E||v.$$typeof===x||v.$$typeof===w||v.$$typeof===b)},se.typeOf=j,se}var ae={};/** @license React v16.13.1
|
|
43
43
|
* react-is.development.js
|
|
44
44
|
*
|
|
45
45
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
46
46
|
*
|
|
47
47
|
* This source code is licensed under the MIT license found in the
|
|
48
48
|
* LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/var
|
|
49
|
+
*/var Bt;function rn(){return Bt||(Bt=1,process.env.NODE_ENV!=="production"&&function(){var n=typeof Symbol=="function"&&Symbol.for,e=n?Symbol.for("react.element"):60103,t=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,i=n?Symbol.for("react.provider"):60109,o=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,c=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,u=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,E=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function j(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===a||T===s||T===u||T===p||typeof T=="object"&&T!==null&&(T.$$typeof===g||T.$$typeof===h||T.$$typeof===i||T.$$typeof===o||T.$$typeof===f||T.$$typeof===E||T.$$typeof===x||T.$$typeof===w||T.$$typeof===b)}function D(T){if(typeof T=="object"&&T!==null){var k=T.$$typeof;switch(k){case e:var G=T.type;switch(G){case l:case c:case r:case a:case s:case u:return G;default:var ne=G&&G.$$typeof;switch(ne){case o:case f:case g:case h:case i:return ne;default:return k}}case t:return k}}}var v=l,C=c,L=o,q=i,V=e,$=f,Y=r,K=g,te=h,X=t,ce=a,Q=s,W=u,Z=!1;function P(T){return Z||(Z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),y(T)||D(T)===l}function y(T){return D(T)===c}function m(T){return D(T)===o}function _(T){return D(T)===i}function R(T){return typeof T=="object"&&T!==null&&T.$$typeof===e}function S(T){return D(T)===f}function A(T){return D(T)===r}function N(T){return D(T)===g}function I(T){return D(T)===h}function H(T){return D(T)===t}function ee(T){return D(T)===a}function z(T){return D(T)===s}function oe(T){return D(T)===u}ae.AsyncMode=v,ae.ConcurrentMode=C,ae.ContextConsumer=L,ae.ContextProvider=q,ae.Element=V,ae.ForwardRef=$,ae.Fragment=Y,ae.Lazy=K,ae.Memo=te,ae.Portal=X,ae.Profiler=ce,ae.StrictMode=Q,ae.Suspense=W,ae.isAsyncMode=P,ae.isConcurrentMode=y,ae.isContextConsumer=m,ae.isContextProvider=_,ae.isElement=R,ae.isForwardRef=S,ae.isFragment=A,ae.isLazy=N,ae.isMemo=I,ae.isPortal=H,ae.isProfiler=ee,ae.isStrictMode=z,ae.isSuspense=oe,ae.isValidElementType=j,ae.typeOf=D}()),ae}var zt;function Or(){return zt||(zt=1,process.env.NODE_ENV==="production"?tt.exports=tn():tt.exports=rn()),tt.exports}/*
|
|
50
50
|
object-assign
|
|
51
51
|
(c) Sindre Sorhus
|
|
52
52
|
@license MIT
|
|
53
|
-
*/var
|
|
54
|
-
Valid keys: `+JSON.stringify(Object.keys(m),null," "));var _=le(N,B,E,P,k+"."+B,t);if(_)return _}return null}return b(v)}function te(m){switch(typeof m){case"number":case"string":case"undefined":return!0;case"boolean":return!m;case"object":if(Array.isArray(m))return m.every(te);if(m===null||l(m))return!0;var v=d(m);if(v){var R=v.call(m),C;if(v!==m.entries){for(;!(C=R.next()).done;)if(!te(C.value))return!1}else for(;!(C=R.next()).done;){var E=C.value;if(E&&!te(E[1]))return!1}}else return!1;return!0;default:return!1}}function ee(m,v){return m==="symbol"?!0:v?v["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&v instanceof Symbol:!1}function ie(m){var v=typeof m;return Array.isArray(m)?"array":m instanceof RegExp?"object":ee(v,m)?"symbol":v}function q(m){if(typeof m>"u"||m===null)return""+m;var v=ie(m);if(v==="object"){if(m instanceof Date)return"date";if(m instanceof RegExp)return"regexp"}return v}function Z(m){var v=q(m);switch(v){case"array":case"object":return"an "+v;case"boolean":case"date":case"regexp":return"a "+v;default:return v}}function T(m){return!m.constructor||!m.constructor.name?f:m.constructor.name}return h.checkPropTypes=s,h.resetWarningCache=s.resetWarningCache,h.PropTypes=h,h},St}var Et,Xt;function nn(){if(Xt)return Et;Xt=1;var n=Pt();function e(){}function t(){}return t.resetWarningCache=e,Et=function(){function r(i,l,o,u,c,d){if(d!==n){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function s(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:e};return a.PropTypes=a,a},Et}var Zt;function sn(){if(Zt)return et.exports;if(Zt=1,process.env.NODE_ENV!=="production"){var n=Er(),e=!0;et.exports=rn()(n.isElement,e)}else et.exports=nn()();return et.exports}var ce=sn(),an=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},on=function(e,t){for(var r in e)if(!(r in t))return!0;for(var s in t)if(e[s]!==t[s])return!0;return!1},ln=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],rt="http://www.w3.org/2000/svg",Qt="http://www.w3.org/1999/xlink",it=function(n){function e(){for(var r,s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];return r=n.call.apply(n,[this].concat(a))||this,r.initialState={hasError:!1,isLoading:!0},r.state=r.initialState,r._isMounted=!1,r.reactWrapper=void 0,r.nonReactWrapper=void 0,r.refCallback=function(l){r.reactWrapper=l},r}Ur(e,n);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof an(this.reactWrapper).Node){var a=this.props,i=a.desc,l=a.evalScripts,o=a.httpRequestWithCredentials,u=a.renumerateIRIElements,c=a.src,d=a.title,f=a.useRequestCache,h=this.props.onError,g=this.props.beforeInjection,y=this.props.afterInjection,b=this.props.wrapper,S,w;b==="svg"?(S=document.createElementNS(rt,b),S.setAttribute("xmlns",rt),S.setAttribute("xmlns:xlink",Qt),w=document.createElementNS(rt,b)):(S=document.createElement(b),w=document.createElement(b)),S.appendChild(w),w.dataset.src=c,this.nonReactWrapper=this.reactWrapper.appendChild(S);var D=function(L){if(s.removeSVG(),!s._isMounted){h(L);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){h(L)})},j=function(L,H){if(L){D(L);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{y(H)}catch(Y){D(Y)}})},x=function(L){if(L.setAttribute("role","img"),i){var H=L.querySelector(":scope > desc");H&&L.removeChild(H);var Y=document.createElement("desc");Y.innerHTML=i,L.prepend(Y)}if(d){var U=L.querySelector(":scope > title");U&&L.removeChild(U);var A=document.createElement("title");A.innerHTML=d,L.prepend(A)}try{g(L)}catch(K){D(K)}};Xr(w,{afterEach:j,beforeEach:x,cacheRequests:f,evalScripts:l,httpRequestWithCredentials:o,renumerateIRIElements:u})}},t.removeSVG=function(){var s;(s=this.nonReactWrapper)!=null&&s.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},t.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},t.componentDidUpdate=function(s){var a=this;on(at({},s),this.props)&&this.setState(function(){return a.initialState},function(){a.removeSVG(),a.renderSVG()})},t.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},t.render=function(){var s=this.props;s.afterInjection,s.beforeInjection,s.desc,s.evalScripts;var a=s.fallback;s.httpRequestWithCredentials;var i=s.loading;s.renumerateIRIElements,s.src,s.title,s.useRequestCache;var l=s.wrapper,o=Yr(s,ln),u=l;return Xe.createElement(u,at({},o,{ref:this.refCallback},l==="svg"?{xmlns:rt,xmlnsXlink:Qt}:{}),this.state.isLoading&&i&&Xe.createElement(i,null),this.state.hasError&&a&&Xe.createElement(a,null))},e}(Xe.Component);it.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};it.propTypes={afterInjection:ce.func,beforeInjection:ce.func,desc:ce.string,evalScripts:ce.oneOf(["always","once","never"]),fallback:ce.oneOfType([ce.func,ce.object,ce.string]),httpRequestWithCredentials:ce.bool,loading:ce.oneOfType([ce.func,ce.object,ce.string]),onError:ce.func,renumerateIRIElements:ce.bool,src:ce.string.isRequired,title:ce.string,useRequestCache:ce.bool,wrapper:ce.oneOf(["div","span","svg"])};const Ye={"smp-icon":"_smp-icon_ttsft_1","smp-icon-rotated":"_smp-icon-rotated_ttsft_15","smp-icon-base":"_smp-icon-base_ttsft_19","smp-icon-interactable":"_smp-icon-interactable_ttsft_22","smp-icon-danger":"_smp-icon-danger_ttsft_33","smp-icon-warning":"_smp-icon-warning_ttsft_37","smp-icon-onDanger":"_smp-icon-onDanger_ttsft_45","smp-icon-onPrimary":"_smp-icon-onPrimary_ttsft_49","smp-icon-spin":"_smp-icon-spin_ttsft_53"};let Rt={assets:"/"};const un=n=>{Rt={...Rt,...n}},er=n=>`${Rt.assets}/${n}`.replace(/\/+/g,"/"),Re=F.memo(({icon:n,width:e,height:t,placeholderIcon:r,color:s,disabled:a,state:i="base",rotated:l=!1,onClick:o,isInteractable:u=!1,spin:c=!1})=>{const[d,f]=F.useState(n),h=n.indexOf(".")>-1||n.indexOf("/")>-1||n.indexOf("\\")>-1,g=er(`assets/svg/${n}.svg`),y=er(`assets/svg/${r}.svg`),b={svg:`${Ye["smp-icon"]} ${i?Ye[`smp-icon-${i}`]:""} ${l?Ye["smp-icon-rotated"]:""} ${u?Ye["smp-icon-interactable"]:""} ${c?Ye["smp-icon-spin"]:""}`},S=()=>{!a&&o&&o()};return O.jsx(O.Fragment,{children:h?O.jsx("img",{src:d,width:e||"16px",height:t||"auto",alt:n||"image",onError:()=>f(y)}):O.jsx(it,{src:g,fallback:()=>O.jsx(it,{src:y,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:n,role:"application",fill:s,"aria-disabled":a,className:b.svg,onClick:S})})}),Ue={"smp-dash-list":"_smp-dash-list_ajkcc_1","smp-dash-list-fill-space":"_smp-dash-list-fill-space_ajkcc_25","smp-dash-list-horizontal":"_smp-dash-list-horizontal_ajkcc_30","smp-layout-1":"_smp-layout-1_ajkcc_34","smp-layout-2":"_smp-layout-2_ajkcc_38","smp-layout-1__descr":"_smp-layout-1__descr_ajkcc_67","smp-layout-2__descr":"_smp-layout-2__descr_ajkcc_68","smp-layout-1__value":"_smp-layout-1__value_ajkcc_76","smp-layout-2__value":"_smp-layout-2__value_ajkcc_77","smp-layout-2__icon":"_smp-layout-2__icon_ajkcc_84"},z=n=>typeof n=="string",We=()=>{let n,e;const t=new Promise((r,s)=>{n=r,e=s});return t.resolve=n,t.reject=e,t},tr=n=>n==null?"":""+n,cn=(n,e,t)=>{n.forEach(r=>{e[r]&&(t[r]=e[r])})},fn=/###/g,rr=n=>n&&n.indexOf("###")>-1?n.replace(fn,"."):n,nr=n=>!n||z(n),Ke=(n,e,t)=>{const r=z(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(nr(n))return{};const a=rr(r[s]);!n[a]&&t&&(n[a]=new t),Object.prototype.hasOwnProperty.call(n,a)?n=n[a]:n={},++s}return nr(n)?{}:{obj:n,k:rr(r[s])}},sr=(n,e,t)=>{const{obj:r,k:s}=Ke(n,e,Object);if(r!==void 0||e.length===1){r[s]=t;return}let a=e[e.length-1],i=e.slice(0,e.length-1),l=Ke(n,i,Object);for(;l.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),l=Ke(n,i,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${a}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=t},dn=(n,e,t,r)=>{const{obj:s,k:a}=Ke(n,e,Object);s[a]=s[a]||[],s[a].push(t)},ot=(n,e)=>{const{obj:t,k:r}=Ke(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r]},pn=(n,e,t)=>{const r=ot(n,t);return r!==void 0?r:ot(e,t)},Or=(n,e,t)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?z(n[r])||n[r]instanceof String||z(e[r])||e[r]instanceof String?t&&(n[r]=e[r]):Or(n[r],e[r],t):n[r]=e[r]);return n},ke=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const gn=n=>z(n)?n.replace(/[&<>"'\/]/g,e=>hn[e]):n;class mn{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const yn=[" ",",","?","!",";"],vn=new mn(20),bn=(n,e,t)=>{e=e||"",t=t||"";const r=yn.filter(i=>e.indexOf(i)<0&&t.indexOf(i)<0);if(r.length===0)return!0;const s=vn.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!s.test(n);if(!a){const i=n.indexOf(t);i>0&&!s.test(n.substring(0,i))&&(a=!0)}return a},At=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const r=e.split(t);let s=n;for(let a=0;a<r.length;){if(!s||typeof s!="object")return;let i,l="";for(let o=a;o<r.length;++o)if(o!==a&&(l+=t),l+=r[o],i=s[l],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&o<r.length-1)continue;a+=o-a+1;break}s=i}return s},lt=n=>n==null?void 0:n.replace("_","-"),xn={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){var t,r;(r=(t=console==null?void 0:console[n])==null?void 0:t.apply)==null||r.call(t,console,e)}};class ut{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||xn,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,s){return s&&!this.debug?null:(z(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ut(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new ut(this.logger,e)}}var Se=new ut;class ht{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(t)||0;this.observers[r].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(i=>{let[l,o]=i;for(let u=0;u<o;u++)l(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[l,o]=i;for(let u=0;u<o;u++)l.apply(l,[e,...r])})}}class ar extends ht{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r){var u,c;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.indexOf(".")>-1?l=e.split("."):(l=[e,t],r&&(Array.isArray(r)?l.push(...r):z(r)&&a?l.push(...r.split(a)):l.push(r)));const o=ot(this.data,l);return!o&&!t&&!r&&e.indexOf(".")>-1&&(e=l[0],t=l[1],r=l.slice(2).join(".")),o||!i||!z(r)?o:At((c=(u=this.data)==null?void 0:u[e])==null?void 0:c[t],r,a)}addResource(e,t,r,s){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[e,t];r&&(l=l.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(l=e.split("."),s=t,t=l[1]),this.addNamespaces(t),sr(this.data,l,s),a.silent||this.emit("added",e,t,r,s)}addResources(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(z(r[a])||Array.isArray(r[a]))&&this.addResource(e,t,a,r[a],{silent:!0});s.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,s,a){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[e,t];e.indexOf(".")>-1&&(l=e.split("."),s=r,r=t,t=l[1]),this.addNamespaces(t);let o=ot(this.data,l)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?Or(o,r,a):o={...o,...r},sr(this.data,l,o),i.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var Tr={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,r,s){return n.forEach(a=>{var i;e=((i=this.processors[a])==null?void 0:i.process(e,t,r,s))??e}),e}};const ir={},or=n=>!z(n)&&typeof n!="boolean"&&typeof n!="number";class ct extends ht{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),cn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Se.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,t);return(r==null?void 0:r.res)!==void 0}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!bn(e,r,s);if(i&&!l){const o=e.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:e,namespaces:z(a)?[a]:a};const u=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(s)}return{key:e,namespaces:z(a)?[a]:a}}translate(e,t,r){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,a=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:i,namespaces:l}=this.extractFromKey(e[e.length-1],t),o=l[l.length-1],u=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode"){if(c){const A=t.nsSeparator||this.options.nsSeparator;return s?{res:`${o}${A}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:o,usedParams:this.getUsedParamsDetails(t)}:`${o}${A}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:o,usedParams:this.getUsedParamsDetails(t)}:i}const d=this.resolve(e,t);let f=d==null?void 0:d.res;const h=(d==null?void 0:d.usedKey)||i,g=(d==null?void 0:d.exactUsedKey)||i,y=["[object Number]","[object Function]","[object RegExp]"],b=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,w=t.count!==void 0&&!z(t.count),D=ct.hasDefaultValue(t),j=w?this.pluralResolver.getSuffix(u,t.count,t):"",x=t.ordinal&&w?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",W=w&&!t.ordinal&&t.count===0,L=W&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${j}`]||t[`defaultValue${x}`]||t.defaultValue;let H=f;S&&!f&&D&&(H=L);const Y=or(H),U=Object.prototype.toString.apply(H);if(S&&H&&Y&&y.indexOf(U)<0&&!(z(b)&&Array.isArray(H))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const A=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,H,{...t,ns:l}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(d.res=A,d.usedParams=this.getUsedParamsDetails(t),d):A}if(a){const A=Array.isArray(H),K=A?[]:{},J=A?g:h;for(const te in H)if(Object.prototype.hasOwnProperty.call(H,te)){const ee=`${J}${a}${te}`;D&&!f?K[te]=this.translate(ee,{...t,defaultValue:or(L)?L[te]:void 0,joinArrays:!1,ns:l}):K[te]=this.translate(ee,{...t,joinArrays:!1,ns:l}),K[te]===ee&&(K[te]=H[te])}f=K}}else if(S&&z(b)&&Array.isArray(f))f=f.join(b),f&&(f=this.extendTranslation(f,e,t,r));else{let A=!1,K=!1;!this.isValidLookup(f)&&D&&(A=!0,f=L),this.isValidLookup(f)||(K=!0,f=i);const te=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&K?void 0:f,ee=D&&L!==f&&this.options.updateMissing;if(K||A||ee){if(this.logger.log(ee?"updateKey":"missingKey",u,o,i,ee?L:f),a){const T=this.resolve(i,{...t,keySeparator:!1});T&&T.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ie=[];const q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&q&&q[0])for(let T=0;T<q.length;T++)ie.push(q[T]);else this.options.saveMissingTo==="all"?ie=this.languageUtils.toResolveHierarchy(t.lng||this.language):ie.push(t.lng||this.language);const Z=(T,m,v)=>{var C;const R=D&&v!==f?v:te;this.options.missingKeyHandler?this.options.missingKeyHandler(T,o,m,R,ee,t):(C=this.backendConnector)!=null&&C.saveMissing&&this.backendConnector.saveMissing(T,o,m,R,ee,t),this.emit("missingKey",T,o,m,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?ie.forEach(T=>{const m=this.pluralResolver.getSuffixes(T,t);W&&t[`defaultValue${this.options.pluralSeparator}zero`]&&m.indexOf(`${this.options.pluralSeparator}zero`)<0&&m.push(`${this.options.pluralSeparator}zero`),m.forEach(v=>{Z([T],i+v,t[`defaultValue${v}`]||L)})}):Z(ie,i,L))}f=this.extendTranslation(f,e,t,d,r),K&&f===i&&this.options.appendNamespaceToMissingKey&&(f=`${o}:${i}`),(K||A)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${o}:${i}`:i,A?f:void 0))}return s?(d.res=f,d.usedParams=this.getUsedParamsDetails(t),d):f}extendTranslation(e,t,r,s,a){var u,c;var i=this;if((u=this.i18nFormat)!=null&&u.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const d=z(e)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(d){const g=e.match(this.interpolator.nestingRegexp);f=g&&g.length}let h=r.replace&&!z(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,r.lng||this.language||s.usedLng,r),d){const g=e.match(this.interpolator.nestingRegexp),y=g&&g.length;f<y&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var g=arguments.length,y=new Array(g),b=0;b<g;b++)y[b]=arguments[b];return(a==null?void 0:a[0])===y[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${t[0]}`),null):i.translate(...y,t)},r)),r.interpolation&&this.interpolator.reset()}const l=r.postProcess||this.options.postProcess,o=z(l)?[l]:l;return e!=null&&(o!=null&&o.length)&&r.applyPostProcessor!==!1&&(e=Tr.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,a,i,l;return z(e)&&(e=[e]),e.forEach(o=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(o,t),c=u.key;s=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=t.count!==void 0&&!z(t.count),h=f&&!t.ordinal&&t.count===0,g=t.context!==void 0&&(z(t.context)||typeof t.context=="number")&&t.context!=="",y=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);d.forEach(b=>{var S,w;this.isValidLookup(r)||(l=b,!ir[`${y[0]}-${b}`]&&((S=this.utils)!=null&&S.hasLoadedNamespace)&&!((w=this.utils)!=null&&w.hasLoadedNamespace(l))&&(ir[`${y[0]}-${b}`]=!0,this.logger.warn(`key "${s}" for languages "${y.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),y.forEach(D=>{var W;if(this.isValidLookup(r))return;i=D;const j=[c];if((W=this.i18nFormat)!=null&&W.addLookupKeys)this.i18nFormat.addLookupKeys(j,c,D,b,t);else{let L;f&&(L=this.pluralResolver.getSuffix(D,t.count,t));const H=`${this.options.pluralSeparator}zero`,Y=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(j.push(c+L),t.ordinal&&L.indexOf(Y)===0&&j.push(c+L.replace(Y,this.options.pluralSeparator)),h&&j.push(c+H)),g){const U=`${c}${this.options.contextSeparator}${t.context}`;j.push(U),f&&(j.push(U+L),t.ordinal&&L.indexOf(Y)===0&&j.push(U+L.replace(Y,this.options.pluralSeparator)),h&&j.push(U+H))}}let x;for(;x=j.pop();)this.isValidLookup(r)||(a=x,r=this.getResource(D,b,x,t))}))})}),{res:r,usedKey:s,exactUsedKey:a,usedLng:i,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r){var a;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,r,s):this.resourceStore.getResource(e,t,r,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!z(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const a of t)delete s[a]}return s}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&e[r]!==void 0)return!0;return!1}}class lr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Se.create("languageUtils")}getScriptPartFromCode(e){if(e=lt(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=lt(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(z(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(r=>{if(t)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const s=this.getScriptPartFromCode(r);if(this.isSupportedCode(s))return t=s;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),z(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],a=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return z(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):z(e)&&a(this.formatLanguageCode(e)),r.forEach(i=>{s.indexOf(i)<0&&a(this.formatLanguageCode(i))}),s}}const ur={zero:0,one:1,two:2,few:3,many:4,other:5},cr={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Sn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Se.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=lt(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:s});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),cr;if(!e.match(/-|_/))return cr;const o=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(o,t)}return this.pluralRulesCache[a]=i,i}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${t}${s}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((s,a)=>ur[s]-ur[a]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const fr=function(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=pn(n,e,t);return!a&&s&&z(t)&&(a=At(n,t,r),a===void 0&&(a=At(e,t,r))),a},wt=n=>n.replace(/\$/g,"$$$$");class En{constructor(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Se.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:s,prefix:a,prefixEscaped:i,suffix:l,suffixEscaped:o,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:b,maxReplaces:S,alwaysFormat:w}=e.interpolation;this.escape=t!==void 0?t:gn,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?ke(a):i||"{{",this.suffix=l?ke(l):o||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?ke(f):h||ke("$t("),this.nestingSuffix=g?ke(g):y||ke(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=S||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,r)=>(t==null?void 0:t.source)===r?(t.lastIndex=0,t):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,r,s){var h;let a,i,l;const o=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=g=>{if(g.indexOf(this.formatSeparator)<0){const w=fr(t,o,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...s,...t,interpolationkey:g}):w}const y=g.split(this.formatSeparator),b=y.shift().trim(),S=y.join(this.formatSeparator).trim();return this.format(fr(t,o,b,this.options.keySeparator,this.options.ignoreJSONStructure),S,r,{...s,...t,interpolationkey:b})};this.resetRegExp();const c=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((h=s==null?void 0:s.interpolation)==null?void 0:h.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>wt(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?wt(this.escape(g)):wt(g)}].forEach(g=>{for(l=0;a=g.regex.exec(e);){const y=a[1].trim();if(i=u(y),i===void 0)if(typeof c=="function"){const S=c(e,a,s);i=z(S)?S:""}else if(s&&Object.prototype.hasOwnProperty.call(s,y))i="";else if(d){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),i="";else!z(i)&&!this.useRawValueToEscape&&(i=tr(i));const b=g.safeValue(i);if(e=e.replace(a[0],b),d?(g.regex.lastIndex+=i.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,a,i;const l=(o,u)=>{const c=this.nestingOptionsSeparator;if(o.indexOf(c)<0)return o;const d=o.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;o=d[0],f=this.interpolate(f,i);const h=f.match(/'/g),g=f.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!g||g.length%2!==0)&&(f=f.replace(/'/g,'"'));try{i=JSON.parse(f),u&&(i={...u,...i})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${o}`,y),`${o}${c}${f}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,o};for(;s=this.nestingRegexp.exec(e);){let o=[];i={...r},i=i.replace&&!z(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const c=s[1].split(this.formatSeparator).map(d=>d.trim());s[1]=c.shift(),o=c,u=!0}if(a=t(l.call(this,s[1].trim(),i),i),a&&s[0]===e&&!z(a))return a;z(a)||(a=tr(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),a=""),u&&(a=o.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:s[1].trim()}),a.trim())),e=e.replace(s[0],a),this.regexp.lastIndex=0}return e}}const wn=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const r=n.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(i=>{if(i){const[l,...o]=i.split(":"),u=o.join(":").trim().replace(/^'+|'+$/g,""),c=l.trim();t[c]||(t[c]=u),u==="false"&&(t[c]=!1),u==="true"&&(t[c]=!0),isNaN(u)||(t[c]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},Le=n=>{const e={};return(t,r,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});const i=r+JSON.stringify(a);let l=e[i];return l||(l=n(lt(r),s),e[i]=l),l(t)}};class On{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Se.create("formatter"),this.options=e,this.formats={number:Le((t,r)=>{const s=new Intl.NumberFormat(t,{...r});return a=>s.format(a)}),currency:Le((t,r)=>{const s=new Intl.NumberFormat(t,{...r,style:"currency"});return a=>s.format(a)}),datetime:Le((t,r)=>{const s=new Intl.DateTimeFormat(t,{...r});return a=>s.format(a)}),relativetime:Le((t,r)=>{const s=new Intl.RelativeTimeFormat(t,{...r});return a=>s.format(a,r.range||"day")}),list:Le((t,r)=>{const s=new Intl.ListFormat(t,{...r});return a=>s.format(a)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Le(t)}format(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(l=>l.indexOf(")")>-1)){const l=a.findIndex(o=>o.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,o)=>{var d;const{formatName:u,formatOptions:c}=wn(o);if(this.formats[u]){let f=l;try{const h=((d=s==null?void 0:s.formatParams)==null?void 0:d[s.interpolationkey])||{},g=h.locale||h.lng||s.locale||s.lng||r;f=this.formats[u](l,g,{...c,...s,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return l},e)}}const Tn=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class _n extends ht{constructor(e,t,r){var a,i;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Se.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(i=(a=this.backend)==null?void 0:a.init)==null||i.call(a,r,s.backend,s)}queueLoad(e,t,r,s){const a={},i={},l={},o={};return e.forEach(u=>{let c=!0;t.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?i[f]===void 0&&(i[f]=!0):(this.state[f]=1,c=!1,i[f]===void 0&&(i[f]=!0),a[f]===void 0&&(a[f]=!0),o[d]===void 0&&(o[d]=!0)))}),c||(l[u]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(o)}}loaded(e,t,r){const s=e.split("|"),a=s[0],i=s[1];t&&this.emit("failedLoading",a,i,t),!t&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const l={};this.queue.forEach(o=>{dn(o.loaded,[a],i),Tn(o,e),t&&o.errors.push(t),o.pendingCount===0&&!o.done&&(Object.keys(o.loaded).forEach(u=>{l[u]||(l[u]={});const c=o.loaded[u];c.length&&c.forEach(d=>{l[u][d]===void 0&&(l[u][d]=!0)})}),o.done=!0,o.errors.length?o.callback(o.errors):o.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(o=>!o.done)}read(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:s,wait:a,callback:i});return}this.readingCalls++;const l=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,r,s+1,a*2,i)},a);return}i(u,c)},o=this.backend[r].bind(this.backend);if(o.length===2){try{const u=o(e,t);u&&typeof u.then=="function"?u.then(c=>l(null,c)).catch(l):l(null,u)}catch(u){l(u)}return}return o(e,t,l)}prepareLoading(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=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."),s&&s();z(e)&&(e=this.languageUtils.toResolveHierarchy(e)),z(t)&&(t=[t]);const a=this.queueLoad(e,t,r,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],a=r[1];this.read(s,a,"read",void 0,void 0,(i,l)=>{i&&this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`,i),!i&&l&&this.logger.log(`${t}loaded namespace ${a} for language ${s}`,l),this.loaded(e,i,l)})}saveMissing(e,t,r,s,a){var o,u,c,d,f;let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((u=(o=this.services)==null?void 0:o.utils)!=null&&u.hasLoadedNamespace&&!((d=(c=this.services)==null?void 0:c.utils)!=null&&d.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){const h={...i,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let y;g.length===5?y=g(e,t,r,s,h):y=g(e,t,r,s),y&&typeof y.then=="function"?y.then(b=>l(null,b)).catch(l):l(null,y)}catch(y){l(y)}else g(e,t,r,s,l,h)}!e||!e[0]||this.store.addResource(e[0],t,r,s)}}}const dr=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),z(n[1])&&(e.defaultValue=n[1]),z(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(r=>{e[r]=t[r]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),pr=n=>{var e,t;return z(n.ns)&&(n.ns=[n.ns]),z(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),z(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((t=(e=n.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},nt=()=>{},Rn=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class ze extends ht{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=pr(e),this.services={},this.logger=Se,this.modules={external:[]},Rn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(z(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=dr();this.options={...s,...this.options,...pr(t)},this.options.interpolation={...s.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const a=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Se.init(a(this.modules.logger),this.options):Se.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=On;const d=new lr(this.options);this.store=new ar(this.options.resources,this.options);const f=this.services;f.logger=Se,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new Sn(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(f.formatter=a(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new En(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new _n(a(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(h){for(var g=arguments.length,y=new Array(g>1?g-1:0),b=1;b<g;b++)y[b-1]=arguments[b];e.emit(h,...y)}),this.modules.languageDetector&&(f.languageDetector=a(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=a(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new ct(this.services,this.options),this.translator.on("*",function(h){for(var g=arguments.length,y=new Array(g>1?g-1:0),b=1;b<g;b++)y[b-1]=arguments[b];e.emit(h,...y)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=nt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const o=We(),u=()=>{const c=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(f),r(d,f)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),o}loadResources(e){var a,i;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nt;const s=z(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const l=[],o=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(d=>{d!=="cimode"&&l.indexOf(d)<0&&l.push(d)})};s?o(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>o(c)),(i=(a=this.options.preload)==null?void 0:a.forEach)==null||i.call(a,u=>o(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(e,t,r){const s=We();return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=nt),this.services.backendConnector.reload(e,t,a=>{s.resolve(),r(a)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Tr.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,t){var r=this;this.isLanguageChangingTo=e;const s=We();this.emit("languageChanging",e);const a=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},i=(o,u)=>{u?this.isLanguageChangingTo===e&&(a(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),t&&t(o,function(){return r.t(...arguments)})},l=o=>{var c,d;!e&&!o&&this.services.languageDetector&&(o=[]);const u=this.services.languageUtils.getBestMatchFromCodes(z(o)?[o]:o);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),(d=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||d.call(c,u)),this.loadResources(u,f=>{i(f,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e),s}getFixedT(e,t,r){var s=this;const a=function(i,l){let o;if(typeof l!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d<u;d++)c[d-2]=arguments[d];o=s.options.overloadTranslationOptionHandler([i,l].concat(c))}else o={...l};o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs,o.ns=o.ns||a.ns,o.keyPrefix!==""&&(o.keyPrefix=o.keyPrefix||r||a.keyPrefix);const f=s.options.keySeparator||".";let h;return o.keyPrefix&&Array.isArray(i)?h=i.map(g=>`${o.keyPrefix}${f}${g}`):h=o.keyPrefix?`${o.keyPrefix}${f}${i}`:i,s.t(h,o)};return z(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=r,a}t(){var s;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(s=this.translator)==null?void 0:s.translate(...t)}exists(){var s;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(s=this.translator)==null?void 0:s.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=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;const r=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(l,o)=>{const u=this.services.backendConnector.state[`${l}|${o}`];return u===-1||u===0||u===2};if(t.precheck){const l=t.precheck(this,i);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!s||i(a,e)))}loadNamespaces(e,t){const r=We();return this.options.ns?(z(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),t&&t(s)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=We();z(e)&&(e=[e]);const s=this.options.preload||[],a=e.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=s.concat(a),this.loadResources(i=>{r.resolve(),t&&t(i)}),r):(t&&t(),Promise.resolve())}dir(e){var s,a;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";const t=["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"],r=((a=this.services)==null?void 0:a.languageUtils)||new lr(dr());return t.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ze(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nt;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new ze(s);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const l=Object.keys(this.store.data).reduce((o,u)=>(o[u]={...this.store.data[u]},Object.keys(o[u]).reduce((c,d)=>(c[d]={...o[u][d]},c),{})),{});a.store=new ar(l,s),a.services.resourceStore=a.store}return a.translator=new ct(a.services,s),a.translator.on("*",function(l){for(var o=arguments.length,u=new Array(o>1?o-1:0),c=1;c<o;c++)u[c-1]=arguments[c];a.emit(l,...u)}),a.init(s,t),a.translator.options=s,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const fe=ze.createInstance();fe.createInstance=ze.createInstance;fe.createInstance;fe.dir;fe.init;fe.loadResources;fe.reloadResources;fe.use;fe.changeLanguage;fe.getFixedT;fe.t;fe.exists;fe.setDefaultNamespace;fe.hasLoadedNamespace;fe.loadNamespaces;fe.loadLanguages;const An={Friday:"Venerdì",FridayShort:"Ven",Monday:"Lunedì",MondayShort:"Lun",Saturday:"Sabato",SaturdayShort:"Sab",Sunday:"Domenica",SundayShort:"Dom",Tuesday:"Martedì",TuesdayShort:"Mar",Thursday:"Giovedì",ThursdayShort:"Gio",Wednesday:"Mercoledì",WednesdayShort:"Mer"},Cn={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},Pn={CalendarFor:"Calendario per",Close:"Chiudi"},jn={Date:{NextDay:"Giorno Successivo",NextMonth:"Mese Successivo",NextWeek:"Settimana Successiva",NextYear:"Anno Successivo",PreviousDay:"Giorno Precedente",PreviousMonth:"Mese Precedente",PreviousWeek:"Settimana Precedente",PreviousYear:"Anno Precedente",Today:"Oggi",Tomorrow:"Domani",Yesterday:"Ieri"},Day:An,Month:Cn,Generic:Pn},Dn={Friday:"Friday",FridayShort:"Fri",Monday:"Monday",MondayShort:"Mon",Saturday:"Saturday",SaturdayShort:"Sat",Sunday:"Sunday",SundayShort:"Sun",Tuesday:"Tuesday",TuesdayShort:"Tue",Thursday:"Thursday",ThursdayShort:"Thu",Wednesday:"Wednesday",WednesdayShort:"Wed"},$n={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},kn={CalendarFor:"Calendar for",Close:"Close"},Ln={Date:{NextDay:"Next Day",NextMonth:"Next Month",NextWeek:"Next Week",NextYear:"Next Year",PreviousDay:"Previous Day",PreviousMonth:"Previous Month",PreviousWeek:"Previous Week",PreviousYear:"Previous Year",Today:"Today",Tomorrow:"Tomorrow",Yesterday:"Yesterday"},Day:Dn,Month:$n,Generic:kn};function hr(n,e){return new RegExp(Nn(n),e)}function Nn(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function In(n,e,t,r){let s=e;const a=Mn(n,t);if(!s){const l=Math.abs(a);l-Math.floor(l)?s="0,0.00":s="0,0"}const i=Fn(s);return new Intl.NumberFormat(r,i).format(a)}function Mn(n,e,t,r,s){let a=n;if(typeof a!="number"){let l;e&&r===void 0?l=",":l=".";const o=l=="."?",":".";a=a.replace(hr(o,"g"),""),a=a.replace(hr(l,"g"),"."),a=Number(a)}const i=Number(a);return isNaN(i)?NaN:i}function Fn(n){const e={};n.includes(",")?e.useGrouping=!0:e.useGrouping=!1;const t=n.indexOf(".");if(t>-1){const s=(n.substring(t+1).match(/0/g)||[]).length;e.minimumFractionDigits=s,e.maximumFractionDigits=s}else e.minimumFractionDigits=0,e.maximumFractionDigits=0;return e}fe.init({lng:navigator.language.split("-")[0],fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,e,t,r)=>{if(!isNaN(Number(n))){const s=(r==null?void 0:r.inputIsLocalized)??!1;return In(n,e,s,t)}return n}},resources:{en:{translation:Ln},it:{translation:jn}}});const Vn=(n,e,t,r)=>fe.format(n,e,t||fe.language,r),Yn=(n,e)=>fe.t(n,e);function _r(){const n=F.useCallback((t,r,s,a)=>Vn(t,r,s||void 0,a),[]),e=F.useCallback((t,r)=>Yn(t,r),[]);return{format:n,translate:e}}const Be=n=>n==null?!1:typeof n=="string"?n.toLocaleLowerCase()=="yes":n,Un=({ColumnsNumber:n=1,data:e={},ForceText:t,TextColName:r,TextColor:s="var(--smp-dashList-color-base)",Fillspace:a,FontSize:i,Horizontal:l,ForceIcon:o,IconColName:u,IconColor:c="var(--smp-dashList-color-base)",NumberFormat:d,ForceUM:f,UmColName:h,UmColor:g="var(--smp-dashList-color-base)",ForceValue:y,ValueColName:b,ValueColor:S="var(--smp-dashList-color-base)",SelectLayout:w="1",onClick:D})=>{const j="N/A",x=(e==null?void 0:e.columns)||[],W=(e==null?void 0:e.rows)||[],L=W.length>0,H="--smp-dashList-color",Y="smp-layout",U="descr",A="icon",K="um",J="value",te=i||"1em",ee="18px",ie="--smp-dashList-columns",q="--smp-dashList-fontSize",Z={dash:($="1")=>{const G=m($),ne=Ue[G],oe=v(G,U),pe=v(G,A),ve=v(G,K),me=v(G,J);return{container:ne,descr:oe,icon:pe,um:ve,value:me}},dashList:`${Ue["smp-dash-list"]} ${Be(a)?Ue["smp-dash-list-fill-space"]:""}
|
|
55
|
-
${Be(l)?Ue["smp-dash-list-horizontal"]:""}`},{format:T}=_r(),m=$=>`${Y}-${$}`,v=($,G)=>Ue[`${$}__${G}`],R=$=>`${H}-${$}`,C=$=>{const G=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(G.test($)){const oe=$.match(G)||[];if((oe==null?void 0:oe.length)>3)return"rgb("+oe[1]+","+oe[2]+","+oe[3]+")"}return $},E=$=>{if(!d)return $;const[G,ne]=P(d).map(Ee=>parseInt(Ee||"0")),oe="0,0"+(ne?"."+"0".repeat(ne):""),pe=T($,oe,"it");if(!G)return pe;const[ve,me]=pe.split(",");return ve+(me?`,${me}`:"")},P=$=>$.includes(";")?$.split(";"):[$],k=$=>{const G=oe=>{var pe;if(oe)return(pe=$==null?void 0:$.cells[oe])==null?void 0:pe.obj.k},ne=oe=>{var pe,ve;if(!(x.length<=oe))return(ve=(pe=$==null?void 0:$.cells[x[oe].name])==null?void 0:pe.obj)==null?void 0:ve.k};return{descr:t||G(r)||ne(2)||"",icon:o||G(u)||ne(3)||"",um:f||G(h)||ne(1)||"",value:y||G(b)||ne(0)||""}},N=$=>{D==null||D($)},V=($,G)=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),$.stopPropagation(),N(G))},B=($=>{const G=Z.dash($);return{className:G,descr:ne=>O.jsx("div",{className:G.descr,children:ne},`${$}-${U}`),icon:ne=>O.jsx("div",{className:G.icon,children:O.jsx(Re,{color:c,height:ee,icon:ne,width:ee})},`${$}-${A}`),um:ne=>O.jsx("div",{className:G.um,children:ne},`${$}-${K}`),value:ne=>O.jsx("div",{className:G.value,children:ne},`${$}-${J}`)}})(w),le=$=>{const{descr:G,icon:ne,um:oe,value:pe}=k($),ve={[R(U)]:C(s),[R(K)]:C(g),[R(J)]:C(S)},me=[],Ee=E(pe);switch(w){case"2":ne&&me.push(B.icon(ne)),me.push(B.descr(G)),me.push(B.value(oe?Ee+" "+oe:Ee));break;default:case"1":me.push(B.descr(G)),me.push(B.value(oe?Ee+" "+oe:Ee))}return O.jsx("div",{className:B.className.container,role:"button",style:ve,tabIndex:0,onClick:()=>N($),onKeyDown:p=>V(p,$),children:me},$.id)},_={[ie]:String(n),[q]:te};return O.jsx("div",{className:Z.dashList,style:_,children:L?W.map($=>le($)):j})},xe={AUTOCOMPLETE:"ACP",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",ICON:"ICO",MULTI_AUTOCOMPLETE:"AML",TEXT_FIELD:"ITX",PASSWORD:"PWD"},Wn=n=>n.t=="D8",Hn=n=>{if(n){const e=n.split(";");if(e.length==3)return{t:e[0],p:e[1],k:e[2]}}return{t:"",p:"",k:""}};class ft{constructor(e,t){je(this,"class");je(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new ft(e,e.k=="1"||e.k=="true")}getValue(){return this.value}getLegacyValue(){if(this.class.t=="V2"){if(this.class.p=="SI/NO")return this.value?"1":" ";if(this.class.p=="ON/OFF")return this.value?"1":"0"}return this.value?"true":"false"}}class dt{constructor(e,t){je(this,"class");je(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=gr.get(`${e.t}${e.p}`);if(t)return new dt(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=gr.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.date}}const gr=new Map([["D8*YYMD",{legacyToIso(n){return`${n.substring(0,4)}-${n.substring(4,6)}-${n.substring(6,8)}`},isoToLegacy(n){return`${n.substring(0,4)}${n.substring(5,7)}${n.substring(8,10)}`}}]]),jt=(n,e)=>{F.useEffect(()=>{const t=r=>{typeof n=="object"&&n!==null&&"current"in n&&n.current&&!n.current.contains(r.target)&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[n,e])};function Dt({position:n="bottom",enabled:e=!0}){const t=F.useRef(null),r=F.useRef(null),[s,a]=F.useState(0),i=F.useCallback(()=>{const l=t.current,o=r.current;if(!l||!o)return;const{top:u,left:c,width:d,height:f}=l.getBoundingClientRect();a(d);const h=o.offsetHeight,g=o.offsetWidth;if(g===0||h===0){requestAnimationFrame(i);return}let y=u+window.scrollY,b=c+window.scrollX;switch(n){case"top":y-=h;break;case"bottom":y+=f;break;case"left":b-=g;break;case"right":b+=d;break}requestAnimationFrame(()=>{o.style.transform=`translate(${b}px, ${y}px)`})},[n]);return F.useLayoutEffect(()=>{e&&t.current&&r.current&&i();const l=new MutationObserver(()=>{r.current&&i()});return r.current&&l.observe(r.current,{childList:!0,subtree:!0}),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),l.disconnect()}},[i,e]),{anchorRef:t,targetRef:r,anchorWidth:s}}const pt=(n,e,t)=>{if(t)switch(t){case"CodeOnly":return n;case"DescOnly":return e||"";case"Both":return`${n} - ${e}`}return n},He={"smp-list":"_smp-list_1ux5k_1","smp-list-container":"_smp-list-container_1ux5k_18","smp-list-listItem":"_smp-list-listItem_1ux5k_23"},Ot={"smp-helper-text":"_smp-helper-text_10pis_1","smp-helper-text-danger":"_smp-helper-text-danger_10pis_9","smp-helper-text-warning":"_smp-helper-text-warning_10pis_13","smp-helper-text-disabled":"_smp-helper-text-disabled_10pis_17"},qn=({helperText:n,disabled:e,state:t})=>{const r={container:`${Ot["smp-helper-text"]} ${e?Ot["smp-helper-text-disabled"]:""} ${t?Ot[`smp-helper-text-${t}`]:""}`};return O.jsx("span",{className:r.container,children:n})},mr={"smp-label":"_smp-label_3ywt3_1","smp-label-disabled":"_smp-label-disabled_3ywt3_5"},Kn=({label:n,disabled:e})=>{const t={container:`${mr["smp-label"]} ${e?mr["smp-label-disabled"]:""}`};return O.jsx("span",{className:t.container,children:n})},Te={"smp-textfield-wrapper":"_smp-textfield-wrapper_1tjct_4","smp-textfield":"_smp-textfield_1tjct_4","smp-textfield-extraSmall":"_smp-textfield-extraSmall_1tjct_63","smp-textfield-small":"_smp-textfield-small_1tjct_68","smp-textfield-medium":"_smp-textfield-medium_1tjct_73","smp-textfield-large":"_smp-textfield-large_1tjct_78","smp-textfield-extraLarge":"_smp-textfield-extraLarge_1tjct_83","smp-textfield-input":"_smp-textfield-input_1tjct_89","smp-textfield-danger":"_smp-textfield-danger_1tjct_106","smp-textfield-readOnly":"_smp-textfield-readOnly_1tjct_110","smp-textfield-variant-notSelectable":"_smp-textfield-variant-notSelectable_1tjct_115","smp-textfield-disabled":"_smp-textfield-disabled_1tjct_125"},Ie=({disabled:n,readOnly:e,bindValue:t,icon:r,onBlur:s,onChange:a,placeholder:i,shapeIcon:l,sizing:o,state:u,variant:c,rotatedShapeIcon:d=!1,onShapeIconClick:f,ref:h,inputRef:g,onKeyDown:y,inputType:b="text",ariaLabel:S="input field",label:w,helperText:D=!1,error:j})=>{const x=j?"danger":u,W=j||u=="danger"?"error":l,L=D||!!j,H=U=>{a==null||a(U.target.value)},Y={wrapper:`${Te["smp-textfield-wrapper"]}`,container:`${Te["smp-textfield"]} ${n?Te["smp-textfield-disabled"]:""} ${e?Te["smp-textfield-readOnly"]:""} ${i?Te["smp-textfield-placeholder"]:""} ${o?Te[`smp-textfield-${o}`]:""} ${x?Te[`smp-textfield-${x}`]:""} ${c?Te[`smp-textfield-variant-${c}`]:""}`,input:`${Te["smp-textfield-input"]}`};return O.jsxs("div",{className:Y.wrapper,children:[w&&O.jsx(Kn,{label:w,disabled:n}),O.jsxs("div",{className:Y.container,ref:h,children:[r&&O.jsx(Re,{icon:r,disabled:n}),O.jsx("input",{type:b,value:t,placeholder:i,onChange:H,onBlur:s,className:Y.input,disabled:n,readOnly:e,onKeyDown:y,"aria-label":S,ref:g}),W&&O.jsx(Re,{icon:W,disabled:n,state:x,onClick:f,rotated:d})]}),L&&O.jsx(qn,{helperText:j,disabled:n,state:x})]})};function Bn({items:n,itemHeight:e,containerHeight:t,overscan:r=5}){const[s,a]=F.useState(0),i=F.useRef(null),l=n.length*e,o=Math.max(0,Math.floor(s/e)-r),u=Math.min(n.length-1,Math.floor((s+t)/e)+r),c=[];for(let h=o;h<=u;h++)c.push({item:n[h],index:h,offsetTop:h*e});const d=F.useCallback(h=>{const g=h.target.scrollTop;a(g)},[]),f=h=>{if(!i.current)return;const g=h*e,y=g+e,b=i.current,S=b.scrollTop,w=S+t;g<S?b.scrollTop=g:y>w&&(b.scrollTop=y-t)};return{virtualItems:c,containerProps:{ref:i,style:{maxHeight:`${t}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:d},innerProps:{style:{height:`${l}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:s,viewportHeight:t,totalHeight:l,startIndex:o,endIndex:u},scrollToIndex:f}}const zn=10,Rr=({id:n,options:e,displayMode:t,ref:r,showFilter:s,selectedIndex:a=null,activeIndex:i=[],width:l,onClick:o,onKeyDown:u})=>{var U;const[c,d]=F.useState(""),f=24,[h,g]=F.useState(a!==null?a:-1),y=s!==void 0?s:e.length>zn,b=c?e.filter(A=>A.label.toLowerCase().includes(c.toLowerCase())):e,S=A=>{d(A)},{virtualItems:w,containerProps:D,innerProps:j,scrollToIndex:x}=Bn({items:b,itemHeight:f,containerHeight:200,overscan:5});F.useEffect(()=>{a!==null&&a!==h&&g(a)},[a]),F.useEffect(()=>{h>=0&&h<b.length&&x(h)},[h,b]);const W=A=>{if(A.key==="ArrowDown"||A.key==="ArrowUp"){A.preventDefault();let K=h;A.key==="ArrowDown"?K=h<b.length-1?h+1:0:A.key==="ArrowUp"&&(K=h>0?h-1:b.length-1),g(K)}else A.key==="Enter"?h>=0&&h<b.length&&(o==null||o(b[h])):A.key==="Escape"&&(A.preventDefault(),A.stopPropagation());u&&u(A)},L=A=>{W(A)},H=A=>{W(A)},Y={wrapper:`${He["smp-list"]}`,container:`${He["smp-list-container"]}`,virtualScroll:`${He["smp-list-virtualScroll"]}`,listItem:`${He["smp-list-listItem"]}`};return O.jsxs("div",{id:n,ref:r,className:Y.wrapper,style:{width:l},children:[y&&O.jsx(Ie,{bindValue:c,placeholder:"Search...",onChange:S,onKeyDown:L}),O.jsx("div",{...D,className:Y.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:H,"aria-activedescendant":h>=0&&h<b.length?(U=b[h])==null?void 0:U.id:void 0,children:O.jsx("div",{...j,className:Y.virtualScroll,children:w.map(({item:A,index:K,offsetTop:J})=>{const te=i.includes(A.id);return O.jsxs("li",{role:"option",id:A.id,"aria-selected":h===K?"true":"false",tabIndex:-1,className:`${Y.listItem} ${h===K?He["selected-item"]:""}`,"aria-label":A.id+"-"+A.label,style:{height:`${f}px`,lineHeight:`calc(${f}px - 2*2px)`,transform:`translateY(${J}px)`},onClick:()=>{o==null||o(A),g(K)},children:[pt(A.id,A.label,t),te&&O.jsx(Re,{icon:"check",width:16})]},A.id)})})})]})},Ar=({displayMode:n,bindValue:e,optionalDisplayValue:t,...r})=>{const[s,a]=F.useState(pt(e,t,n));return F.useEffect(()=>{a(e)},[e]),F.useEffect(()=>{a(pt(e,t,n))},[t,n]),O.jsx(Ie,{...r,bindValue:s})},Gn=n=>{const e=F.useRef(null);return F.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),r=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{r()},n)}},$t=({bindValue:n,optionalDisplayValue:e,options:t,displayMode:r,listDisplayMode:s="Both",minimumChars:a=3,placeholder:i,fun:l,_changeOnEnter:o=!1,onChange:u,onOptionsRequest:c,_multiActiveIndex:d,...f})=>{const[h,g]=F.useState(n),[y,b]=F.useState(e),[S,w]=F.useState(!1),[D,j]=F.useState(t||[]),[x,W]=F.useState(0),[L,H]=F.useState([n]),{anchorRef:Y,targetRef:U,anchorWidth:A}=Dt({position:"bottom",enabled:S});jt(U,()=>w(!1));const K=Gn(400),J=q=>{q.length>=a?l&&c&&K(async()=>{const Z=await c(l,q);j(Z),W(Z.length>0?0:-1),w(!0)}):w(!1),g(q),b(e),o||u==null||u(q,e)},te=q=>{o?(g(""),b("")):(g(q.id),b(q.label)),u==null||u(q.id,q.label);const Z=D.findIndex(T=>T.id===q.id);W(Z),H([q.id]),w(!1)},ee=q=>{q.key==="Escape"&&(w(!1),W(-1))},ie=q=>{if((q.key==="ArrowDown"||q.key==="ArrowUp")&&(q.preventDefault(),S)){const Z=q.key==="ArrowDown"?(x+1)%D.length:(x-1+D.length)%D.length;W(Z)}switch(q.key){case"Enter":x>=0&&x<D.length?te(D[x]):o&&(u==null||u(h,""),w(!1),g(""),b(""));break;case"Escape":w(!1),W(-1);break}};return O.jsxs("div",{children:[O.jsx(Ar,{...f,bindValue:h,optionalDisplayValue:y,displayMode:r,shapeIcon:"magnify",placeholder:i,ref:Y,onChange:J,onKeyDown:ie,"aria-autocomplete":"list"}),S&&O.jsx(Rr,{options:D,displayMode:s,onClick:te,ref:U,selectedIndex:x,activeIndex:d||L,width:A,showFilter:!1,onKeyDown:ee})]})},qe={"smp-button-container":"_smp-button-container_pte2h_1","smp-button-extraSmall":"_smp-button-extraSmall_pte2h_51","smp-button-small":"_smp-button-small_pte2h_56","smp-button-base":"_smp-button-base_pte2h_61","smp-button-large":"_smp-button-large_pte2h_66","smp-button-extraLarge":"_smp-button-extraLarge_pte2h_71","smp-button-fullWidth":"_smp-button-fullWidth_pte2h_76","smp-buttonType-raised":"_smp-buttonType-raised_pte2h_81","smp-buttonVariant-base":"_smp-buttonVariant-base_pte2h_83","smp-buttonVariant-primary":"_smp-buttonVariant-primary_pte2h_97","smp-buttonVariant-danger":"_smp-buttonVariant-danger_pte2h_111","smp-buttonType-ghost":"_smp-buttonType-ghost_pte2h_138"},Ge=({bindValue:n,onClick:e,ariaLabel:t,icon:r,disabled:s,sizing:a="base",variant:i="primary",type:l="raised",showIcon:o=!0,showText:u=!0,fullWidth:c=!1,loading:d=!1})=>{const f={container:`${qe["smp-button-container"]} ${a?qe[`smp-button-${a}`]:""} ${i?qe[`smp-buttonVariant-${i}`]:""} ${l?qe[`smp-buttonType-${l}`]:""} ${c?qe["smp-button-fullWidth"]:""}`},h=g=>({primary:"onPrimary",danger:"onDanger",base:"base"})[g];return O.jsx("button",{className:f.container,onClick:e,"aria-label":t,disabled:s,"aria-busy":d,children:d?O.jsx(Re,{icon:"spinner",state:h(i),spin:!0}):O.jsxs(O.Fragment,{children:[r&&o&&O.jsx(Re,{icon:r,disabled:s,state:h(i)}),u&&O.jsx("span",{children:n})]})})},Cr=({bindValue:n,onChange:e,onBlur:t})=>{const r=s=>{e&&e(s.target.checked)};return O.jsx("input",{type:"checkbox",checked:n,onChange:r,onBlur:t})},Jn={titleLarge:"h2",title:"h3",body:"h6",label:"label"},Tt={"smp-typography":"_smp-typography_oznk3_1","smp-typography-body":"_smp-typography-body_oznk3_12","smp-typography-large":"_smp-typography-large_oznk3_16","smp-typography-titleLarge":"_smp-typography-titleLarge_oznk3_20","smp-typography-label":"_smp-typography-label_oznk3_24","smp-typography-disabled":"_smp-typography-disabled_oznk3_29"},Xn=({variant:n="body",bindValue:e,...t})=>{const r=Jn[n],s={container:`${Tt["smp-typography"]} ${n?Tt[`smp-typography-${n}`]:""} ${t.disabled?Tt["smp-typography-disabled"]:""}`};return O.jsx(r,{className:s.container,disabled:t.disabled,children:e})},yr={"smp-chips-container":"_smp-chips-container_g7dut_1","smp-chips-element":"_smp-chips-element_g7dut_9"},Pr=({elements:n,isEditable:e=!1,displayMode:t="Both",onChange:r})=>{const s={container:`${yr["smp-chips-container"]}`,element:`${yr["smp-chips-element"]}`},a=i=>{r==null||r(n.filter((l,o)=>o!==i))};return O.jsx("div",{className:s.container,role:"list",children:n.map((i,l)=>{const o=pt(i.bindValue,i.optionalDisplayValue,t);return O.jsxs("div",{className:s.element,role:"listitem",children:[O.jsx(Xn,{variant:"label",bindValue:o}),e&&O.jsx(Re,{icon:"close",isInteractable:!0,onClick:()=>a(l)})]},l)})})};function jr(n,e){const t=F.useRef(null);F.useEffect(()=>{if(!n)return;const r=typeof e=="object"&&e!==null&&"current"in e?e.current:null;if(!r)return;t.current=document.activeElement;const s=()=>r?Array.from(r.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(u=>!u.hasAttribute("disabled")&&u.offsetParent!==null):[];(()=>{const u=s();u.length>0&&requestAnimationFrame(()=>u[0].focus())})();const i=u=>{if(u.key==="Escape"||u.key!=="Tab")return;const c=s();if(c.length===0)return;const d=c[0],f=c[c.length-1];u.shiftKey&&document.activeElement===d?(u.preventDefault(),f.focus()):!u.shiftKey&&document.activeElement===f&&(u.preventDefault(),d.focus())},l=u=>{if(r&&!r.contains(u.target)){u.preventDefault();const c=s();c.length>0&&c[0].focus()}};document.addEventListener("keydown",i),document.addEventListener("mousedown",l);const o=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.removeEventListener("mousedown",l),document.body.style.overflow=o,t.current&&requestAnimationFrame(()=>{var u;(u=t.current)==null||u.focus()})}},[n,e])}const kt=({bindValue:n,onChange:e,options:t=[],optionalDisplayValue:r,displayMode:s,listDisplayMode:a="Both",fun:i,onOptionsRequest:l,multiActiveIndex:o,...u})=>{const[c,d]=F.useState(!1),[f,h]=F.useState(t),[g,y]=F.useState(-1),[b,S]=F.useState([n]),w=F.useId(),{anchorRef:D,targetRef:j,anchorWidth:x}=Dt({position:"bottom",enabled:c});jt(j,()=>d(!1)),jr(c,j);const W=U=>{e==null||e(U.id,U.label);const A=f.findIndex(K=>K.id===U.id);y(A),S([U.id]),d(!1)},L=U=>{U.key==="Escape"&&(d(!1),y(-1))},H=U=>{(U.key==="ArrowDown"||U.key==="ArrowUp")&&(U.preventDefault(),Y())},Y=()=>{i&&l&&l(i,void 0).then(U=>{h(U),y(U.length>0?0:-1),d(!0)})};return O.jsxs("div",{role:"combobox","aria-expanded":c,"aria-controls":w,"aria-owns":w,children:[O.jsx(Ar,{...u,bindValue:n,optionalDisplayValue:r,displayMode:s,onShapeIconClick:Y,onKeyDown:H,shapeIcon:"arrow_drop_down",rotatedShapeIcon:c,readOnly:!0,ref:D,"aria-autocomplete":"list",variant:"notSelectable"}),c&&O.jsx(Rr,{id:w,options:f,displayMode:a,ref:j,selectedIndex:g,activeIndex:o||b,width:x,onClick:W,onKeyDown:L})]})};var Dr=(n=>(n.CALENDAR_FOR="Date.CalendarFor",n.CLOSE="Generic.Close",n))(Dr||{}),ge=(n=>(n.MONDAY="Day.Monday",n.MONDAY_SHORT="Day.MondayShort",n.TUESDAY="Day.Tuesday",n.TUESDAY_SHORT="Day.TuesdayShort",n.WEDNESDAY="Day.Wednesday",n.WEDNESDAY_SHORT="Day.WednesdayShort",n.THURSDAY="Day.Thursday",n.THURSDAY_SHORT="Day.ThursdayShort",n.FRIDAY="Day.Friday",n.FRIDAY_SHORT="Day.FridayShort",n.SATURDAY="Day.Saturday",n.SATURDAY_SHORT="Day.SaturdayShort",n.SUNDAY="Day.Sunday",n.SUNDAY_SHORT="Day.SundayShort",n))(ge||{}),ye=(n=>(n.JANUARY="Month.January",n.FEBRUARY="Month.February",n.MARCH="Month.March",n.APRIL="Month.April",n.MAY="Month.May",n.JUNE="Month.June",n.JULY="Month.July",n.AUGUST="Month.August",n.SEPTEMBER="Month.September",n.OCTOBER="Month.October",n.NOVEMBER="Month.November",n.DECEMBER="Month.December",n))(ye||{}),Ct=(n=>(n.PREVIOUS_DAY="Date.PreviousDay",n.PREVIOUS_WEEK="Date.PreviousWeek",n.PREVIOUS_MONTH="Date.PreviousMonth",n.PREVIOUS_YEAR="Date.PreviousYear",n.NEXT_DAY="Date.NextDay",n.NEXT_WEEK="Date.NextWeek",n.NEXT_MONTH="Date.NextMonth",n.NEXT_YEAR="Date.NextYear",n.YESTERDAY="Date.Yesterday",n.TODAY="Date.Today",n.TOMORROW="Date.Tomorrow",n))(Ct||{});const _e={"smp-datepickercalendar":"_smp-datepickercalendar_vpeb5_1","smp-datepickercalendar-table":"_smp-datepickercalendar-table_vpeb5_30","smp-datepickercalendar-th":"_smp-datepickercalendar-th_vpeb5_42","smp-datepickercalendar-td":"_smp-datepickercalendar-td_vpeb5_53","smp-datepickercalendar-td-today":"_smp-datepickercalendar-td-today_vpeb5_72","smp-datepickercalendar-td-selected":"_smp-datepickercalendar-td-selected_vpeb5_78","smp-datepickercalendar-td-focused":"_smp-datepickercalendar-td-focused_vpeb5_83"};function Zn({selectedDate:n,onDateChange:e,disabledDateRanges:t=[],initialValue:r,targetRef:s}){const{translate:a}=_r(),i=()=>{if(!r)return;const T=new Date(r);return isNaN(T.getTime())?void 0:T},[l]=F.useState(new Date),[o,u]=F.useState(n||i()||new Date),[c,d]=F.useState(o?o.getMonth():new Date().getMonth()),[f,h]=F.useState(o?o.getFullYear():new Date().getFullYear()),[g,y]=F.useState(o?o.getDate():null),b=F.useRef(null),S=F.useRef([]),w=[a(ye.JANUARY),a(ye.FEBRUARY),a(ye.MARCH),a(ye.APRIL),a(ye.MAY),a(ye.JUNE),a(ye.JULY),a(ye.AUGUST),a(ye.SEPTEMBER),a(ye.OCTOBER),a(ye.NOVEMBER),a(ye.DECEMBER)],D=[{value:a(ge.SUNDAY_SHORT),full:a(ge.SUNDAY)},{value:a(ge.MONDAY_SHORT),full:a(ge.MONDAY)},{value:a(ge.TUESDAY_SHORT),full:a(ge.TUESDAY)},{value:a(ge.WEDNESDAY_SHORT),full:a(ge.WEDNESDAY)},{value:a(ge.THURSDAY_SHORT),full:a(ge.THURSDAY)},{value:a(ge.FRIDAY_SHORT),full:a(ge.FRIDAY)},{value:a(ge.SATURDAY_SHORT),full:a(ge.SATURDAY)}],j=T=>t.some(m=>{const v=m.start.getTime(),R=m.end.getTime(),C=T.getTime();return C>=v&&C<=R}),x=T=>{const m={year:"numeric",month:"long",day:"numeric"};return T.toLocaleDateString(void 0,m)},W=T=>{j(T)||(u(T),y(T.getDate()),e&&e(x(T)))},L=()=>{c===0?(d(11),h(f-1)):d(c-1),y(1)},H=()=>{c===11?(d(0),h(f+1)):d(c+1),y(1)},Y=(T,m)=>new Date(T,m+1,0).getDate(),U=(T,m)=>new Date(T,m,1).getDay(),A=T=>{var v;const m=ee.findIndex(R=>R!==null&&R.getDate()===T);m!==-1&&S.current[m]&&((v=S.current[m])==null||v.focus(),y(T))},K=(T,m)=>{const v=ee[m];if(!v)return;const R=Y(f,c),C=v.getDate();switch(T.key){case"ArrowRight":T.preventDefault();{let E=C+1,P=new Date(f,c,E);if(E>R){const k=c===11?f+1:f,N=c===11?0:c+1;E=1,P=new Date(k,N,E),H(),setTimeout(()=>{J(1,"forward")},0);return}j(P)?J(E,"forward"):A(E)}break;case"Tab":break;case"ArrowLeft":T.preventDefault();{let E=C-1,P=new Date(f,c,E);if(E<1){const k=c===0?f-1:f,N=c===0?11:c-1,V=Y(k,N);E=V,P=new Date(k,N,E),L(),setTimeout(()=>{J(V,"backward")},0);return}j(P)?J(E,"backward"):A(E)}break;case"ArrowUp":T.preventDefault();{let E=C-7,P=new Date(f,c,E);if(E<1){const k=c===0?f-1:f,N=c===0?11:c-1;E=Y(k,N)+E,P=new Date(k,N,E),L(),setTimeout(()=>{J(E,"backward")},0);return}j(P)?J(E,"backward"):A(E)}break;case"ArrowDown":T.preventDefault();{let E=C+7,P=new Date(f,c,E);if(E>R){const k=c===11?f+1:f,N=c===11?0:c+1;E=E-R,P=new Date(k,N,E),H(),setTimeout(()=>{J(E,"forward")},0);return}j(P)?J(E,"forward"):A(E)}break;case"Home":T.preventDefault(),J(1,"forward");break;case"End":T.preventDefault(),J(R,"backward");break;case"PageUp":T.preventDefault(),L(),setTimeout(()=>{const E=Y(c===0?f-1:f,c===0?11:c-1),P=Math.min(C,E);J(P,"forward")},0);break;case"PageDown":T.preventDefault(),H(),setTimeout(()=>{const E=Y(c===11?f+1:f,c===11?0:c+1),P=Math.min(C,E);J(P,"forward")},0);break;case" ":case"Space":if(j(v))return;y(v.getDate()),u(v);break;case"Enter":T.preventDefault(),W(v);break}},J=(T,m)=>{const v=Y(f,c);if(m==="forward"){for(let R=T;R<=v;R++){const C=new Date(f,c,R);if(!j(C)){A(R);return}}H(),setTimeout(()=>{J(1,"forward")},0)}else{for(let P=T;P>=1;P--){const k=new Date(f,c,P);if(!j(k)){A(P);return}}const R=c===0?f-1:f,C=c===0?11:c-1,E=Y(R,C);L(),setTimeout(()=>{J(E,"backward")},0)}},ee=(()=>{const T=Y(f,c),m=U(f,c),v=[];for(let R=0;R<m;R++)v.push(null);for(let R=1;R<=T;R++){const C=new Date(f,c,R);v.push(C)}return v})(),ie=[];let q=[];ee.forEach((T,m)=>{if(q.push(T),q.length===7||m===ee.length-1){for(;q.length<7;)q.push(null);ie.push(q),q=[]}}),F.useEffect(()=>{var T;if(g!==null){const m=ee.findIndex(v=>v!==null&&v.getDate()===g);m!==-1&&S.current[m]&&((T=S.current[m])==null||T.focus())}},[c,f,g,ee]);const Z={wrapper:`${_e["smp-datepickercalendar"]}`,calendar:`${_e["smp-datepickercalendar"]}`,table:`${_e["smp-datepickercalendar-table"]}`,th:`${_e["smp-datepickercalendar-th"]}`,td:(T,m,v,R)=>`${_e["smp-datepickercalendar-td"]}
|
|
56
|
-
${
|
|
57
|
-
${
|
|
58
|
-
${
|
|
59
|
-
${
|
|
53
|
+
*/var bt,Gt;function nn(){if(Gt)return bt;Gt=1;var n=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function s(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},o=0;o<10;o++)i["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return bt=s()?Object.assign:function(a,i){for(var o,l=r(a),c,f=1;f<arguments.length;f++){o=Object(arguments[f]);for(var u in o)e.call(o,u)&&(l[u]=o[u]);if(n){c=n(o);for(var p=0;p<c.length;p++)t.call(o,c[p])&&(l[c[p]]=o[c[p]])}}return l},bt}var xt,Jt;function $t(){if(Jt)return xt;Jt=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return xt=n,xt}var St,Xt;function Tr(){return Xt||(Xt=1,St=Function.call.bind(Object.prototype.hasOwnProperty)),St}var Et,Zt;function sn(){if(Zt)return Et;Zt=1;var n=function(){};if(process.env.NODE_ENV!=="production"){var e=$t(),t={},r=Tr();n=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(a,i,o,l,c){if(process.env.NODE_ENV!=="production"){for(var f in a)if(r(a,f)){var u;try{if(typeof a[f]!="function"){var p=Error((l||"React class")+": "+o+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}u=a[f](i,f,l,o,null,e)}catch(g){u=g}if(u&&!(u instanceof Error)&&n((l||"React class")+": type specification of "+o+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in t)){t[u.message]=!0;var h=c?c():"";n("Failed "+o+" type: "+u.message+(h??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},Et=s,Et}var wt,Qt;function an(){if(Qt)return wt;Qt=1;var n=Or(),e=nn(),t=$t(),r=Tr(),s=sn(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var l="Warning: "+o;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return wt=function(o,l){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function u(y){var m=y&&(c&&y[c]||y[f]);if(typeof m=="function")return m}var p="<<anonymous>>",h={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:w(),arrayOf:j,element:D(),elementType:v(),instanceOf:C,node:$(),objectOf:q,oneOf:L,oneOfType:V,shape:K,exact:te};function g(y,m){return y===m?y!==0||1/y===1/m:y!==y&&m!==m}function b(y,m){this.message=y,this.data=m&&typeof m=="object"?m:{},this.stack=""}b.prototype=Error.prototype;function E(y){if(process.env.NODE_ENV!=="production")var m={},_=0;function R(A,N,I,H,ee,z,oe){if(H=H||p,z=z||I,oe!==t){if(l){var T=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw T.name="Invariant Violation",T}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var k=H+":"+I;!m[k]&&_<3&&(a("You are manually calling a React.PropTypes validation function for the `"+z+"` prop on `"+H+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),m[k]=!0,_++)}}return N[I]==null?A?N[I]===null?new b("The "+ee+" `"+z+"` is marked as required "+("in `"+H+"`, but its value is `null`.")):new b("The "+ee+" `"+z+"` is marked as required in "+("`"+H+"`, but its value is `undefined`.")):null:y(N,I,H,ee,z)}var S=R.bind(null,!1);return S.isRequired=R.bind(null,!0),S}function x(y){function m(_,R,S,A,N,I){var H=_[R],ee=Q(H);if(ee!==y){var z=W(H);return new b("Invalid "+A+" `"+N+"` of type "+("`"+z+"` supplied to `"+S+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return E(m)}function w(){return E(i)}function j(y){function m(_,R,S,A,N){if(typeof y!="function")return new b("Property `"+N+"` of component `"+S+"` has invalid PropType notation inside arrayOf.");var I=_[R];if(!Array.isArray(I)){var H=Q(I);return new b("Invalid "+A+" `"+N+"` of type "+("`"+H+"` supplied to `"+S+"`, expected an array."))}for(var ee=0;ee<I.length;ee++){var z=y(I,ee,S,A,N+"["+ee+"]",t);if(z instanceof Error)return z}return null}return E(m)}function D(){function y(m,_,R,S,A){var N=m[_];if(!o(N)){var I=Q(N);return new b("Invalid "+S+" `"+A+"` of type "+("`"+I+"` supplied to `"+R+"`, expected a single ReactElement."))}return null}return E(y)}function v(){function y(m,_,R,S,A){var N=m[_];if(!n.isValidElementType(N)){var I=Q(N);return new b("Invalid "+S+" `"+A+"` of type "+("`"+I+"` supplied to `"+R+"`, expected a single ReactElement type."))}return null}return E(y)}function C(y){function m(_,R,S,A,N){if(!(_[R]instanceof y)){var I=y.name||p,H=P(_[R]);return new b("Invalid "+A+" `"+N+"` of type "+("`"+H+"` supplied to `"+S+"`, expected ")+("instance of `"+I+"`."))}return null}return E(m)}function L(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function m(_,R,S,A,N){for(var I=_[R],H=0;H<y.length;H++)if(g(I,y[H]))return null;var ee=JSON.stringify(y,function(oe,T){var k=W(T);return k==="symbol"?String(T):T});return new b("Invalid "+A+" `"+N+"` of value `"+String(I)+"` "+("supplied to `"+S+"`, expected one of "+ee+"."))}return E(m)}function q(y){function m(_,R,S,A,N){if(typeof y!="function")return new b("Property `"+N+"` of component `"+S+"` has invalid PropType notation inside objectOf.");var I=_[R],H=Q(I);if(H!=="object")return new b("Invalid "+A+" `"+N+"` of type "+("`"+H+"` supplied to `"+S+"`, expected an object."));for(var ee in I)if(r(I,ee)){var z=y(I,ee,S,A,N+"."+ee,t);if(z instanceof Error)return z}return null}return E(m)}function V(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var m=0;m<y.length;m++){var _=y[m];if(typeof _!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(_)+" at index "+m+"."),i}function R(S,A,N,I,H){for(var ee=[],z=0;z<y.length;z++){var oe=y[z],T=oe(S,A,N,I,H,t);if(T==null)return null;T.data&&r(T.data,"expectedType")&&ee.push(T.data.expectedType)}var k=ee.length>0?", expected one of type ["+ee.join(", ")+"]":"";return new b("Invalid "+I+" `"+H+"` supplied to "+("`"+N+"`"+k+"."))}return E(R)}function $(){function y(m,_,R,S,A){return X(m[_])?null:new b("Invalid "+S+" `"+A+"` supplied to "+("`"+R+"`, expected a ReactNode."))}return E(y)}function Y(y,m,_,R,S){return new b((y||"React class")+": "+m+" type `"+_+"."+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+S+"`.")}function K(y){function m(_,R,S,A,N){var I=_[R],H=Q(I);if(H!=="object")return new b("Invalid "+A+" `"+N+"` of type `"+H+"` "+("supplied to `"+S+"`, expected `object`."));for(var ee in y){var z=y[ee];if(typeof z!="function")return Y(S,A,N,ee,W(z));var oe=z(I,ee,S,A,N+"."+ee,t);if(oe)return oe}return null}return E(m)}function te(y){function m(_,R,S,A,N){var I=_[R],H=Q(I);if(H!=="object")return new b("Invalid "+A+" `"+N+"` of type `"+H+"` "+("supplied to `"+S+"`, expected `object`."));var ee=e({},_[R],y);for(var z in ee){var oe=y[z];if(r(y,z)&&typeof oe!="function")return Y(S,A,N,z,W(oe));if(!oe)return new b("Invalid "+A+" `"+N+"` key `"+z+"` supplied to `"+S+"`.\nBad object: "+JSON.stringify(_[R],null," ")+`
|
|
54
|
+
Valid keys: `+JSON.stringify(Object.keys(y),null," "));var T=oe(I,z,S,A,N+"."+z,t);if(T)return T}return null}return E(m)}function X(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every(X);if(y===null||o(y))return!0;var m=u(y);if(m){var _=m.call(y),R;if(m!==y.entries){for(;!(R=_.next()).done;)if(!X(R.value))return!1}else for(;!(R=_.next()).done;){var S=R.value;if(S&&!X(S[1]))return!1}}else return!1;return!0;default:return!1}}function ce(y,m){return y==="symbol"?!0:m?m["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&m instanceof Symbol:!1}function Q(y){var m=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":ce(m,y)?"symbol":m}function W(y){if(typeof y>"u"||y===null)return""+y;var m=Q(y);if(m==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return m}function Z(y){var m=W(y);switch(m){case"array":case"object":return"an "+m;case"boolean":case"date":case"regexp":return"a "+m;default:return m}}function P(y){return!y.constructor||!y.constructor.name?p:y.constructor.name}return h.checkPropTypes=s,h.resetWarningCache=s.resetWarningCache,h.PropTypes=h,h},wt}var _t,er;function on(){if(er)return _t;er=1;var n=$t();function e(){}function t(){}return t.resetWarningCache=e,_t=function(){function r(i,o,l,c,f,u){if(u!==n){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function s(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:e};return a.PropTypes=a,a},_t}var tr;function ln(){if(tr)return et.exports;if(tr=1,process.env.NODE_ENV!=="production"){var n=Or(),e=!0;et.exports=an()(n.isElement,e)}else et.exports=on()();return et.exports}var fe=ln(),cn=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},un=function(e,t){for(var r in e)if(!(r in t))return!0;for(var s in t)if(e[s]!==t[s])return!0;return!1},fn=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],rt="http://www.w3.org/2000/svg",rr="http://www.w3.org/1999/xlink",ot=function(n){function e(){for(var r,s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];return r=n.call.apply(n,[this].concat(a))||this,r.initialState={hasError:!1,isLoading:!0},r.state=r.initialState,r._isMounted=!1,r.reactWrapper=void 0,r.nonReactWrapper=void 0,r.refCallback=function(o){r.reactWrapper=o},r}qr(e,n);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof cn(this.reactWrapper).Node){var a=this.props,i=a.desc,o=a.evalScripts,l=a.httpRequestWithCredentials,c=a.renumerateIRIElements,f=a.src,u=a.title,p=a.useRequestCache,h=this.props.onError,g=this.props.beforeInjection,b=this.props.afterInjection,E=this.props.wrapper,x,w;E==="svg"?(x=document.createElementNS(rt,E),x.setAttribute("xmlns",rt),x.setAttribute("xmlns:xlink",rr),w=document.createElementNS(rt,E)):(x=document.createElement(E),w=document.createElement(E)),x.appendChild(w),w.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(x);var j=function(L){if(s.removeSVG(),!s._isMounted){h(L);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){h(L)})},D=function(L,q){if(L){j(L);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{b(q)}catch(V){j(V)}})},v=function(L){if(L.setAttribute("role","img"),i){var q=L.querySelector(":scope > desc");q&&L.removeChild(q);var V=document.createElement("desc");V.innerHTML=i,L.prepend(V)}if(u){var $=L.querySelector(":scope > title");$&&L.removeChild($);var Y=document.createElement("title");Y.innerHTML=u,L.prepend(Y)}try{g(L)}catch(K){j(K)}};en(w,{afterEach:D,beforeEach:v,cacheRequests:p,evalScripts:o,httpRequestWithCredentials:l,renumerateIRIElements:c})}},t.removeSVG=function(){var s;(s=this.nonReactWrapper)!=null&&s.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},t.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},t.componentDidUpdate=function(s){var a=this;un(it({},s),this.props)&&this.setState(function(){return a.initialState},function(){a.removeSVG(),a.renderSVG()})},t.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},t.render=function(){var s=this.props;s.afterInjection,s.beforeInjection,s.desc,s.evalScripts;var a=s.fallback;s.httpRequestWithCredentials;var i=s.loading;s.renumerateIRIElements,s.src,s.title,s.useRequestCache;var o=s.wrapper,l=Hr(s,fn),c=o;return Xe.createElement(c,it({},l,{ref:this.refCallback},o==="svg"?{xmlns:rt,xmlnsXlink:rr}:{}),this.state.isLoading&&i&&Xe.createElement(i,null),this.state.hasError&&a&&Xe.createElement(a,null))},e}(Xe.Component);ot.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};ot.propTypes={afterInjection:fe.func,beforeInjection:fe.func,desc:fe.string,evalScripts:fe.oneOf(["always","once","never"]),fallback:fe.oneOfType([fe.func,fe.object,fe.string]),httpRequestWithCredentials:fe.bool,loading:fe.oneOfType([fe.func,fe.object,fe.string]),onError:fe.func,renumerateIRIElements:fe.bool,src:fe.string.isRequired,title:fe.string,useRequestCache:fe.bool,wrapper:fe.oneOf(["div","span","svg"])};const Ye={"smp-icon":"_smp-icon_ttsft_1","smp-icon-rotated":"_smp-icon-rotated_ttsft_15","smp-icon-base":"_smp-icon-base_ttsft_19","smp-icon-interactable":"_smp-icon-interactable_ttsft_22","smp-icon-danger":"_smp-icon-danger_ttsft_33","smp-icon-warning":"_smp-icon-warning_ttsft_37","smp-icon-onDanger":"_smp-icon-onDanger_ttsft_45","smp-icon-onPrimary":"_smp-icon-onPrimary_ttsft_49","smp-icon-spin":"_smp-icon-spin_ttsft_53"};let Ct={assets:"/"};const dn=n=>{Ct={...Ct,...n}},nr=n=>`${Ct.assets}/${n}`.replace(/\/+/g,"/"),Re=U.memo(({icon:n,width:e,height:t,placeholderIcon:r,color:s,disabled:a,state:i="base",rotated:o=!1,onClick:l,isInteractable:c=!1,spin:f=!1})=>{const[u,p]=U.useState(n),h=n.indexOf(".")>-1||n.indexOf("/")>-1||n.indexOf("\\")>-1,g=nr(`assets/svg/${n}.svg`),b=nr(`assets/svg/${r}.svg`),E={svg:`${Ye["smp-icon"]} ${i?Ye[`smp-icon-${i}`]:""} ${o?Ye["smp-icon-rotated"]:""} ${c?Ye["smp-icon-interactable"]:""} ${f?Ye["smp-icon-spin"]:""}`},x=()=>{!a&&l&&l()};return O.jsx(O.Fragment,{children:h?O.jsx("img",{src:u,width:e||"16px",height:t||"auto",alt:n||"image",onError:()=>p(b)}):O.jsx(ot,{src:g,fallback:()=>O.jsx(ot,{src:b,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:n,role:"application",fill:s,"aria-disabled":a,className:E.svg,onClick:x})})}),Ue={"smp-dash-list":"_smp-dash-list_ajkcc_1","smp-dash-list-fill-space":"_smp-dash-list-fill-space_ajkcc_25","smp-dash-list-horizontal":"_smp-dash-list-horizontal_ajkcc_30","smp-layout-1":"_smp-layout-1_ajkcc_34","smp-layout-2":"_smp-layout-2_ajkcc_38","smp-layout-1__descr":"_smp-layout-1__descr_ajkcc_67","smp-layout-2__descr":"_smp-layout-2__descr_ajkcc_68","smp-layout-1__value":"_smp-layout-1__value_ajkcc_76","smp-layout-2__value":"_smp-layout-2__value_ajkcc_77","smp-layout-2__icon":"_smp-layout-2__icon_ajkcc_84"},B=n=>typeof n=="string",We=()=>{let n,e;const t=new Promise((r,s)=>{n=r,e=s});return t.resolve=n,t.reject=e,t},sr=n=>n==null?"":""+n,pn=(n,e,t)=>{n.forEach(r=>{e[r]&&(t[r]=e[r])})},hn=/###/g,ar=n=>n&&n.indexOf("###")>-1?n.replace(hn,"."):n,ir=n=>!n||B(n),Ke=(n,e,t)=>{const r=B(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(ir(n))return{};const a=ar(r[s]);!n[a]&&t&&(n[a]=new t),Object.prototype.hasOwnProperty.call(n,a)?n=n[a]:n={},++s}return ir(n)?{}:{obj:n,k:ar(r[s])}},or=(n,e,t)=>{const{obj:r,k:s}=Ke(n,e,Object);if(r!==void 0||e.length===1){r[s]=t;return}let a=e[e.length-1],i=e.slice(0,e.length-1),o=Ke(n,i,Object);for(;o.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),o=Ke(n,i,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${a}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=t},gn=(n,e,t,r)=>{const{obj:s,k:a}=Ke(n,e,Object);s[a]=s[a]||[],s[a].push(t)},lt=(n,e)=>{const{obj:t,k:r}=Ke(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r]},mn=(n,e,t)=>{const r=lt(n,t);return r!==void 0?r:lt(e,t)},Rr=(n,e,t)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?B(n[r])||n[r]instanceof String||B(e[r])||e[r]instanceof String?t&&(n[r]=e[r]):Rr(n[r],e[r],t):n[r]=e[r]);return n},ke=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var yn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const vn=n=>B(n)?n.replace(/[&<>"'\/]/g,e=>yn[e]):n;class bn{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const xn=[" ",",","?","!",";"],Sn=new bn(20),En=(n,e,t)=>{e=e||"",t=t||"";const r=xn.filter(i=>e.indexOf(i)<0&&t.indexOf(i)<0);if(r.length===0)return!0;const s=Sn.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!s.test(n);if(!a){const i=n.indexOf(t);i>0&&!s.test(n.substring(0,i))&&(a=!0)}return a},At=(n,e,t=".")=>{if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const r=e.split(t);let s=n;for(let a=0;a<r.length;){if(!s||typeof s!="object")return;let i,o="";for(let l=a;l<r.length;++l)if(l!==a&&(o+=t),o+=r[l],i=s[o],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<r.length-1)continue;a+=l-a+1;break}s=i}return s},ct=n=>n==null?void 0:n.replace("_","-"),wn={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){var t,r;(r=(t=console==null?void 0:console[n])==null?void 0:t.apply)==null||r.call(t,console,e)}};class ut{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||wn,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,s){return s&&!this.debug?null:(B(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ut(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new ut(this.logger,e)}}var Ee=new ut;class mt{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(t)||0;this.observers[r].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,a])=>{for(let i=0;i<a;i++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,a])=>{for(let i=0;i<a;i++)s.apply(s,[e,...t])})}}class lr extends mt{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r,s={}){var c,f;const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],r&&(Array.isArray(r)?o.push(...r):B(r)&&a?o.push(...r.split(a)):o.push(r)));const l=lt(this.data,o);return!l&&!t&&!r&&e.indexOf(".")>-1&&(e=o[0],t=o[1],r=o.slice(2).join(".")),l||!i||!B(r)?l:At((f=(c=this.data)==null?void 0:c[e])==null?void 0:f[t],r,a)}addResource(e,t,r,s,a={silent:!1}){const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let o=[e,t];r&&(o=o.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(o=e.split("."),s=t,t=o[1]),this.addNamespaces(t),or(this.data,o,s),a.silent||this.emit("added",e,t,r,s)}addResources(e,t,r,s={silent:!1}){for(const a in r)(B(r[a])||Array.isArray(r[a]))&&this.addResource(e,t,a,r[a],{silent:!0});s.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,s,a,i={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),s=r,r=t,t=o[1]),this.addNamespaces(t);let l=lt(this.data,o)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?Rr(l,r,a):l={...l,...r},or(this.data,o,l),i.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var Dr={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,r,s){return n.forEach(a=>{var i;e=((i=this.processors[a])==null?void 0:i.process(e,t,r,s))??e}),e}};const cr={},ur=n=>!B(n)&&typeof n!="boolean"&&typeof n!="number";class ft extends mt{constructor(e,t={}){super(),pn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ee.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const r={...t};if(e==null)return!1;const s=this.resolve(e,r);return(s==null?void 0:s.res)!==void 0}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!En(e,r,s);if(i&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:B(a)?[a]:a};const c=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),e=c.join(s)}return{key:e,namespaces:B(a)?[a]:a}}translate(e,t,r){let s=typeof t=="object"?{...t}:t;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(s={...s}),s||(s={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const a=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],s),c=l[l.length-1];let f=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const u=s.lng||this.language,p=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode")return p?a?{res:`${c}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:`${c}${f}${o}`:a?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:o;const h=this.resolve(e,s);let g=h==null?void 0:h.res;const b=(h==null?void 0:h.usedKey)||o,E=(h==null?void 0:h.exactUsedKey)||o,x=["[object Number]","[object Function]","[object RegExp]"],w=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,D=s.count!==void 0&&!B(s.count),v=ft.hasDefaultValue(s),C=D?this.pluralResolver.getSuffix(u,s.count,s):"",L=s.ordinal&&D?this.pluralResolver.getSuffix(u,s.count,{ordinal:!1}):"",q=D&&!s.ordinal&&s.count===0,V=q&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${C}`]||s[`defaultValue${L}`]||s.defaultValue;let $=g;j&&!g&&v&&($=V);const Y=ur($),K=Object.prototype.toString.apply($);if(j&&$&&Y&&x.indexOf(K)<0&&!(B(w)&&Array.isArray($))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const te=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,$,{...s,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return a?(h.res=te,h.usedParams=this.getUsedParamsDetails(s),h):te}if(i){const te=Array.isArray($),X=te?[]:{},ce=te?E:b;for(const Q in $)if(Object.prototype.hasOwnProperty.call($,Q)){const W=`${ce}${i}${Q}`;v&&!g?X[Q]=this.translate(W,{...s,defaultValue:ur(V)?V[Q]:void 0,joinArrays:!1,ns:l}):X[Q]=this.translate(W,{...s,joinArrays:!1,ns:l}),X[Q]===W&&(X[Q]=$[Q])}g=X}}else if(j&&B(w)&&Array.isArray(g))g=g.join(w),g&&(g=this.extendTranslation(g,e,s,r));else{let te=!1,X=!1;!this.isValidLookup(g)&&v&&(te=!0,g=V),this.isValidLookup(g)||(X=!0,g=o);const Q=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&X?void 0:g,W=v&&V!==g&&this.options.updateMissing;if(X||te||W){if(this.logger.log(W?"updateKey":"missingKey",u,c,o,W?V:g),i){const m=this.resolve(o,{...s,keySeparator:!1});m&&m.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Z=[];const P=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&P&&P[0])for(let m=0;m<P.length;m++)Z.push(P[m]);else this.options.saveMissingTo==="all"?Z=this.languageUtils.toResolveHierarchy(s.lng||this.language):Z.push(s.lng||this.language);const y=(m,_,R)=>{var A;const S=v&&R!==g?R:Q;this.options.missingKeyHandler?this.options.missingKeyHandler(m,c,_,S,W,s):(A=this.backendConnector)!=null&&A.saveMissing&&this.backendConnector.saveMissing(m,c,_,S,W,s),this.emit("missingKey",m,c,_,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&D?Z.forEach(m=>{const _=this.pluralResolver.getSuffixes(m,s);q&&s[`defaultValue${this.options.pluralSeparator}zero`]&&_.indexOf(`${this.options.pluralSeparator}zero`)<0&&_.push(`${this.options.pluralSeparator}zero`),_.forEach(R=>{y([m],o+R,s[`defaultValue${R}`]||V)})}):y(Z,o,V))}g=this.extendTranslation(g,e,s,h,r),X&&g===o&&this.options.appendNamespaceToMissingKey&&(g=`${c}${f}${o}`),(X||te)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${f}${o}`:o,te?g:void 0,s))}return a?(h.res=g,h.usedParams=this.getUsedParamsDetails(s),h):g}extendTranslation(e,t,r,s,a){var l,c;if((l=this.i18nFormat)!=null&&l.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=B(e)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(f){const h=e.match(this.interpolator.nestingRegexp);u=h&&h.length}let p=r.replace&&!B(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,r.lng||this.language||s.usedLng,r),f){const h=e.match(this.interpolator.nestingRegexp),g=h&&h.length;u<g&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...h)=>(a==null?void 0:a[0])===h[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${t[0]}`),null):this.translate(...h,t),r)),r.interpolation&&this.interpolator.reset()}const i=r.postProcess||this.options.postProcess,o=B(i)?[i]:i;return e!=null&&(o!=null&&o.length)&&r.applyPostProcessor!==!1&&(e=Dr.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,s,a,i,o;return B(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,t),f=c.key;s=f;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const p=t.count!==void 0&&!B(t.count),h=p&&!t.ordinal&&t.count===0,g=t.context!==void 0&&(B(t.context)||typeof t.context=="number")&&t.context!=="",b=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(E=>{var x,w;this.isValidLookup(r)||(o=E,!cr[`${b[0]}-${E}`]&&((x=this.utils)!=null&&x.hasLoadedNamespace)&&!((w=this.utils)!=null&&w.hasLoadedNamespace(o))&&(cr[`${b[0]}-${E}`]=!0,this.logger.warn(`key "${s}" for languages "${b.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),b.forEach(j=>{var C;if(this.isValidLookup(r))return;i=j;const D=[f];if((C=this.i18nFormat)!=null&&C.addLookupKeys)this.i18nFormat.addLookupKeys(D,f,j,E,t);else{let L;p&&(L=this.pluralResolver.getSuffix(j,t.count,t));const q=`${this.options.pluralSeparator}zero`,V=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(D.push(f+L),t.ordinal&&L.indexOf(V)===0&&D.push(f+L.replace(V,this.options.pluralSeparator)),h&&D.push(f+q)),g){const $=`${f}${this.options.contextSeparator}${t.context}`;D.push($),p&&(D.push($+L),t.ordinal&&L.indexOf(V)===0&&D.push($+L.replace(V,this.options.pluralSeparator)),h&&D.push($+q))}}let v;for(;v=D.pop();)this.isValidLookup(r)||(a=v,r=this.getResource(j,E,v,t))}))})}),{res:r,usedKey:s,exactUsedKey:a,usedLng:i,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r,s={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,r,s):this.resourceStore.getResource(e,t,r,s)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!B(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const a of t)delete s[a]}return s}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&e[r]!==void 0)return!0;return!1}}class fr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ee.create("languageUtils")}getScriptPartFromCode(e){if(e=ct(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=ct(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(B(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(r=>{if(t)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const s=this.getScriptPartFromCode(r);if(this.isSupportedCode(s))return t=s;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),B(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],a=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return B(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):B(e)&&a(this.formatLanguageCode(e)),r.forEach(i=>{s.indexOf(i)<0&&a(this.formatLanguageCode(i))}),s}}const dr={zero:0,one:1,two:2,few:3,many:4,other:5},pr={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class _n{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Ee.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const r=ct(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:s});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),pr;if(!e.match(/-|_/))return pr;const l=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(l,t)}return this.pluralRulesCache[a]=i,i}needsPlural(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,r={}){return this.getSuffixes(e,r).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((s,a)=>dr[s]-dr[a]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,r={}){const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const hr=(n,e,t,r=".",s=!0)=>{let a=mn(n,e,t);return!a&&s&&B(t)&&(a=At(n,t,r),a===void 0&&(a=At(e,t,r))),a},Ot=n=>n.replace(/\$/g,"$$$$");class On{constructor(e={}){var t;this.logger=Ee.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(r=>r),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:s,prefix:a,prefixEscaped:i,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:f,unescapePrefix:u,nestingPrefix:p,nestingPrefixEscaped:h,nestingSuffix:g,nestingSuffixEscaped:b,nestingOptionsSeparator:E,maxReplaces:x,alwaysFormat:w}=e.interpolation;this.escape=t!==void 0?t:vn,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?ke(a):i||"{{",this.suffix=o?ke(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=p?ke(p):h||ke("$t("),this.nestingSuffix=g?ke(g):b||ke(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=x||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,r)=>(t==null?void 0:t.source)===r?(t.lastIndex=0,t):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,r,s){var h;let a,i,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(g.indexOf(this.formatSeparator)<0){const w=hr(t,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...s,...t,interpolationkey:g}):w}const b=g.split(this.formatSeparator),E=b.shift().trim(),x=b.join(this.formatSeparator).trim();return this.format(hr(t,l,E,this.options.keySeparator,this.options.ignoreJSONStructure),x,r,{...s,...t,interpolationkey:E})};this.resetRegExp();const f=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,u=((h=s==null?void 0:s.interpolation)==null?void 0:h.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>Ot(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?Ot(this.escape(g)):Ot(g)}].forEach(g=>{for(o=0;a=g.regex.exec(e);){const b=a[1].trim();if(i=c(b),i===void 0)if(typeof f=="function"){const x=f(e,a,s);i=B(x)?x:""}else if(s&&Object.prototype.hasOwnProperty.call(s,b))i="";else if(u){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${e}`),i="";else!B(i)&&!this.useRawValueToEscape&&(i=sr(i));const E=g.safeValue(i);if(e=e.replace(a[0],E),u?(g.regex.lastIndex+=i.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,r={}){let s,a,i;const o=(l,c)=>{const f=this.nestingOptionsSeparator;if(l.indexOf(f)<0)return l;const u=l.split(new RegExp(`${f}[ ]*{`));let p=`{${u[1]}`;l=u[0],p=this.interpolate(p,i);const h=p.match(/'/g),g=p.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!g||g.length%2!==0)&&(p=p.replace(/'/g,'"'));try{i=JSON.parse(p),c&&(i={...c,...i})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,b),`${l}${f}${p}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];i={...r},i=i.replace&&!B(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let c=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(u=>u.trim());s[1]=f.shift(),l=f,c=!0}if(a=t(o.call(this,s[1].trim(),i),i),a&&s[0]===e&&!B(a))return a;B(a)||(a=sr(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),a=""),c&&(a=l.reduce((f,u)=>this.format(f,u,r.lng,{...r,interpolationkey:s[1].trim()}),a.trim())),e=e.replace(s[0],a),this.regexp.lastIndex=0}return e}}const Tn=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const r=n.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(i=>{if(i){const[o,...l]=i.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();t[f]||(t[f]=c),c==="false"&&(t[f]=!1),c==="true"&&(t[f]=!0),isNaN(c)||(t[f]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},Le=n=>{const e={};return(t,r,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});const i=r+JSON.stringify(a);let o=e[i];return o||(o=n(ct(r),s),e[i]=o),o(t)}};class Rn{constructor(e={}){this.logger=Ee.create("formatter"),this.options=e,this.formats={number:Le((t,r)=>{const s=new Intl.NumberFormat(t,{...r});return a=>s.format(a)}),currency:Le((t,r)=>{const s=new Intl.NumberFormat(t,{...r,style:"currency"});return a=>s.format(a)}),datetime:Le((t,r)=>{const s=new Intl.DateTimeFormat(t,{...r});return a=>s.format(a)}),relativetime:Le((t,r)=>{const s=new Intl.RelativeTimeFormat(t,{...r});return a=>s.format(a,r.range||"day")}),list:Le((t,r)=>{const s=new Intl.ListFormat(t,{...r});return a=>s.format(a)})},this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Le(t)}format(e,t,r,s={}){const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(o=>o.indexOf(")")>-1)){const o=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,o)].join(this.formatSeparator)}return a.reduce((o,l)=>{var u;const{formatName:c,formatOptions:f}=Tn(l);if(this.formats[c]){let p=o;try{const h=((u=s==null?void 0:s.formatParams)==null?void 0:u[s.interpolationkey])||{},g=h.locale||h.lng||s.locale||s.lng||r;p=this.formats[c](o,g,{...f,...s,...h})}catch(h){this.logger.warn(h)}return p}else this.logger.warn(`there was no format function for ${c}`);return o},e)}}const Dn=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class Cn extends mt{constructor(e,t,r,s={}){var a,i;super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Ee.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(i=(a=this.backend)==null?void 0:a.init)==null||i.call(a,r,s.backend,s)}queueLoad(e,t,r,s){const a={},i={},o={},l={};return e.forEach(c=>{let f=!0;t.forEach(u=>{const p=`${c}|${u}`;!r.reload&&this.store.hasResourceBundle(c,u)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?i[p]===void 0&&(i[p]=!0):(this.state[p]=1,f=!1,i[p]===void 0&&(i[p]=!0),a[p]===void 0&&(a[p]=!0),l[u]===void 0&&(l[u]=!0)))}),f||(o[c]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,r){const s=e.split("|"),a=s[0],i=s[1];t&&this.emit("failedLoading",a,i,t),!t&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const o={};this.queue.forEach(l=>{gn(l.loaded,[a],i),Dn(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});const f=l.loaded[c];f.length&&f.forEach(u=>{o[c][u]===void 0&&(o[c][u]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,t,r,s=0,a=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:s,wait:a,callback:i});return}this.readingCalls++;const o=(c,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const u=this.waitingReads.shift();this.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}if(c&&f&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,r,s+1,a*2,i)},a);return}i(c,f)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(e,t);c&&typeof c.then=="function"?c.then(f=>o(null,f)).catch(o):o(null,c)}catch(c){o(c)}return}return l(e,t,o)}prepareLoading(e,t,r={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();B(e)&&(e=this.languageUtils.toResolveHierarchy(e)),B(t)&&(t=[t]);const a=this.queueLoad(e,t,r,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e,t=""){const r=e.split("|"),s=r[0],a=r[1];this.read(s,a,"read",void 0,void 0,(i,o)=>{i&&this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`,i),!i&&o&&this.logger.log(`${t}loaded namespace ${a} for language ${s}`,o),this.loaded(e,i,o)})}saveMissing(e,t,r,s,a,i={},o=()=>{}){var l,c,f,u,p;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((u=(f=this.services)==null?void 0:f.utils)!=null&&u.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((p=this.backend)!=null&&p.create){const h={...i,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let b;g.length===5?b=g(e,t,r,s,h):b=g(e,t,r,s),b&&typeof b.then=="function"?b.then(E=>o(null,E)).catch(o):o(null,b)}catch(b){o(b)}else g(e,t,r,s,o,h)}!e||!e[0]||this.store.addResource(e[0],t,r,s)}}}const gr=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),B(n[1])&&(e.defaultValue=n[1]),B(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(r=>{e[r]=t[r]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),mr=n=>{var e,t;return B(n.ns)&&(n.ns=[n.ns]),B(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),B(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((t=(e=n.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},nt=()=>{},An=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class ze extends mt{constructor(e={},t){if(super(),this.options=mr(e),this.services={},this.logger=Ee,this.modules={external:[]},An(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(B(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=gr();this.options={...r,...this.options,...mr(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Ee.init(s(this.modules.logger),this.options):Ee.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Rn;const f=new fr(this.options);this.store=new lr(this.options.resources,this.options);const u=this.services;u.logger=Ee,u.resourceStore=this.store,u.languageUtils=f,u.pluralResolver=new _n(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(u.formatter=s(c),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new On(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new Cn(s(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",(p,...h)=>{this.emit(p,...h)}),this.modules.languageDetector&&(u.languageDetector=s(this.modules.languageDetector),u.languageDetector.init&&u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=s(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new ft(this.services,this.options),this.translator.on("*",(p,...h)=>{this.emit(p,...h)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,t||(t=nt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...f)=>this.store[c](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...f)=>(this.store[c](...f),this)});const o=We(),l=()=>{const c=(f,u)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(u),t(f,u)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(e,t=nt){var a,i;let r=t;const s=B(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};s?l(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>l(f)),(i=(a=this.options.preload)==null?void 0:a.forEach)==null||i.call(a,c=>l(c)),this.services.backendConnector.load(o,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(e,t,r){const s=We();return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=nt),this.services.backendConnector.reload(e,t,a=>{s.resolve(),r(a)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Dr.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const r=We();this.emit("languageChanging",e);const s=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},a=(o,l)=>{l?this.isLanguageChangingTo===e&&(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),t&&t(o,(...c)=>this.t(...c))},i=o=>{var f,u;!e&&!o&&this.services.languageDetector&&(o=[]);const l=B(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(B(o)?[o]:o);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),(u=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||u.call(f,c)),this.loadResources(c,p=>{a(p,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e),r}getFixedT(e,t,r){const s=(a,i,...o)=>{let l;typeof i!="object"?l=this.options.overloadTranslationOptionHandler([a,i].concat(o)):l={...i},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||s.keyPrefix);const c=this.options.keySeparator||".";let f;return l.keyPrefix&&Array.isArray(a)?f=a.map(u=>`${l.keyPrefix}${c}${u}`):f=l.keyPrefix?`${l.keyPrefix}${c}${a}`:a,this.t(f,l)};return B(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=r,s}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(o,l)=>{const c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(t.precheck){const o=t.precheck(this,i);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!s||i(a,e)))}loadNamespaces(e,t){const r=We();return this.options.ns?(B(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),t&&t(s)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=We();B(e)&&(e=[e]);const s=this.options.preload||[],a=e.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=s.concat(a),this.loadResources(i=>{r.resolve(),t&&t(i)}),r):(t&&t(),Promise.resolve())}dir(e){var s,a;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";const t=["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"],r=((a=this.services)==null?void 0:a.languageUtils)||new fr(gr());return t.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new ze(e,t)}cloneInstance(e={},t=nt){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new ze(s);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(o=>{a[o]=this[o]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const o=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((f,u)=>(f[u]={...l[c][u]},f),l[c]),l),{});a.store=new lr(o,s),a.services.resourceStore=a.store}return a.translator=new ft(a.services,s),a.translator.on("*",(o,...l)=>{a.emit(o,...l)}),a.init(s,t),a.translator.options=s,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ue=ze.createInstance();ue.createInstance=ze.createInstance;ue.createInstance;ue.dir;ue.init;ue.loadResources;ue.reloadResources;ue.use;ue.changeLanguage;ue.getFixedT;ue.t;ue.exists;ue.setDefaultNamespace;ue.hasLoadedNamespace;ue.loadNamespaces;ue.loadLanguages;const Pn={Friday:"Venerdì",FridayShort:"Ven",Monday:"Lunedì",MondayShort:"Lun",Saturday:"Sabato",SaturdayShort:"Sab",Sunday:"Domenica",SundayShort:"Dom",Tuesday:"Martedì",TuesdayShort:"Mar",Thursday:"Giovedì",ThursdayShort:"Gio",Wednesday:"Mercoledì",WednesdayShort:"Mer"},jn={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},$n={CalendarFor:"Calendario per",Close:"Chiudi"},kn={Date:{NextDay:"Giorno Successivo",NextMonth:"Mese Successivo",NextWeek:"Settimana Successiva",NextYear:"Anno Successivo",PreviousDay:"Giorno Precedente",PreviousMonth:"Mese Precedente",PreviousWeek:"Settimana Precedente",PreviousYear:"Anno Precedente",Today:"Oggi",Tomorrow:"Domani",Yesterday:"Ieri"},Day:Pn,Month:jn,Generic:$n},Ln={Friday:"Friday",FridayShort:"Fri",Monday:"Monday",MondayShort:"Mon",Saturday:"Saturday",SaturdayShort:"Sat",Sunday:"Sunday",SundayShort:"Sun",Tuesday:"Tuesday",TuesdayShort:"Tue",Thursday:"Thursday",ThursdayShort:"Thu",Wednesday:"Wednesday",WednesdayShort:"Wed"},Nn={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},In={CalendarFor:"Calendar for",Close:"Close"},Mn={Date:{NextDay:"Next Day",NextMonth:"Next Month",NextWeek:"Next Week",NextYear:"Next Year",PreviousDay:"Previous Day",PreviousMonth:"Previous Month",PreviousWeek:"Previous Week",PreviousYear:"Previous Year",Today:"Today",Tomorrow:"Tomorrow",Yesterday:"Yesterday"},Day:Ln,Month:Nn,Generic:In};function yr(n,e){return new RegExp(Fn(n),e)}function Fn(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Vn(n,e,t,r){let s=e;const a=Yn(n,t);if(!s){const o=Math.abs(a);o-Math.floor(o)?s="0,0.00":s="0,0"}const i=Un(s);return new Intl.NumberFormat(r,i).format(a)}function Yn(n,e,t,r,s){let a=n;if(typeof a!="number"){let o;e&&r===void 0?o=",":o=".";const l=o=="."?",":".";a=a.replace(yr(l,"g"),""),a=a.replace(yr(o,"g"),"."),a=Number(a)}const i=Number(a);return isNaN(i)?NaN:i}function Un(n){const e={};n.includes(",")?e.useGrouping=!0:e.useGrouping=!1;const t=n.indexOf(".");if(t>-1){const s=(n.substring(t+1).match(/0/g)||[]).length;e.minimumFractionDigits=s,e.maximumFractionDigits=s}else e.minimumFractionDigits=0,e.maximumFractionDigits=0;return e}ue.init({lng:typeof navigator<"u"&&navigator.language.split("-")[0]||"en",fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,e,t,r)=>{const s=(r==null?void 0:r.type)??"number";try{switch(s){case"date":{const a=n instanceof Date?n:new Date(n);return new Intl.DateTimeFormat(t,{dateStyle:e||"short"}).format(a)}default:case"number":{const a=(r==null?void 0:r.inputIsLocalized)??!1;return Vn(n,e,a,t)}}}catch{return n}}},resources:{en:{translation:Mn},it:{translation:kn}}});const Wn=(n,e,t,r)=>ue.format(n,e,t||ue.language,r),Hn=(n,e)=>ue.t(n,e);function kt(){const n=U.useCallback((r,s,a,i)=>Wn(r,s,a||void 0,i),[]),e=U.useCallback(()=>ue.languages[0],[]),t=U.useCallback((r,s)=>Hn(r,s),[]);return{format:n,getCurrentLanguage:e,translate:t}}const Be=n=>n==null?!1:typeof n=="string"?n.toLocaleLowerCase()=="yes":n,qn=({ColumnsNumber:n=1,data:e={},ForceText:t,TextColName:r,TextColor:s="var(--smp-dashList-color-base)",Fillspace:a,FontSize:i,Horizontal:o,ForceIcon:l,IconColName:c,IconColor:f="var(--smp-dashList-color-base)",NumberFormat:u,ForceUM:p,UmColName:h,UmColor:g="var(--smp-dashList-color-base)",ForceValue:b,ValueColName:E,ValueColor:x="var(--smp-dashList-color-base)",SelectLayout:w="1",onClick:j})=>{const D="N/A",v=(e==null?void 0:e.columns)||[],C=(e==null?void 0:e.rows)||[],L=C.length>0,q="--smp-dashList-color",V="smp-layout",$="descr",Y="icon",K="um",te="value",X=i||"1em",ce="18px",Q="--smp-dashList-columns",W="--smp-dashList-fontSize",Z={dash:(k="1")=>{const G=y(k),ne=Ue[G],ie=m(G,$),pe=m(G,Y),ve=m(G,K),me=m(G,te);return{container:ne,descr:ie,icon:pe,um:ve,value:me}},dashList:`${Ue["smp-dash-list"]} ${Be(a)?Ue["smp-dash-list-fill-space"]:""}
|
|
55
|
+
${Be(o)?Ue["smp-dash-list-horizontal"]:""}`},{format:P}=kt(),y=k=>`${V}-${k}`,m=(k,G)=>Ue[`${k}__${G}`],_=k=>`${q}-${k}`,R=k=>{const G=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(G.test(k)){const ie=k.match(G)||[];if((ie==null?void 0:ie.length)>3)return"rgb("+ie[1]+","+ie[2]+","+ie[3]+")"}return k},S=k=>{if(!u)return k;const[G,ne]=A(u).map(we=>parseInt(we||"0")),ie="0,0"+(ne?"."+"0".repeat(ne):""),pe=P(k,ie,"it");if(!G)return pe;const[ve,me]=pe.split(",");return ve+(me?`,${me}`:"")},A=k=>k.includes(";")?k.split(";"):[k],N=k=>{const G=ie=>{var pe;if(ie)return(pe=k==null?void 0:k.cells[ie])==null?void 0:pe.obj.k},ne=ie=>{var pe,ve;if(!(v.length<=ie))return(ve=(pe=k==null?void 0:k.cells[v[ie].name])==null?void 0:pe.obj)==null?void 0:ve.k};return{descr:t||G(r)||ne(2)||"",icon:l||G(c)||ne(3)||"",um:p||G(h)||ne(1)||"",value:b||G(E)||ne(0)||""}},I=k=>{j==null||j(k)},H=(k,G)=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),k.stopPropagation(),I(G))},z=(k=>{const G=Z.dash(k);return{className:G,descr:ne=>O.jsx("div",{className:G.descr,children:ne},`${k}-${$}`),icon:ne=>O.jsx("div",{className:G.icon,children:O.jsx(Re,{color:f,height:ce,icon:ne,width:ce})},`${k}-${Y}`),um:ne=>O.jsx("div",{className:G.um,children:ne},`${k}-${K}`),value:ne=>O.jsx("div",{className:G.value,children:ne},`${k}-${te}`)}})(w),oe=k=>{const{descr:G,icon:ne,um:ie,value:pe}=N(k),ve={[_($)]:R(s),[_(K)]:R(g),[_(te)]:R(x)},me=[],we=S(pe);switch(w){case"2":ne&&me.push(z.icon(ne)),me.push(z.descr(G)),me.push(z.value(ie?we+" "+ie:we));break;default:case"1":me.push(z.descr(G)),me.push(z.value(ie?we+" "+ie:we))}return O.jsx("div",{className:z.className.container,role:"button",style:ve,tabIndex:0,onClick:()=>I(k),onKeyDown:d=>H(d,k),children:me},k.id)},T={[Q]:String(n),[W]:X};return O.jsx("div",{className:Z.dashList,style:T,children:L?C.map(k=>oe(k)):D})},xe={AUTOCOMPLETE:"ACP",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",ICON:"ICO",MULTI_AUTOCOMPLETE:"AML",TEXT_FIELD:"ITX",PASSWORD:"PWD"},Kn=n=>n.t=="D8",Bn=n=>{if(n){const e=n.split(";");if(e.length==3)return{t:e[0],p:e[1],k:e[2]}}return{t:"",p:"",k:""}};class dt{constructor(e,t){Pe(this,"class");Pe(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new dt(e,e.k=="1"||e.k=="true")}getValue(){return this.value}getLegacyValue(){if(this.class.t=="V2"){if(this.class.p=="SI/NO")return this.value?"1":" ";if(this.class.p=="ON/OFF")return this.value?"1":"0"}return this.value?"true":"false"}}function zn(n,e){if(Lt(n)){const f=new Date(n);if(!isNaN(f.getTime()))return f}const t=new Date,r=n.replaceAll("/","").replaceAll("-","");let s="DDMMYYYY";e==="en"&&(s="MMDDYYYY");const a=s.indexOf("DD"),i=s.indexOf("MM");let o=0,l=0,c="";switch(r.length){case 1:case 2:return o=parseInt(r),t.setDate(o),st(t)?t:n;case 3:case 4:return o=parseInt(r.substring(0,2)),l=parseInt(r.substring(2,4)),i===0?(t.setDate(l),t.setMonth(o-1)):a===0&&(t.setDate(o),t.setMonth(l-1)),st(t)?t:n;case 5:case 6:{o=parseInt(r.substring(0,2)),l=parseInt(r.substring(2,4)),Number(r.substring(4))>50?c="19"+r.substring(4):c="20"+r.substring(4);let f=0,u=0;return i===0?(f=l,u=o-1,t.setFullYear(parseInt(c),u,f)):a===0&&(f=o,u=l-1,t.setFullYear(parseInt(c),u,f)),Pt(o,u,parseInt(c))&&st(t)?t:n}case 7:case 8:{o=parseInt(r.substring(0,2)),l=parseInt(r.substring(2,4)),c=r.substring(4);let f=0,u=0;return i===0?(f=l,u=o-1,t.setFullYear(parseInt(c),u,f)):a===0&&(f=o,u=l-1,t.setFullYear(parseInt(c),u,f)),Pt(f,u,parseInt(c))&&st(t)?t:n}}return n}function Lt(n){return/^\d{4}-\d{2}-\d{2}$/.test(n)&&n.length===10}function st(n){return n instanceof Date&&!isNaN(n.getTime())}function Gn(n){if(!/^\d{8}$/.test(n))return!1;const e=parseInt(n.slice(0,4),10),t=parseInt(n.slice(4,6),10),r=parseInt(n.slice(6,8),10);return Pt(r,t-1,e)}function Pt(n,e,t){const r=[31,Jn(t)?29:28,31,30,31,30,31,31,30,31,30,31];return!(e<0||e>11||n<1||n>r[e])}function Jn(n){return n%4===0&&(n%100!==0||n%400===0)}function Xn(n){const e=n.getFullYear(),t=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return isNaN(e)||isNaN(Number(t))||isNaN(Number(r))?n.toString():`${e}-${t}-${r}`}class pt{constructor(e,t){Pe(this,"class");Pe(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=vr.get(`${e.t}${e.p}`);if(t)return new pt(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=vr.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.date}}const vr=new Map([["D8*YYMD",{legacyToIso(n){return Gn(n)&&`${n.substring(0,4)}-${n.substring(4,6)}-${n.substring(6,8)}`||n},isoToLegacy(n){return Lt(n)&&n.replaceAll("-","")||n}}]]),ht=(n,e)=>{U.useEffect(()=>{const t=r=>{typeof n=="object"&&n!==null&&"current"in n&&n.current&&!n.current.contains(r.target)&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[n,e])};function Nt({position:n="bottom",enabled:e=!0}){const t=U.useRef(null),r=U.useRef(null),[s,a]=U.useState(0),i=U.useCallback(()=>{const o=t.current,l=r.current;if(!o||!l)return;const{top:c,left:f,width:u,height:p}=o.getBoundingClientRect();a(u);const h=l.offsetHeight,g=l.offsetWidth;if(g===0||h===0){requestAnimationFrame(i);return}let b=c+window.scrollY,E=f+window.scrollX;switch(n){case"top":b-=h;break;case"bottom":b+=p;break;case"left":E-=g;break;case"right":E+=u;break}requestAnimationFrame(()=>{l.style.transform=`translate(${E}px, ${b}px)`})},[n]);return U.useLayoutEffect(()=>{e&&t.current&&r.current&&i();const o=new MutationObserver(()=>{r.current&&i()});return r.current&&o.observe(r.current,{childList:!0,subtree:!0}),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),o.disconnect()}},[i,e]),{anchorRef:t,targetRef:r,anchorWidth:s}}const gt=(n,e,t)=>{if(t)switch(t){case"CodeOnly":return n;case"DescOnly":return e||"";case"Both":return`${n} - ${e}`}return n},He={"smp-list":"_smp-list_1ux5k_1","smp-list-container":"_smp-list-container_1ux5k_18","smp-list-listItem":"_smp-list-listItem_1ux5k_23"},Tt={"smp-helper-text":"_smp-helper-text_10pis_1","smp-helper-text-danger":"_smp-helper-text-danger_10pis_9","smp-helper-text-warning":"_smp-helper-text-warning_10pis_13","smp-helper-text-disabled":"_smp-helper-text-disabled_10pis_17"},Zn=({helperText:n,disabled:e,state:t})=>{const r={container:`${Tt["smp-helper-text"]} ${e?Tt["smp-helper-text-disabled"]:""} ${t?Tt[`smp-helper-text-${t}`]:""}`};return O.jsx("span",{className:r.container,children:n})},br={"smp-label":"_smp-label_3ywt3_1","smp-label-disabled":"_smp-label-disabled_3ywt3_5"},Qn=({label:n,disabled:e})=>{const t={container:`${br["smp-label"]} ${e?br["smp-label-disabled"]:""}`};return O.jsx("span",{className:t.container,children:n})},Te={"smp-textfield-wrapper":"_smp-textfield-wrapper_1tjct_4","smp-textfield":"_smp-textfield_1tjct_4","smp-textfield-extraSmall":"_smp-textfield-extraSmall_1tjct_63","smp-textfield-small":"_smp-textfield-small_1tjct_68","smp-textfield-medium":"_smp-textfield-medium_1tjct_73","smp-textfield-large":"_smp-textfield-large_1tjct_78","smp-textfield-extraLarge":"_smp-textfield-extraLarge_1tjct_83","smp-textfield-input":"_smp-textfield-input_1tjct_89","smp-textfield-danger":"_smp-textfield-danger_1tjct_106","smp-textfield-readOnly":"_smp-textfield-readOnly_1tjct_110","smp-textfield-variant-notSelectable":"_smp-textfield-variant-notSelectable_1tjct_115","smp-textfield-disabled":"_smp-textfield-disabled_1tjct_125"},Ie=({disabled:n,readOnly:e,bindValue:t,icon:r,onBlur:s,onChange:a,placeholder:i,shapeIcon:o,sizing:l,state:c,variant:f,rotatedShapeIcon:u=!1,onShapeIconClick:p,ref:h,inputRef:g,onKeyDown:b,inputType:E="text",ariaLabel:x="input field",label:w,helperText:j=!1,error:D})=>{const v=D?"danger":c,C=D||c=="danger"?"error":o,L=j||!!D,q=$=>{a==null||a($.target.value)},V={wrapper:`${Te["smp-textfield-wrapper"]}`,container:`${Te["smp-textfield"]} ${n?Te["smp-textfield-disabled"]:""} ${e?Te["smp-textfield-readOnly"]:""} ${i?Te["smp-textfield-placeholder"]:""} ${l?Te[`smp-textfield-${l}`]:""} ${v?Te[`smp-textfield-${v}`]:""} ${f?Te[`smp-textfield-variant-${f}`]:""}`,input:`${Te["smp-textfield-input"]}`};return O.jsxs("div",{className:V.wrapper,children:[w&&O.jsx(Qn,{label:w,disabled:n}),O.jsxs("div",{className:V.container,ref:h,children:[r&&O.jsx(Re,{icon:r,disabled:n}),O.jsx("input",{type:E,value:t,placeholder:i,onChange:q,onBlur:s,className:V.input,disabled:n,readOnly:e,onKeyDown:b,"aria-label":x,ref:g}),C&&O.jsx(Re,{icon:C,disabled:n,state:v,onClick:p,rotated:u})]}),L&&O.jsx(Zn,{helperText:D,disabled:n,state:v})]})};function es({items:n,itemHeight:e,containerHeight:t,overscan:r=5}){const[s,a]=U.useState(0),i=U.useRef(null),o=n.length*e,l=Math.max(0,Math.floor(s/e)-r),c=Math.min(n.length-1,Math.floor((s+t)/e)+r),f=[];for(let h=l;h<=c;h++)f.push({item:n[h],index:h,offsetTop:h*e});const u=U.useCallback(h=>{const g=h.target.scrollTop;a(g)},[]),p=h=>{if(!i.current)return;const g=h*e,b=g+e,E=i.current,x=E.scrollTop,w=x+t;g<x?E.scrollTop=g:b>w&&(E.scrollTop=b-t)};return{virtualItems:f,containerProps:{ref:i,style:{maxHeight:`${t}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:u},innerProps:{style:{height:`${o}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:s,viewportHeight:t,totalHeight:o,startIndex:l,endIndex:c},scrollToIndex:p}}const ts=10,Cr=({id:n,options:e,displayMode:t,ref:r,showFilter:s,selectedIndex:a=null,activeIndex:i=[],width:o,onClick:l,onKeyDown:c})=>{var $;const[f,u]=U.useState(""),p=24,[h,g]=U.useState(a!==null?a:-1),b=s!==void 0?s:e.length>ts,E=f?e.filter(Y=>Y.label.toLowerCase().includes(f.toLowerCase())):e,x=Y=>{u(Y)},{virtualItems:w,containerProps:j,innerProps:D,scrollToIndex:v}=es({items:E,itemHeight:p,containerHeight:200,overscan:5});U.useEffect(()=>{a!==null&&a!==h&&g(a)},[a]),U.useEffect(()=>{h>=0&&h<E.length&&v(h)},[h,E]);const C=Y=>{if(Y.key==="ArrowDown"||Y.key==="ArrowUp"){Y.preventDefault();let K=h;Y.key==="ArrowDown"?K=h<E.length-1?h+1:0:Y.key==="ArrowUp"&&(K=h>0?h-1:E.length-1),g(K)}else Y.key==="Enter"?h>=0&&h<E.length&&(l==null||l(E[h])):Y.key==="Escape"&&(Y.preventDefault(),Y.stopPropagation());c&&c(Y)},L=Y=>{C(Y)},q=Y=>{C(Y)},V={wrapper:`${He["smp-list"]}`,container:`${He["smp-list-container"]}`,virtualScroll:`${He["smp-list-virtualScroll"]}`,listItem:`${He["smp-list-listItem"]}`};return O.jsxs("div",{id:n,ref:r,className:V.wrapper,style:{width:o},children:[b&&O.jsx(Ie,{bindValue:f,placeholder:"Search...",onChange:x,onKeyDown:L}),O.jsx("div",{...j,className:V.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:q,"aria-activedescendant":h>=0&&h<E.length?($=E[h])==null?void 0:$.id:void 0,children:O.jsx("div",{...D,className:V.virtualScroll,children:w.map(({item:Y,index:K,offsetTop:te})=>{const X=i.includes(Y.id);return O.jsxs("li",{role:"option",id:Y.id,"aria-selected":h===K?"true":"false",tabIndex:-1,className:`${V.listItem} ${h===K?He["selected-item"]:""}`,"aria-label":Y.id+"-"+Y.label,style:{height:`${p}px`,lineHeight:`calc(${p}px - 2*2px)`,transform:`translateY(${te}px)`},onClick:()=>{l==null||l(Y),g(K)},children:[gt(Y.id,Y.label,t),X&&O.jsx(Re,{icon:"check",width:16})]},Y.id)})})})]})},Ar=({displayMode:n,bindValue:e,optionalDisplayValue:t,...r})=>{const[s,a]=U.useState(gt(e,t,n));return U.useEffect(()=>{a(e)},[e]),U.useEffect(()=>{a(gt(e,t,n))},[t,n]),O.jsx(Ie,{...r,bindValue:s})},rs=n=>{const e=U.useRef(null);return U.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),r=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{r()},n)}},It=({bindValue:n,optionalDisplayValue:e,options:t,displayMode:r,listDisplayMode:s="Both",minimumChars:a=3,placeholder:i,fun:o,_changeOnEnter:l=!1,onChange:c,onOptionsRequest:f,_multiActiveIndex:u,...p})=>{const[h,g]=U.useState(n),[b,E]=U.useState(e),[x,w]=U.useState(!1),[j,D]=U.useState(t||[]),[v,C]=U.useState(0),[L,q]=U.useState([n]),{anchorRef:V,targetRef:$,anchorWidth:Y}=Nt({position:"bottom",enabled:x});ht($,()=>w(!1));const K=rs(400),te=W=>{W.length>=a?o&&f&&K(async()=>{const Z=await f(o,W);D(Z),C(Z.length>0?0:-1),w(!0)}):w(!1),g(W),E(e),l||c==null||c(W,e)},X=W=>{l?(g(""),E("")):(g(W.id),E(W.label)),c==null||c(W.id,W.label);const Z=j.findIndex(P=>P.id===W.id);C(Z),q([W.id]),w(!1)},ce=W=>{W.key==="Escape"&&(w(!1),C(-1))},Q=W=>{if((W.key==="ArrowDown"||W.key==="ArrowUp")&&(W.preventDefault(),x)){const Z=W.key==="ArrowDown"?(v+1)%j.length:(v-1+j.length)%j.length;C(Z)}switch(W.key){case"Enter":v>=0&&v<j.length?X(j[v]):l&&(c==null||c(h,""),w(!1),g(""),E(""));break;case"Escape":w(!1),C(-1);break}};return O.jsxs("div",{children:[O.jsx(Ar,{...p,bindValue:h,optionalDisplayValue:b,displayMode:r,shapeIcon:"magnify",placeholder:i,ref:V,onChange:te,onKeyDown:Q,"aria-autocomplete":"list"}),x&&O.jsx(Cr,{options:j,displayMode:s,onClick:X,ref:$,selectedIndex:v,activeIndex:u||L,width:Y,showFilter:!1,onKeyDown:ce})]})},qe={"smp-button-container":"_smp-button-container_pte2h_1","smp-button-extraSmall":"_smp-button-extraSmall_pte2h_51","smp-button-small":"_smp-button-small_pte2h_56","smp-button-base":"_smp-button-base_pte2h_61","smp-button-large":"_smp-button-large_pte2h_66","smp-button-extraLarge":"_smp-button-extraLarge_pte2h_71","smp-button-fullWidth":"_smp-button-fullWidth_pte2h_76","smp-buttonType-raised":"_smp-buttonType-raised_pte2h_81","smp-buttonVariant-base":"_smp-buttonVariant-base_pte2h_83","smp-buttonVariant-primary":"_smp-buttonVariant-primary_pte2h_97","smp-buttonVariant-danger":"_smp-buttonVariant-danger_pte2h_111","smp-buttonType-ghost":"_smp-buttonType-ghost_pte2h_138"},Ge=({bindValue:n,onClick:e,ariaLabel:t,icon:r,disabled:s,sizing:a="base",variant:i="primary",type:o="raised",showIcon:l=!0,showText:c=!0,fullWidth:f=!1,loading:u=!1})=>{const p={container:`${qe["smp-button-container"]} ${a?qe[`smp-button-${a}`]:""} ${i?qe[`smp-buttonVariant-${i}`]:""} ${o?qe[`smp-buttonType-${o}`]:""} ${f?qe["smp-button-fullWidth"]:""}`},h=g=>({primary:"onPrimary",danger:"onDanger",base:"base"})[g];return O.jsx("button",{className:p.container,onClick:e,"aria-label":t,disabled:s,"aria-busy":u,children:u?O.jsx(Re,{icon:"spinner",state:h(i),spin:!0}):O.jsxs(O.Fragment,{children:[r&&l&&O.jsx(Re,{icon:r,disabled:s,state:h(i)}),c&&O.jsx("span",{children:n})]})})},Pr=({bindValue:n,onChange:e,onBlur:t})=>{const r=s=>{e&&e(s.target.checked)};return O.jsx("input",{type:"checkbox",checked:n,onChange:r,onBlur:t})},ns={titleLarge:"h2",title:"h3",body:"h6",label:"label"},Rt={"smp-typography":"_smp-typography_oznk3_1","smp-typography-body":"_smp-typography-body_oznk3_12","smp-typography-large":"_smp-typography-large_oznk3_16","smp-typography-titleLarge":"_smp-typography-titleLarge_oznk3_20","smp-typography-label":"_smp-typography-label_oznk3_24","smp-typography-disabled":"_smp-typography-disabled_oznk3_29"},ss=({variant:n="body",bindValue:e,...t})=>{const r=ns[n],s={container:`${Rt["smp-typography"]} ${n?Rt[`smp-typography-${n}`]:""} ${t.disabled?Rt["smp-typography-disabled"]:""}`};return O.jsx(r,{className:s.container,disabled:t.disabled,children:e})},xr={"smp-chips-container":"_smp-chips-container_g7dut_1","smp-chips-element":"_smp-chips-element_g7dut_9"},jr=({elements:n,isEditable:e=!1,displayMode:t="Both",onChange:r})=>{const s={container:`${xr["smp-chips-container"]}`,element:`${xr["smp-chips-element"]}`},a=i=>{r==null||r(n.filter((o,l)=>l!==i))};return O.jsx("div",{className:s.container,role:"list",children:n.map((i,o)=>{const l=gt(i.bindValue,i.optionalDisplayValue,t);return O.jsxs("div",{className:s.element,role:"listitem",children:[O.jsx(ss,{variant:"label",bindValue:l}),e&&O.jsx(Re,{icon:"close",isInteractable:!0,onClick:()=>a(o)})]},o)})})};function $r(n,e){const t=U.useRef(null);U.useEffect(()=>{if(!n)return;const r=typeof e=="object"&&e!==null&&"current"in e?e.current:null;if(!r)return;t.current=document.activeElement;const s=()=>r?Array.from(r.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null):[];(()=>{const c=s();c.length>0&&requestAnimationFrame(()=>c[0].focus())})();const i=c=>{if(c.key==="Escape"||c.key!=="Tab")return;const f=s();if(f.length===0)return;const u=f[0],p=f[f.length-1];c.shiftKey&&document.activeElement===u?(c.preventDefault(),p.focus()):!c.shiftKey&&document.activeElement===p&&(c.preventDefault(),u.focus())},o=c=>{if(r&&!r.contains(c.target)){c.preventDefault();const f=s();f.length>0&&f[0].focus()}};document.addEventListener("keydown",i),document.addEventListener("mousedown",o);const l=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.removeEventListener("mousedown",o),document.body.style.overflow=l,t.current&&requestAnimationFrame(()=>{var c;(c=t.current)==null||c.focus()})}},[n,e])}const kr=({bindValue:n,onChange:e,options:t=[],optionalDisplayValue:r,displayMode:s,listDisplayMode:a="Both",fun:i,onOptionsRequest:o,multiActiveIndex:l,...c})=>{const[f,u]=U.useState(!1),[p,h]=U.useState(t),[g,b]=U.useState(-1),[E,x]=U.useState([n]),w=U.useId(),{anchorRef:j,targetRef:D,anchorWidth:v}=Nt({position:"bottom",enabled:f});ht(D,()=>u(!1)),$r(f,D);const C=$=>{e==null||e($.id,$.label);const Y=p.findIndex(K=>K.id===$.id);b(Y),x([$.id]),u(!1)},L=$=>{$.key==="Escape"&&(u(!1),b(-1))},q=$=>{($.key==="ArrowDown"||$.key==="ArrowUp")&&($.preventDefault(),V())},V=()=>{i&&o&&o(i,void 0).then($=>{h($),b($.length>0?0:-1),u(!0)})};return O.jsxs("div",{role:"combobox","aria-expanded":f,"aria-controls":w,"aria-owns":w,children:[O.jsx(Ar,{...c,bindValue:n,optionalDisplayValue:r,displayMode:s,onShapeIconClick:V,onKeyDown:q,shapeIcon:"arrow_drop_down",rotatedShapeIcon:f,readOnly:!0,ref:j,"aria-autocomplete":"list",variant:"notSelectable"}),f&&O.jsx(Cr,{id:w,options:p,displayMode:a,ref:D,selectedIndex:g,activeIndex:l||E,width:v,onClick:C,onKeyDown:L})]})};var Lr=(n=>(n.CALENDAR_FOR="Date.CalendarFor",n.CLOSE="Generic.Close",n))(Lr||{}),ge=(n=>(n.MONDAY="Day.Monday",n.MONDAY_SHORT="Day.MondayShort",n.TUESDAY="Day.Tuesday",n.TUESDAY_SHORT="Day.TuesdayShort",n.WEDNESDAY="Day.Wednesday",n.WEDNESDAY_SHORT="Day.WednesdayShort",n.THURSDAY="Day.Thursday",n.THURSDAY_SHORT="Day.ThursdayShort",n.FRIDAY="Day.Friday",n.FRIDAY_SHORT="Day.FridayShort",n.SATURDAY="Day.Saturday",n.SATURDAY_SHORT="Day.SaturdayShort",n.SUNDAY="Day.Sunday",n.SUNDAY_SHORT="Day.SundayShort",n))(ge||{}),ye=(n=>(n.JANUARY="Month.January",n.FEBRUARY="Month.February",n.MARCH="Month.March",n.APRIL="Month.April",n.MAY="Month.May",n.JUNE="Month.June",n.JULY="Month.July",n.AUGUST="Month.August",n.SEPTEMBER="Month.September",n.OCTOBER="Month.October",n.NOVEMBER="Month.November",n.DECEMBER="Month.December",n))(ye||{}),jt=(n=>(n.PREVIOUS_DAY="Date.PreviousDay",n.PREVIOUS_WEEK="Date.PreviousWeek",n.PREVIOUS_MONTH="Date.PreviousMonth",n.PREVIOUS_YEAR="Date.PreviousYear",n.NEXT_DAY="Date.NextDay",n.NEXT_WEEK="Date.NextWeek",n.NEXT_MONTH="Date.NextMonth",n.NEXT_YEAR="Date.NextYear",n.YESTERDAY="Date.Yesterday",n.TODAY="Date.Today",n.TOMORROW="Date.Tomorrow",n))(jt||{});const Se={"smp-datepickercalendar":"_smp-datepickercalendar_u2io5_1","smp-datepickercalendar-table":"_smp-datepickercalendar-table_u2io5_30","smp-datepickercalendar-th":"_smp-datepickercalendar-th_u2io5_42","smp-datepickercalendar-td":"_smp-datepickercalendar-td_u2io5_53","smp-datepickercalendar-td-today":"_smp-datepickercalendar-td-today_u2io5_72","smp-datepickercalendar-td-selected":"_smp-datepickercalendar-td-selected_u2io5_78","smp-datepickercalendar-td-focused":"_smp-datepickercalendar-td-focused_u2io5_83","smp-datepickercalendar-label":"_smp-datepickercalendar-label_u2io5_93"};function as({selectedDate:n,onDateChange:e,disabledDateRanges:t=[],initialValue:r,targetRef:s}){const{translate:a}=kt(),i=()=>{if(!r)return;const P=new Date(r);return isNaN(P.getTime())?void 0:P},[o]=U.useState(new Date),[l,c]=U.useState(n||i()||new Date),[f,u]=U.useState(l?l.getMonth():new Date().getMonth()),[p,h]=U.useState(l?l.getFullYear():new Date().getFullYear()),[g,b]=U.useState(l?l.getDate():null),E=U.useRef(null),x=U.useRef([]),w=[a(ye.JANUARY),a(ye.FEBRUARY),a(ye.MARCH),a(ye.APRIL),a(ye.MAY),a(ye.JUNE),a(ye.JULY),a(ye.AUGUST),a(ye.SEPTEMBER),a(ye.OCTOBER),a(ye.NOVEMBER),a(ye.DECEMBER)],j=[{value:a(ge.SUNDAY_SHORT),full:a(ge.SUNDAY)},{value:a(ge.MONDAY_SHORT),full:a(ge.MONDAY)},{value:a(ge.TUESDAY_SHORT),full:a(ge.TUESDAY)},{value:a(ge.WEDNESDAY_SHORT),full:a(ge.WEDNESDAY)},{value:a(ge.THURSDAY_SHORT),full:a(ge.THURSDAY)},{value:a(ge.FRIDAY_SHORT),full:a(ge.FRIDAY)},{value:a(ge.SATURDAY_SHORT),full:a(ge.SATURDAY)}],D=P=>t.some(y=>{const m=y.start.getTime(),_=y.end.getTime(),R=P.getTime();return R>=m&&R<=_}),v=P=>{D(P)||(c(P),b(P.getDate()),e&&e(Xn(P)))},C=()=>{f===0?(u(11),h(p-1)):u(f-1),b(1)},L=()=>{f===11?(u(0),h(p+1)):u(f+1),b(1)},q=(P,y)=>new Date(P,y+1,0).getDate(),V=(P,y)=>new Date(P,y,1).getDay(),$=P=>{var m;const y=X.findIndex(_=>_!==null&&_.getDate()===P);y!==-1&&x.current[y]&&((m=x.current[y])==null||m.focus(),b(P))},Y=(P,y)=>{const m=X[y];if(!m)return;const _=q(p,f),R=m.getDate();switch(P.key){case"ArrowRight":P.preventDefault();{let S=R+1,A=new Date(p,f,S);if(S>_){const N=f===11?p+1:p,I=f===11?0:f+1;S=1,A=new Date(N,I,S),L(),setTimeout(()=>{K(1,"forward")},0);return}D(A)?K(S,"forward"):$(S)}break;case"Tab":break;case"ArrowLeft":P.preventDefault();{let S=R-1,A=new Date(p,f,S);if(S<1){const N=f===0?p-1:p,I=f===0?11:f-1,H=q(N,I);S=H,A=new Date(N,I,S),C(),setTimeout(()=>{K(H,"backward")},0);return}D(A)?K(S,"backward"):$(S)}break;case"ArrowUp":P.preventDefault();{let S=R-7,A=new Date(p,f,S);if(S<1){const N=f===0?p-1:p,I=f===0?11:f-1;S=q(N,I)+S,A=new Date(N,I,S),C(),setTimeout(()=>{K(S,"backward")},0);return}D(A)?K(S,"backward"):$(S)}break;case"ArrowDown":P.preventDefault();{let S=R+7,A=new Date(p,f,S);if(S>_){const N=f===11?p+1:p,I=f===11?0:f+1;S=S-_,A=new Date(N,I,S),L(),setTimeout(()=>{K(S,"forward")},0);return}D(A)?K(S,"forward"):$(S)}break;case"Home":P.preventDefault(),K(1,"forward");break;case"End":P.preventDefault(),K(_,"backward");break;case"PageUp":P.preventDefault(),C(),setTimeout(()=>{const S=q(f===0?p-1:p,f===0?11:f-1),A=Math.min(R,S);K(A,"forward")},0);break;case"PageDown":P.preventDefault(),L(),setTimeout(()=>{const S=q(f===11?p+1:p,f===11?0:f+1),A=Math.min(R,S);K(A,"forward")},0);break;case" ":case"Space":if(D(m))return;b(m.getDate()),c(m);break;case"Enter":P.preventDefault(),v(m);break}},K=(P,y)=>{const m=q(p,f);if(y==="forward"){for(let _=P;_<=m;_++){const R=new Date(p,f,_);if(!D(R)){$(_);return}}L(),setTimeout(()=>{K(1,"forward")},0)}else{for(let A=P;A>=1;A--){const N=new Date(p,f,A);if(!D(N)){$(A);return}}const _=f===0?p-1:p,R=f===0?11:f-1,S=q(_,R);C(),setTimeout(()=>{K(S,"backward")},0)}},X=(()=>{const P=q(p,f),y=V(p,f),m=[];for(let _=0;_<y;_++)m.push(null);for(let _=1;_<=P;_++){const R=new Date(p,f,_);m.push(R)}return m})(),ce=[];let Q=[];X.forEach((P,y)=>{if(Q.push(P),Q.length===7||y===X.length-1){for(;Q.length<7;)Q.push(null);ce.push(Q),Q=[]}}),U.useEffect(()=>{var P;if(g!==null){const y=X.findIndex(m=>m!==null&&m.getDate()===g);y!==-1&&x.current[y]&&((P=x.current[y])==null||P.focus())}},[f,p,g,X]);const W={label:`${Se["smp-datepickercalendar-label"]}`,wrapper:`${Se["smp-datepickercalendar"]}`,calendar:`${Se["smp-datepickercalendar"]}`,table:`${Se["smp-datepickercalendar-table"]}`,th:`${Se["smp-datepickercalendar-th"]}`,td:(P,y,m,_)=>`${Se["smp-datepickercalendar-td"]}
|
|
56
|
+
${P?Se["smp-datepickercalendar-td-today"]:""}
|
|
57
|
+
${y?Se["smp-datepickercalendar-td-selected"]:""}
|
|
58
|
+
${m?Se["smp-datepickercalendar-td-focused"]:""}
|
|
59
|
+
${_?Se["smp-datepickercalendar-td-disabled"]:""}`},Z=()=>`${w[f]} ${p.toString()}`;return O.jsxs("div",{className:W.wrapper,ref:s,role:"dialog",tabIndex:-1,"aria-modal":"true",children:[O.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[O.jsx(Ge,{onClick:C,ariaLabel:a(jt.PREVIOUS_MONTH),bindValue:"<",type:"ghost",variant:"base"}),O.jsx("div",{"aria-label":Z(),className:W.label,children:Z()}),O.jsx(Ge,{onClick:L,ariaLabel:a(jt.NEXT_MONTH),bindValue:">",type:"ghost",variant:"base"})]}),O.jsxs("table",{ref:E,role:"grid","aria-label":`${a(Lr.CALENDAR_FOR)} ${w[f]} ${p}`,className:W.table,children:[O.jsx("thead",{children:O.jsx("tr",{children:j.map(P=>O.jsx("th",{scope:"col",abbr:P.full,className:W.th,children:P.value},P.value))})}),O.jsx("tbody",{children:ce.map((P,y)=>O.jsx("tr",{children:P.map((m,_)=>{const R=y*7+_;if(m===null)return O.jsx("td",{className:W.td(!1,!1,!1,!0)},`empty-${_}`);const S=m.getDate()===o.getDate()&&m.getMonth()===o.getMonth()&&m.getFullYear()===o.getFullYear(),A=l&&m.getDate()===l.getDate()&&m.getMonth()===l.getMonth()&&m.getFullYear()===l.getFullYear(),N=g===m.getDate(),I=D(m);return O.jsx("td",{role:"gridcell","aria-selected":A,tabIndex:N?0:-1,onClick:()=>v(m),onKeyDown:H=>Y(H,R),"aria-label":`${m.getDate()} ${w[m.getMonth()]} ${m.getFullYear()}`,"data-selected":A,"aria-disabled":I,ref:H=>{x.current[R]=H},className:W.td(S,A,N,I),children:m.getDate()},`day-${_}`)})},`week-${y}`))})]})]})}const Nr=({bindValue:n,placeholder:e,onChange:t,disabledDateRanges:r,...s})=>{const[a,i]=U.useState(!1),[o,l]=U.useState(n||""),[c,f]=U.useState(""),{anchorRef:u,targetRef:p}=Nt({position:"bottom",enabled:a});ht(p,()=>{i(!1)}),ht(u,()=>{if(typeof u=="object"&&u!==null&&"current"in u){const C=u.current.querySelector("input");C&&C===document.activeElement&&x()}}),$r(a,p);const{format:h,getCurrentLanguage:g}=kt(),b=U.useCallback(C=>{const L=C.length>5&&zn(C,g())||C,q=h(L,void 0,void 0,{type:"date"}),V=typeof L!="string",$=V&&L.toISOString().substring(0,10)||"";return{isValid:V,formattedDate:q,isoDate:$,normalizedDate:L}},[g,h]);U.useEffect(()=>{const{formattedDate:C,isoDate:L,isValid:q}=b(n);l(q&&L||n),f(q&&C||n)},[n,h,b]);const E=()=>i(C=>!C),x=()=>{j(c)},w=C=>{j(C),i(!1)},j=C=>{const{isoDate:L,isValid:q}=b(C);t&&t(q&&L||C)},D=C=>{f(C)},v=C=>{C.key==="Enter"&&(C.preventDefault(),j(c))};return O.jsxs("div",{children:[O.jsx(Ie,{bindValue:c,placeholder:e,onBlur:x,onChange:D,onKeyDown:v,shapeIcon:"calendar",onShapeIconClick:E,ref:u,...s}),a&&O.jsx(as,{disabledDateRanges:r,onDateChange:w,initialValue:Lt(o)&&o||"",targetRef:p})]})},is={"smp-multipleAutocomplete-container":"_smp-multipleAutocomplete-container_1mtv2_1"},os=({elements:n,displayMode:e,minimumChars:t,listDisplayMode:r,placeholder:s,fun:a,onOptionsRequest:i,onChange:o})=>{const l=n.map(u=>u.bindValue),c=(u,p)=>{const h=[...n];if(u=="")h.pop();else{const g=h.findIndex(b=>b.bindValue===u&&b.optionalDisplayValue===p);g>=0?h.splice(g,1):h.push({bindValue:u,optionalDisplayValue:p})}o==null||o(h)},f={container:`${is["smp-multipleAutocomplete-container"]}`};return O.jsxs("div",{className:f.container,children:[O.jsx(jr,{elements:n,displayMode:e,isEditable:!0,onChange:u=>{o==null||o(u)}}),O.jsx(It,{bindValue:"",fun:a,onChange:c,_changeOnEnter:!0,listDisplayMode:r,minimumChars:t,placeholder:s,onOptionsRequest:i,_multiActiveIndex:l})]})},Ir=({...n})=>{const[e,t]=U.useState(!1),r=e?"visibility-off":"visibility";return O.jsx(Ie,{...n,inputType:e?"text":"password",shapeIcon:r,onShapeIconClick:()=>t(!e),ariaLabel:"password"})};class je{constructor(e,t){Pe(this,"class");Pe(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new je(e,e.k.split(";"))}static fromString(e){return new je({t:"",p:""},e.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const at=(n,e,t)=>({obj:{t:n.obj.t,p:n.obj.p,k:e},decode:t||n.decode,shape:n.shape}),Sr=n=>{const e=je.fromDataObj(n.obj),t=n.decode?je.fromString(n.decode).getValue():[];return e.getValue().map((r,s)=>({bindValue:r,optionalDisplayValue:t.length>=s?t[s]:""}))},ls=(n,e)=>{const t=new je(n.obj,e.map(s=>s.bindValue)).getLegacyValue(),r=new je(n.obj,e.map(s=>s.optionalDisplayValue?s.optionalDisplayValue:"")).getLegacyValue();return at(n,t,r)},cs=({decode:n,shape:e,obj:t,data:r,icon:s,fun:a,placeholderIcon:i,label:o,onChange:l,onClick:c,onBlur:f,onOptionsRequest:u})=>{const p={obj:t,shape:e,decode:n},h={onBlur:f,onOptionsRequest:u,fun:a,icon:s,label:o,...r},g=(x,w)=>Kn(t)?at(p,new pt(t,x).getLegacyValue()):at(p,x,w),b=x=>at(p,new dt(t,x).getLegacyValue()),E=x=>ls(p,x);switch(e){case xe.AUTOCOMPLETE:{const x={...h,bindValue:t.k,optionalDisplayValue:n,onChange:(w,j)=>{l==null||l(g(w,j))}};return O.jsx(It,{...x})}case xe.BUTTON:{const x={...h,bindValue:t.k,optionalDisplayValue:n,onClick:()=>{c==null||c(g(t.k))}};return O.jsx(Ge,{...x})}case xe.COMBOBOX:{const x={...h,bindValue:t.k,optionalDisplayValue:n,onChange:(w,j)=>{l==null||l(g(w,j))}};return O.jsx(kr,{...x})}case xe.CHECKBOX:{const x={...h,bindValue:dt.fromDataObj(t).getValue(),optionalDisplayValue:n,onChange:w=>{l==null||l(b(w))}};return O.jsx(Pr,{...x})}case xe.CHIP:{const x={...h,elements:Sr(p)};return O.jsx(jr,{...x})}case xe.DATE:{const x={...h,bindValue:pt.fromDataObj(t).getValue(),onChange:w=>{l==null||l(g(w))}};return O.jsx(Nr,{...x})}case xe.ICON:{const x={...h,icon:s,placeholderIcon:i,onClick:()=>{c==null||c(g(t.k))}};return O.jsx(Re,{...x})}case xe.MULTI_AUTOCOMPLETE:{const x={...h,elements:Sr(p),onChange:w=>{l==null||l(E(w))}};return O.jsx(os,{...x})}case xe.PASSWORD:{const x={...h,bindValue:t.k,onChange:w=>{l==null||l(g(w))}};return O.jsx(Ir,{...x})}case xe.TEXT_FIELD:case void 0:{const x={...h,bindValue:t.k,onChange:w=>{l==null||l(g(w))}};return O.jsx(Ie,{...x})}}},Er={"smp-field-container":"_smp-field-container_nnmjb_1","smp-field-position-left":"_smp-field-position-left_nnmjb_6","smp-field-position-right":"_smp-field-position-right_nnmjb_10","smp-field-position-top":"_smp-field-position-top_nnmjb_14","smp-field-position-bottom":"_smp-field-position-bottom_nnmjb_18"},us=({data:n,type:e,showSubmit:t=!1,submitPosition:r="right",defaultValue:s,label:a,labelPosition:i="left",onBlur:o,onClick:l,onOptionsRequest:c})=>{const[f,u]=U.useState();U.useEffect(()=>{u(()=>{const b={...n};return e&&(b.shape=e),s&&(b.obj=Bn(s)),b})},[n,s,e]);const p=Be(t)?Er[`smp-field-position-${r}`]:"",h={container:`${Er["smp-field-container"]} ${p}`},g=()=>{Be(t)||o==null||o(f)};if(f)return O.jsxs("div",{className:h.container,children:[O.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",font:"var(--smp-fontLabel-base)"},children:O.jsx(cs,{...f,onChange:u,onOptionsRequest:c,fun:n.fun,onBlur:g,label:a,labelPosition:i})}),Be(t)&&O.jsx(Ge,{bindValue:"Confirm",onClick:()=>l==null?void 0:l(f)})]})};exports.Autocomplete=It;exports.Button=Ge;exports.Checkbox=Pr;exports.Combobox=kr;exports.DashList=qn;exports.DatePicker=Nr;exports.Field=us;exports.Icon=Re;exports.Password=Ir;exports.Textfield=Ie;exports.configurePaths=dn;
|