diff --git a/assets/index-CL8_1Jam.js b/assets/index-YTE60928.js similarity index 99% rename from assets/index-CL8_1Jam.js rename to assets/index-YTE60928.js index 9d47544..f918537 100644 --- a/assets/index-CL8_1Jam.js +++ b/assets/index-YTE60928.js @@ -308,7 +308,7 @@ html body { `]:{backgroundColor:e.colorBgElevated,borderColor:e.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:e.handleSize,height:e.handleSize,boxShadow:`0 0 0 ${K(e.handleLineWidth)} ${s}`,insetInlineStart:0,insetBlockStart:0},[` ${t}-mark-text, ${t}-dot - `]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-inner`]:{minWidth:"unset"}})}},A$=(e,t)=>{const{componentCls:n,railSize:r,handleSize:o,dotSize:a,marginFull:i,calc:l}=e,s=t?"paddingBlock":"paddingInline",u=t?"width":"height",d=t?"height":"width",f=t?"insetBlockStart":"insetInlineStart",g=t?"top":"insetInlineStart",v=l(r).mul(3).sub(o).div(2).equal(),p=l(o).sub(r).div(2).equal(),y=t?{borderWidth:`${K(p)} 0`,transform:`translateY(${K(l(p).mul(-1).equal())})`}:{borderWidth:`0 ${K(p)}`,transform:`translateX(${K(e.calc(p).mul(-1).equal())})`};return{[s]:r,[d]:l(r).mul(3).equal(),[`${n}-rail`]:{[u]:"100%",[d]:r},[`${n}-track,${n}-tracks`]:{[d]:r},[`${n}-track-draggable`]:Object.assign({},y),[`${n}-handle`]:{[f]:v},[`${n}-mark`]:{insetInlineStart:0,top:0,[g]:l(r).mul(3).add(t?0:i).equal(),[u]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[g]:r,[u]:"100%",[d]:r},[`${n}-dot`]:{position:"absolute",[f]:l(r).sub(a).div(2).equal()}}},g5=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},A$(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},m5=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},A$(e,!1)),{height:"100%"})}},v5=e=>{const n=e.controlHeightLG/4,r=e.controlHeightSM/2,o=e.lineWidth+1,a=e.lineWidth+1*3;return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:r,dotSize:8,handleLineWidth:o,handleLineWidthHover:a,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:e.colorPrimary,handleColorDisabled:new Zt(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexShortString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}},p5=Xt("Slider",e=>{const t=Et(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return[f5(t),g5(t),m5(t)]},v5);function Yf(){const[e,t]=c.useState(!1),n=c.useRef(),r=()=>{mt.cancel(n.current)},o=a=>{r(),a?t(a):n.current=mt(()=>{t(a)})};return c.useEffect(()=>r,[]),[e,o]}var h5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);otypeof n=="number"?n.toString():""}const ao=V.forwardRef((e,t)=>{const{prefixCls:n,range:r,className:o,rootClassName:a,style:i,disabled:l,tooltipPrefixCls:s,tipFormatter:u,tooltipVisible:d,getTooltipPopupContainer:f,tooltipPlacement:g,tooltip:v={},onChangeComplete:p}=e,y=h5(e,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete"]),{vertical:S}=e,{direction:h,slider:m,getPrefixCls:b,getPopupContainer:C}=V.useContext(nt),x=V.useContext(wr),w=l??x,[$,E]=Yf(),[P,I]=Yf(),T=Object.assign({},v),{open:N,placement:_,getPopupContainer:M,prefixCls:A,formatter:L}=T,O=N??d,R=($||P)&&O!==!1,F=y5(L,u),[z,j]=Yf(),D=re=>{p==null||p(re),j(!1)},H=(re,ue)=>re||(ue?h==="rtl"?"left":"right":"top"),W=b("slider",n),[G,Y,q]=p5(W),Z=X(o,m==null?void 0:m.className,a,{[`${W}-rtl`]:h==="rtl",[`${W}-lock`]:z},Y,q);h==="rtl"&&!y.vertical&&(y.reverse=!y.reverse);const[ae,ee]=V.useMemo(()=>r?typeof r=="object"?[!0,r.draggableTrack]:[!0,!1]:[!1],[r]);V.useEffect(()=>{const re=()=>{mt(()=>{I(!1)},1)};return document.addEventListener("mouseup",re),()=>{document.removeEventListener("mouseup",re)}},[]);const Q=ae&&!O,te=(re,ue)=>{const{index:ve}=ue,se=re.props,oe=Object.assign(Object.assign({},se),{onMouseEnter:pe=>{var fe;E(!0),(fe=se.onMouseEnter)===null||fe===void 0||fe.call(se,pe)},onMouseLeave:pe=>{var fe;E(!1),(fe=se.onMouseLeave)===null||fe===void 0||fe.call(se,pe)},onMouseDown:pe=>{var fe;I(!0),j(!0),(fe=se.onMouseDown)===null||fe===void 0||fe.call(se,pe)},onFocus:pe=>{var fe,xe;I(!0),(fe=y.onFocus)===null||fe===void 0||fe.call(y,pe),(xe=se.onFocus)===null||xe===void 0||xe.call(se,pe)},onBlur:pe=>{var fe,xe;I(!1),(fe=y.onBlur)===null||fe===void 0||fe.call(y,pe),(xe=se.onBlur)===null||xe===void 0||xe.call(se,pe)}}),ie=V.cloneElement(re,oe),ce=(!!O||R)&&F!==null;return Q?ie:V.createElement(Sb,Object.assign({},T,{prefixCls:b("tooltip",A??s),title:F?F(ue.value):"",open:ce,placement:H(_??g,S),key:ve,overlayClassName:`${W}-tooltip`,getPopupContainer:M||f||C}),ie)},le=Q?(re,ue)=>{const ve=V.cloneElement(re,{style:Object.assign(Object.assign({},re.props.style),{visibility:"hidden"})});return V.createElement(Sb,Object.assign({},T,{prefixCls:b("tooltip",A??s),title:F?F(ue.value):"",open:F!==null&&R,placement:H(_??g,S),key:"tooltip",overlayClassName:`${W}-tooltip`,getPopupContainer:M||f||C}),ve)}:void 0,J=Object.assign(Object.assign({},m==null?void 0:m.style),i);return G(V.createElement(d5,Object.assign({},y,{step:y.step,range:ae,draggableTrack:ee,className:Z,style:J,disabled:w,ref:t,prefixCls:W,handleRender:te,activeHandleRender:le,onChangeComplete:D})))});var b5=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],k$=c.forwardRef(function(e,t){var n,r=e.prefixCls,o=r===void 0?"rc-switch":r,a=e.className,i=e.checked,l=e.defaultChecked,s=e.disabled,u=e.loadingIcon,d=e.checkedChildren,f=e.unCheckedChildren,g=e.onClick,v=e.onChange,p=e.onKeyDown,y=Ye(e,b5),S=Ht(!1,{value:i,defaultValue:l}),h=U(S,2),m=h[0],b=h[1];function C(E,P){var I=m;return s||(I=E,b(I),v==null||v(I,P)),I}function x(E){E.which===ne.LEFT?C(!1,E):E.which===ne.RIGHT&&C(!0,E),p==null||p(E)}function w(E){var P=C(!m,E);g==null||g(P,E)}var $=X(o,a,(n={},k(n,"".concat(o,"-checked"),m),k(n,"".concat(o,"-disabled"),s),n));return c.createElement("button",Ce({},y,{type:"button",role:"switch","aria-checked":m,disabled:s,className:$,ref:t,onKeyDown:x,onClick:w}),u,c.createElement("span",{className:"".concat(o,"-inner")},c.createElement("span",{className:"".concat(o,"-inner-checked")},d),c.createElement("span",{className:"".concat(o,"-inner-unchecked")},f)))});k$.displayName="Switch";const S5=e=>{const{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:o,innerMinMarginSM:a,innerMaxMarginSM:i,handleSizeSM:l,calc:s}=e,u=`${t}-inner`,d=K(s(l).add(s(r).mul(2)).equal()),f=K(s(i).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:o,height:n,lineHeight:K(n),[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${u}-checked, ${u}-unchecked`]:{minHeight:n},[`${u}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${f})`,marginInlineEnd:`calc(100% - ${d} + ${f})`},[`${u}-unchecked`]:{marginTop:s(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:l,height:l},[`${t}-loading-icon`]:{top:s(s(l).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${u}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${u}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${f})`,marginInlineEnd:`calc(-100% + ${d} - ${f})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${K(s(l).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${u}`]:{[`${u}-unchecked`]:{marginInlineStart:s(e.marginXXS).div(2).equal(),marginInlineEnd:s(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${u}`]:{[`${u}-checked`]:{marginInlineStart:s(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:s(e.marginXXS).div(2).equal()}}}}}}},C5=e=>{const{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},x5=e=>{const{componentCls:t,trackPadding:n,handleBg:r,handleShadow:o,handleSize:a,calc:i}=e,l=`${t}-handle`;return{[t]:{[l]:{position:"absolute",top:n,insetInlineStart:n,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:i(a).div(2).equal(),boxShadow:o,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${l}`]:{insetInlineStart:`calc(100% - ${K(i(a).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${l}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${l}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},w5=e=>{const{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:o,innerMaxMargin:a,handleSize:i,calc:l}=e,s=`${t}-inner`,u=K(l(i).add(l(r).mul(2)).equal()),d=K(l(a).mul(2).equal());return{[t]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:o,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${s}-checked, ${s}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${s}-unchecked`]:{marginTop:l(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${s}`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:l(r).mul(2).equal(),marginInlineEnd:l(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:l(r).mul(-1).mul(2).equal(),marginInlineEnd:l(r).mul(2).equal()}}}}}},$5=e=>{const{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},an(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:`${K(n)}`,verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),gd(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}},E5=e=>{const{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:o}=e,a=t*n,i=r/2,l=2,s=a-l*2,u=i-l*2;return{trackHeight:a,trackHeightSM:i,trackMinWidth:s*2+l*4,trackMinWidthSM:u*2+l*2,trackPadding:l,handleBg:o,handleSize:s,handleSizeSM:u,handleShadow:`0 2px 4px 0 ${new Zt("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:s/2,innerMaxMargin:s+l+l*2,innerMinMarginSM:u/2,innerMaxMarginSM:u+l+l*2}},O5=Xt("Switch",e=>{const t=Et(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[$5(t),w5(t),x5(t),C5(t),S5(t)]},E5);var R5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{const{prefixCls:n,size:r,disabled:o,loading:a,className:i,rootClassName:l,style:s,checked:u,value:d,defaultChecked:f,defaultValue:g,onChange:v}=e,p=R5(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[y,S]=Ht(!1,{value:u??d,defaultValue:f??g}),{getPrefixCls:h,direction:m,switch:b}=c.useContext(nt),C=c.useContext(wr),x=(o??C)||a,w=h("switch",n),$=c.createElement("div",{className:`${w}-handle`},a&&c.createElement(md,{className:`${w}-loading-icon`})),[E,P,I]=O5(w),T=Bn(r),N=X(b==null?void 0:b.className,{[`${w}-small`]:T==="small",[`${w}-loading`]:a,[`${w}-rtl`]:m==="rtl"},i,l,P,I),_=Object.assign(Object.assign({},b==null?void 0:b.style),s),M=function(){S(arguments.length<=0?void 0:arguments[0]),v==null||v.apply(void 0,arguments)};return E(c.createElement(Ox,{component:"Switch"},c.createElement(k$,Object.assign({},p,{checked:y,onChange:M,prefixCls:w,className:N,style:_,disabled:x,ref:t,loadingIcon:$}))))}),No=I5;No.__ANT_SWITCH=!0;function P5(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function xb(e,t,n){e.loadNamespaces(t,D$(e,n))}function wb(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,D$(e,r))}function N5(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],o=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(l,s)=>{const u=t.services.backendConnector.state[`${l}|${s}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!i(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||i(r,e)&&(!o||i(a,e)))}function M5(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(Vm("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(o,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!a(o.isLanguageChangingTo,e))return!1}}):N5(e,t,n)}const T5=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,_5={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},L5=e=>_5[e],j5=e=>e.replace(T5,L5);let Wm={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:j5};function F5(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Wm={...Wm,...e}}function z5(){return Wm}let B$;function A5(e){B$=e}function k5(){return B$}const D5={type:"3rdParty",init(e){F5(e.options.react),A5(e)}},B5=c.createContext();class H5{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const V5=(e,t)=>{const n=c.useRef();return c.useEffect(()=>{n.current=e},[e,t]),n.current};function H$(e,t,n,r){return e.getFixedT(t,n,r)}function W5(e,t,n,r){return c.useCallback(H$(e,t,n,r),[e,t,n,r])}function U5(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:o}=c.useContext(B5)||{},a=n||r||k5();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new H5),!a){Vm("You will need to pass in an i18next instance by using initReactI18next");const C=(w,$)=>typeof $=="string"?$:$&&typeof $=="object"&&typeof $.defaultValue=="string"?$.defaultValue:Array.isArray(w)?w[w.length-1]:w,x=[C,{},!1];return x.t=C,x.i18n={},x.ready=!1,x}a.options.react&&a.options.react.wait!==void 0&&Vm("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...z5(),...a.options.react,...t},{useSuspense:l,keyPrefix:s}=i;let u=o||a.options&&a.options.defaultNS;u=typeof u=="string"?[u]:u||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(u);const d=(a.isInitialized||a.initializedStoreOnce)&&u.every(C=>M5(C,a,i)),f=W5(a,t.lng||null,i.nsMode==="fallback"?u:u[0],s),g=()=>f,v=()=>H$(a,t.lng||null,i.nsMode==="fallback"?u:u[0],s),[p,y]=c.useState(g);let S=u.join();t.lng&&(S=`${t.lng}${S}`);const h=V5(S),m=c.useRef(!0);c.useEffect(()=>{const{bindI18n:C,bindI18nStore:x}=i;m.current=!0,!d&&!l&&(t.lng?wb(a,t.lng,u,()=>{m.current&&y(v)}):xb(a,u,()=>{m.current&&y(v)})),d&&h&&h!==S&&m.current&&y(v);function w(){m.current&&y(v)}return C&&a&&a.on(C,w),x&&a&&a.store.on(x,w),()=>{m.current=!1,C&&a&&C.split(" ").forEach($=>a.off($,w)),x&&a&&x.split(" ").forEach($=>a.store.off($,w))}},[a,S]),c.useEffect(()=>{m.current&&d&&y(g)},[a,s,d]);const b=[p,a,d];if(b.t=p,b.i18n=a,b.ready=d,d||!d&&!l)return b;throw new Promise(C=>{t.lng?wb(a,t.lng,u,()=>C()):xb(a,u,()=>C())})}function K5(){const{t:e,i18n:t}=U5(),[n,r]=c.useState(50),[o,a]=c.useState(!1),[i,l]=c.useState("transparent"),[s,u]=c.useState(350),[d,f]=c.useState("#bdc3c7"),[g,v]=c.useState(1),[p,y]=c.useState(30),[S,h]=c.useState(!0),[m,b]=c.useState(!0),[C,x]=c.useState("#43CF73"),[w,$]=c.useState("rgba(130, 221, 95,0.5)"),[E,P]=c.useState({start:"#43CF73",end:"#BCEC4F"}),[I,T]=c.useState({start:"rgba(130, 221, 95,0.5)",end:"rgba(130, 221, 97,0.5)"}),[N,_]=c.useState(3),[M,A]=c.useState(3),[L,O]=c.useState(0),[R,F]=c.useState(0),[z,j]=c.useState(1),[D,H]=c.useState(!0),[W,G]=c.useState(!1),[Y,q]=c.useState(!1),Z={size:s,bgColor:i,adaptive:o,circleColor:d,circleLineWidth:g,waveHeight:p,isWaveGradient:S,isWaveBgGradient:m,waveColor:C,waveBgColor:w,waveGradientColor:E,waveBgGradientColor:I,waveSpeed:N,waveBgSpeed:M,waveOffsetY:L,waveBgOffsetY:R,waveBgOffsetX:z,showWaveBg:D,reverseWave:W,reverseWaveBg:Y},ae=[{key:"1",label:e("BasicSettings.title"),children:we.jsxs(we.Fragment,{children:[we.jsx(Pt.Item,{label:e("BasicSettings.value"),children:we.jsx(ao,{defaultValue:n,onChange:r,min:0,max:100,step:1},"height")}),we.jsx(Pt.Item,{label:e("BasicSettings.adapt"),children:we.jsx(No,{value:o,onChange:a,checkedChildren:e("BasicSettings.adaptToSize"),unCheckedChildren:e("BasicSettings.fixedSize")})}),!o&&we.jsx(Pt.Item,{label:e("BasicSettings.size"),children:we.jsx(ao,{defaultValue:s,onChange:u,min:10,max:1e3,step:1},"size")})]})},{key:"2",label:e("CircleSettings.title"),children:we.jsxs(we.Fragment,{children:[we.jsx(Pt.Item,{label:e("CircleSettings.lineWidth"),children:we.jsx(ao,{defaultValue:g,onChange:v,min:0,max:10,step:1},"lineWidth")}),we.jsx(Pt.Item,{label:e("CircleSettings.color"),children:we.jsxs(O$,{children:[we.jsx(No,{value:i!=="transparent",onChange:ee=>l(ee?"#E8E8E8":"transparent"),unCheckedChildren:e("CircleSettings.transparent"),checkedChildren:e("CircleSettings.filled")}),i!=="transparent"&&we.jsx(Kr,{value:i,onChange:ee=>l(ee.toRgbString()),showText:!0},"circleBgColor")]})}),we.jsx(Pt.Item,{label:e("CircleSettings.color"),children:we.jsx(Kr,{value:d,onChange:ee=>f(ee.toRgbString()),showText:!0},"circleColor")})]})},{key:"3",label:e("WaveSettings.title"),children:we.jsxs(we.Fragment,{children:[we.jsx(Pt.Item,{label:e("WaveSettings.height"),children:we.jsx(ao,{defaultValue:p,onChange:y,min:0,max:175,step:1},"waveHeight")}),we.jsxs(ok,{gap:"middle",wrap:!0,justify:"center",children:[we.jsxs($u,{title:e("WaveSettings.foregroundWave"),type:"inner",children:[we.jsx(Pt.Item,{label:we.jsxs(we.Fragment,{children:[e("WaveSettings.waveSpeed")," ",we.jsx(Hi,{title:e("WaveSettings.smallFast"),children:we.jsx(Bm,{style:{color:"gray"}})})]}),children:we.jsx(ao,{defaultValue:N,onChange:_,min:.1,max:10,step:.1},"speed")}),we.jsx(Pt.Item,{label:e("WaveSettings.waveOffsetY"),children:we.jsx(ao,{defaultValue:L,onChange:O,min:-35,max:35,step:1},"dy")}),we.jsx(Pt.Item,{label:e("WaveSettings.isWaveReverse"),children:we.jsx(No,{value:W,onChange:G,checkedChildren:e("WaveSettings.left"),unCheckedChildren:e("WaveSettings.right")})}),we.jsx(Pt.Item,{label:e("WaveSettings.isWaveGradient"),children:we.jsx(No,{value:S,onChange:h,checkedChildren:e("WaveSettings.gradient"),unCheckedChildren:e("WaveSettings.single")})}),S?we.jsxs(we.Fragment,{children:[we.jsx(Pt.Item,{label:e("WaveSettings.Gradient-start"),children:we.jsx(Kr,{value:E.start,onChange:ee=>P(Q=>({start:ee.toRgbString(),end:Q.end})),showText:!0},"Color-1-1")}),we.jsx(Pt.Item,{label:e("WaveSettings.Gradient-end"),children:we.jsx(Kr,{value:E.end,onChange:ee=>P(Q=>({start:Q.start,end:ee.toRgbString()})),showText:!0},"Color-1-2")})]}):we.jsx(we.Fragment,{children:we.jsx(Pt.Item,{label:e("WaveSettings.color"),children:we.jsx(Kr,{value:C,onChange:ee=>x(ee.toRgbString()),showText:!0},"Color-1-3")})})]}),we.jsxs($u,{title:e("WaveSettings.backgroundWave"),type:"inner",children:[we.jsx(Pt.Item,{label:we.jsxs(we.Fragment,{children:[e("WaveSettings.waveSpeed")," ",we.jsx(Hi,{title:e("WaveSettings.smallFast"),children:we.jsx(Bm,{style:{color:"gray"}})})]}),children:we.jsx(ao,{defaultValue:M,onChange:A,min:.1,max:10,step:.1},"speed-2")}),we.jsx(Pt.Item,{label:e("WaveSettings.waveOffsetX"),children:we.jsx(ao,{defaultValue:z,onChange:j,min:0,max:2,step:.1},"dx")}),we.jsx(Pt.Item,{label:e("WaveSettings.waveOffsetY"),children:we.jsx(ao,{defaultValue:R,onChange:F,min:-35,max:35,step:1},"dy-2")}),we.jsx(Pt.Item,{label:e("WaveSettings.bgWaveShow"),children:we.jsx(No,{value:D,onChange:H,checkedChildren:e("WaveSettings.show"),unCheckedChildren:e("WaveSettings.hide")})}),we.jsx(Pt.Item,{label:e("WaveSettings.isWaveReverse"),children:we.jsx(No,{value:Y,onChange:q,checkedChildren:e("WaveSettings.left"),unCheckedChildren:e("WaveSettings.right")})}),we.jsx(Pt.Item,{label:e("WaveSettings.isWaveGradient"),children:we.jsx(No,{value:m,onChange:b,checkedChildren:e("WaveSettings.gradient"),unCheckedChildren:e("WaveSettings.single")})}),m?we.jsxs(we.Fragment,{children:[we.jsx(Pt.Item,{label:e("WaveSettings.Gradient-start"),children:we.jsx(Kr,{value:I.start,onChange:ee=>T(Q=>({start:ee.toRgbString(),end:Q.end})),showText:!0},"Color-2-1")}),we.jsx(Pt.Item,{label:e("WaveSettings.Gradient-end"),children:we.jsx(Kr,{value:I.end,onChange:ee=>T(Q=>({start:Q.start,end:ee.toRgbString()})),showText:!0},"Color-2-2")})]}):we.jsx(we.Fragment,{children:we.jsx(Pt.Item,{label:e("WaveSettings.color"),children:we.jsx(Kr,{value:w,onChange:ee=>$(ee.toRgbString()),showText:!0},"Color-2-3")})})]})]})]})},{key:"4",label:e("Output.title"),children:we.jsxs(we.Fragment,{children:[we.jsx(Sd,{block:!0,type:"primary",onClick:()=>navigator.clipboard.writeText(JSON.stringify(Z,null,2)),children:e("Output.copy")}),we.jsx("code",{className:"output",children:JSON.stringify(Z,null,2)}),we.jsx(l$,{items:[{key:"1",label:e("Output.example"),children:we.jsx(G5,{...Z})}]})]})}];return we.jsxs(we.Fragment,{children:[we.jsx(xO,{value:n,...Z}),we.jsx("div",{className:"langSelector",children:we.jsx(e5,{defaultValue:t.language,onChange:ee=>{t.changeLanguage(ee)},options:[{label:"简体中文",value:"zh-CN"},{label:"English",value:"en"}]})}),we.jsx(Ip,{defaultActiveKey:"1",items:ae})]})}function G5(e){return we.jsx("code",{style:{textAlign:"left",userSelect:"text",whiteSpace:"pre-wrap",display:"block",padding:"8px",borderRadius:"8px"},children:`import { useState } from "react"; + `]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-inner`]:{minWidth:"unset"}})}},A$=(e,t)=>{const{componentCls:n,railSize:r,handleSize:o,dotSize:a,marginFull:i,calc:l}=e,s=t?"paddingBlock":"paddingInline",u=t?"width":"height",d=t?"height":"width",f=t?"insetBlockStart":"insetInlineStart",g=t?"top":"insetInlineStart",v=l(r).mul(3).sub(o).div(2).equal(),p=l(o).sub(r).div(2).equal(),y=t?{borderWidth:`${K(p)} 0`,transform:`translateY(${K(l(p).mul(-1).equal())})`}:{borderWidth:`0 ${K(p)}`,transform:`translateX(${K(e.calc(p).mul(-1).equal())})`};return{[s]:r,[d]:l(r).mul(3).equal(),[`${n}-rail`]:{[u]:"100%",[d]:r},[`${n}-track,${n}-tracks`]:{[d]:r},[`${n}-track-draggable`]:Object.assign({},y),[`${n}-handle`]:{[f]:v},[`${n}-mark`]:{insetInlineStart:0,top:0,[g]:l(r).mul(3).add(t?0:i).equal(),[u]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[g]:r,[u]:"100%",[d]:r},[`${n}-dot`]:{position:"absolute",[f]:l(r).sub(a).div(2).equal()}}},g5=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},A$(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},m5=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},A$(e,!1)),{height:"100%"})}},v5=e=>{const n=e.controlHeightLG/4,r=e.controlHeightSM/2,o=e.lineWidth+1,a=e.lineWidth+1*3;return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:r,dotSize:8,handleLineWidth:o,handleLineWidthHover:a,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:e.colorPrimary,handleColorDisabled:new Zt(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexShortString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}},p5=Xt("Slider",e=>{const t=Et(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return[f5(t),g5(t),m5(t)]},v5);function Yf(){const[e,t]=c.useState(!1),n=c.useRef(),r=()=>{mt.cancel(n.current)},o=a=>{r(),a?t(a):n.current=mt(()=>{t(a)})};return c.useEffect(()=>r,[]),[e,o]}var h5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);otypeof n=="number"?n.toString():""}const ao=V.forwardRef((e,t)=>{const{prefixCls:n,range:r,className:o,rootClassName:a,style:i,disabled:l,tooltipPrefixCls:s,tipFormatter:u,tooltipVisible:d,getTooltipPopupContainer:f,tooltipPlacement:g,tooltip:v={},onChangeComplete:p}=e,y=h5(e,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete"]),{vertical:S}=e,{direction:h,slider:m,getPrefixCls:b,getPopupContainer:C}=V.useContext(nt),x=V.useContext(wr),w=l??x,[$,E]=Yf(),[P,I]=Yf(),T=Object.assign({},v),{open:N,placement:_,getPopupContainer:M,prefixCls:A,formatter:L}=T,O=N??d,R=($||P)&&O!==!1,F=y5(L,u),[z,j]=Yf(),D=re=>{p==null||p(re),j(!1)},H=(re,ue)=>re||(ue?h==="rtl"?"left":"right":"top"),W=b("slider",n),[G,Y,q]=p5(W),Z=X(o,m==null?void 0:m.className,a,{[`${W}-rtl`]:h==="rtl",[`${W}-lock`]:z},Y,q);h==="rtl"&&!y.vertical&&(y.reverse=!y.reverse);const[ae,ee]=V.useMemo(()=>r?typeof r=="object"?[!0,r.draggableTrack]:[!0,!1]:[!1],[r]);V.useEffect(()=>{const re=()=>{mt(()=>{I(!1)},1)};return document.addEventListener("mouseup",re),()=>{document.removeEventListener("mouseup",re)}},[]);const Q=ae&&!O,te=(re,ue)=>{const{index:ve}=ue,se=re.props,oe=Object.assign(Object.assign({},se),{onMouseEnter:pe=>{var fe;E(!0),(fe=se.onMouseEnter)===null||fe===void 0||fe.call(se,pe)},onMouseLeave:pe=>{var fe;E(!1),(fe=se.onMouseLeave)===null||fe===void 0||fe.call(se,pe)},onMouseDown:pe=>{var fe;I(!0),j(!0),(fe=se.onMouseDown)===null||fe===void 0||fe.call(se,pe)},onFocus:pe=>{var fe,xe;I(!0),(fe=y.onFocus)===null||fe===void 0||fe.call(y,pe),(xe=se.onFocus)===null||xe===void 0||xe.call(se,pe)},onBlur:pe=>{var fe,xe;I(!1),(fe=y.onBlur)===null||fe===void 0||fe.call(y,pe),(xe=se.onBlur)===null||xe===void 0||xe.call(se,pe)}}),ie=V.cloneElement(re,oe),ce=(!!O||R)&&F!==null;return Q?ie:V.createElement(Sb,Object.assign({},T,{prefixCls:b("tooltip",A??s),title:F?F(ue.value):"",open:ce,placement:H(_??g,S),key:ve,overlayClassName:`${W}-tooltip`,getPopupContainer:M||f||C}),ie)},le=Q?(re,ue)=>{const ve=V.cloneElement(re,{style:Object.assign(Object.assign({},re.props.style),{visibility:"hidden"})});return V.createElement(Sb,Object.assign({},T,{prefixCls:b("tooltip",A??s),title:F?F(ue.value):"",open:F!==null&&R,placement:H(_??g,S),key:"tooltip",overlayClassName:`${W}-tooltip`,getPopupContainer:M||f||C}),ve)}:void 0,J=Object.assign(Object.assign({},m==null?void 0:m.style),i);return G(V.createElement(d5,Object.assign({},y,{step:y.step,range:ae,draggableTrack:ee,className:Z,style:J,disabled:w,ref:t,prefixCls:W,handleRender:te,activeHandleRender:le,onChangeComplete:D})))});var b5=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],k$=c.forwardRef(function(e,t){var n,r=e.prefixCls,o=r===void 0?"rc-switch":r,a=e.className,i=e.checked,l=e.defaultChecked,s=e.disabled,u=e.loadingIcon,d=e.checkedChildren,f=e.unCheckedChildren,g=e.onClick,v=e.onChange,p=e.onKeyDown,y=Ye(e,b5),S=Ht(!1,{value:i,defaultValue:l}),h=U(S,2),m=h[0],b=h[1];function C(E,P){var I=m;return s||(I=E,b(I),v==null||v(I,P)),I}function x(E){E.which===ne.LEFT?C(!1,E):E.which===ne.RIGHT&&C(!0,E),p==null||p(E)}function w(E){var P=C(!m,E);g==null||g(P,E)}var $=X(o,a,(n={},k(n,"".concat(o,"-checked"),m),k(n,"".concat(o,"-disabled"),s),n));return c.createElement("button",Ce({},y,{type:"button",role:"switch","aria-checked":m,disabled:s,className:$,ref:t,onKeyDown:x,onClick:w}),u,c.createElement("span",{className:"".concat(o,"-inner")},c.createElement("span",{className:"".concat(o,"-inner-checked")},d),c.createElement("span",{className:"".concat(o,"-inner-unchecked")},f)))});k$.displayName="Switch";const S5=e=>{const{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:o,innerMinMarginSM:a,innerMaxMarginSM:i,handleSizeSM:l,calc:s}=e,u=`${t}-inner`,d=K(s(l).add(s(r).mul(2)).equal()),f=K(s(i).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:o,height:n,lineHeight:K(n),[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${u}-checked, ${u}-unchecked`]:{minHeight:n},[`${u}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${f})`,marginInlineEnd:`calc(100% - ${d} + ${f})`},[`${u}-unchecked`]:{marginTop:s(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:l,height:l},[`${t}-loading-icon`]:{top:s(s(l).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${u}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${u}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${f})`,marginInlineEnd:`calc(-100% + ${d} - ${f})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${K(s(l).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${u}`]:{[`${u}-unchecked`]:{marginInlineStart:s(e.marginXXS).div(2).equal(),marginInlineEnd:s(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${u}`]:{[`${u}-checked`]:{marginInlineStart:s(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:s(e.marginXXS).div(2).equal()}}}}}}},C5=e=>{const{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},x5=e=>{const{componentCls:t,trackPadding:n,handleBg:r,handleShadow:o,handleSize:a,calc:i}=e,l=`${t}-handle`;return{[t]:{[l]:{position:"absolute",top:n,insetInlineStart:n,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:i(a).div(2).equal(),boxShadow:o,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${l}`]:{insetInlineStart:`calc(100% - ${K(i(a).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${l}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${l}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},w5=e=>{const{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:o,innerMaxMargin:a,handleSize:i,calc:l}=e,s=`${t}-inner`,u=K(l(i).add(l(r).mul(2)).equal()),d=K(l(a).mul(2).equal());return{[t]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:o,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${s}-checked, ${s}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${s}-unchecked`]:{marginTop:l(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${s}`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:l(r).mul(2).equal(),marginInlineEnd:l(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:l(r).mul(-1).mul(2).equal(),marginInlineEnd:l(r).mul(2).equal()}}}}}},$5=e=>{const{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},an(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:`${K(n)}`,verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),gd(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}},E5=e=>{const{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:o}=e,a=t*n,i=r/2,l=2,s=a-l*2,u=i-l*2;return{trackHeight:a,trackHeightSM:i,trackMinWidth:s*2+l*4,trackMinWidthSM:u*2+l*2,trackPadding:l,handleBg:o,handleSize:s,handleSizeSM:u,handleShadow:`0 2px 4px 0 ${new Zt("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:s/2,innerMaxMargin:s+l+l*2,innerMinMarginSM:u/2,innerMaxMarginSM:u+l+l*2}},O5=Xt("Switch",e=>{const t=Et(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[$5(t),w5(t),x5(t),C5(t),S5(t)]},E5);var R5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{const{prefixCls:n,size:r,disabled:o,loading:a,className:i,rootClassName:l,style:s,checked:u,value:d,defaultChecked:f,defaultValue:g,onChange:v}=e,p=R5(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[y,S]=Ht(!1,{value:u??d,defaultValue:f??g}),{getPrefixCls:h,direction:m,switch:b}=c.useContext(nt),C=c.useContext(wr),x=(o??C)||a,w=h("switch",n),$=c.createElement("div",{className:`${w}-handle`},a&&c.createElement(md,{className:`${w}-loading-icon`})),[E,P,I]=O5(w),T=Bn(r),N=X(b==null?void 0:b.className,{[`${w}-small`]:T==="small",[`${w}-loading`]:a,[`${w}-rtl`]:m==="rtl"},i,l,P,I),_=Object.assign(Object.assign({},b==null?void 0:b.style),s),M=function(){S(arguments.length<=0?void 0:arguments[0]),v==null||v.apply(void 0,arguments)};return E(c.createElement(Ox,{component:"Switch"},c.createElement(k$,Object.assign({},p,{checked:y,onChange:M,prefixCls:w,className:N,style:_,disabled:x,ref:t,loadingIcon:$}))))}),No=I5;No.__ANT_SWITCH=!0;function P5(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function xb(e,t,n){e.loadNamespaces(t,D$(e,n))}function wb(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,D$(e,r))}function N5(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],o=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(l,s)=>{const u=t.services.backendConnector.state[`${l}|${s}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!i(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||i(r,e)&&(!o||i(a,e)))}function M5(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(Vm("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(o,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!a(o.isLanguageChangingTo,e))return!1}}):N5(e,t,n)}const T5=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,_5={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},L5=e=>_5[e],j5=e=>e.replace(T5,L5);let Wm={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:j5};function F5(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Wm={...Wm,...e}}function z5(){return Wm}let B$;function A5(e){B$=e}function k5(){return B$}const D5={type:"3rdParty",init(e){F5(e.options.react),A5(e)}},B5=c.createContext();class H5{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const V5=(e,t)=>{const n=c.useRef();return c.useEffect(()=>{n.current=e},[e,t]),n.current};function H$(e,t,n,r){return e.getFixedT(t,n,r)}function W5(e,t,n,r){return c.useCallback(H$(e,t,n,r),[e,t,n,r])}function U5(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:o}=c.useContext(B5)||{},a=n||r||k5();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new H5),!a){Vm("You will need to pass in an i18next instance by using initReactI18next");const C=(w,$)=>typeof $=="string"?$:$&&typeof $=="object"&&typeof $.defaultValue=="string"?$.defaultValue:Array.isArray(w)?w[w.length-1]:w,x=[C,{},!1];return x.t=C,x.i18n={},x.ready=!1,x}a.options.react&&a.options.react.wait!==void 0&&Vm("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...z5(),...a.options.react,...t},{useSuspense:l,keyPrefix:s}=i;let u=o||a.options&&a.options.defaultNS;u=typeof u=="string"?[u]:u||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(u);const d=(a.isInitialized||a.initializedStoreOnce)&&u.every(C=>M5(C,a,i)),f=W5(a,t.lng||null,i.nsMode==="fallback"?u:u[0],s),g=()=>f,v=()=>H$(a,t.lng||null,i.nsMode==="fallback"?u:u[0],s),[p,y]=c.useState(g);let S=u.join();t.lng&&(S=`${t.lng}${S}`);const h=V5(S),m=c.useRef(!0);c.useEffect(()=>{const{bindI18n:C,bindI18nStore:x}=i;m.current=!0,!d&&!l&&(t.lng?wb(a,t.lng,u,()=>{m.current&&y(v)}):xb(a,u,()=>{m.current&&y(v)})),d&&h&&h!==S&&m.current&&y(v);function w(){m.current&&y(v)}return C&&a&&a.on(C,w),x&&a&&a.store.on(x,w),()=>{m.current=!1,C&&a&&C.split(" ").forEach($=>a.off($,w)),x&&a&&x.split(" ").forEach($=>a.store.off($,w))}},[a,S]),c.useEffect(()=>{m.current&&d&&y(g)},[a,s,d]);const b=[p,a,d];if(b.t=p,b.i18n=a,b.ready=d,d||!d&&!l)return b;throw new Promise(C=>{t.lng?wb(a,t.lng,u,()=>C()):xb(a,u,()=>C())})}function K5(){const{t:e,i18n:t}=U5(),[n,r]=c.useState(50),[o,a]=c.useState(!1),[i,l]=c.useState("transparent"),[s,u]=c.useState(350),[d,f]=c.useState("#bdc3c7"),[g,v]=c.useState(1),[p,y]=c.useState(30),[S,h]=c.useState(!0),[m,b]=c.useState(!0),[C,x]=c.useState("#43CF73"),[w,$]=c.useState("rgba(130, 221, 95,0.5)"),[E,P]=c.useState({start:"#43CF73",end:"#BCEC4F"}),[I,T]=c.useState({start:"rgba(130, 221, 95,0.5)",end:"rgba(130, 221, 97,0.5)"}),[N,_]=c.useState(3),[M,A]=c.useState(3),[L,O]=c.useState(0),[R,F]=c.useState(0),[z,j]=c.useState(1),[D,H]=c.useState(!0),[W,G]=c.useState(!1),[Y,q]=c.useState(!1),Z={size:s,bgColor:i,adaptive:o,circleColor:d,circleLineWidth:g,waveHeight:p,isWaveGradient:S,isWaveBgGradient:m,waveColor:C,waveBgColor:w,waveGradientColor:E,waveBgGradientColor:I,waveSpeed:N,waveBgSpeed:M,waveOffsetY:L,waveBgOffsetY:R,waveBgOffsetX:z,showWaveBg:D,reverseWave:W,reverseWaveBg:Y},ae=[{key:"1",label:e("BasicSettings.title"),children:we.jsxs(we.Fragment,{children:[we.jsx(Pt.Item,{label:e("BasicSettings.value"),children:we.jsx(ao,{defaultValue:n,onChange:r,min:0,max:100,step:1},"height")}),we.jsx(Pt.Item,{label:e("BasicSettings.adapt"),children:we.jsx(No,{value:o,onChange:a,checkedChildren:e("BasicSettings.adaptToSize"),unCheckedChildren:e("BasicSettings.fixedSize")})}),!o&&we.jsx(Pt.Item,{label:e("BasicSettings.size"),children:we.jsx(ao,{defaultValue:s,onChange:u,min:10,max:1e3,step:1},"size")})]})},{key:"2",label:e("CircleSettings.title"),children:we.jsxs(we.Fragment,{children:[we.jsx(Pt.Item,{label:e("CircleSettings.lineWidth"),children:we.jsx(ao,{defaultValue:g,onChange:v,min:0,max:10,step:1},"lineWidth")}),we.jsx(Pt.Item,{label:e("CircleSettings.bgColor"),children:we.jsxs(O$,{children:[we.jsx(No,{value:i!=="transparent",onChange:ee=>l(ee?"#E8E8E8":"transparent"),unCheckedChildren:e("CircleSettings.transparent"),checkedChildren:e("CircleSettings.filled")}),i!=="transparent"&&we.jsx(Kr,{value:i,onChange:ee=>l(ee.toRgbString()),showText:!0},"circleBgColor")]})}),we.jsx(Pt.Item,{label:e("CircleSettings.color"),children:we.jsx(Kr,{value:d,onChange:ee=>f(ee.toRgbString()),showText:!0},"circleColor")})]})},{key:"3",label:e("WaveSettings.title"),children:we.jsxs(we.Fragment,{children:[we.jsx(Pt.Item,{label:e("WaveSettings.height"),children:we.jsx(ao,{defaultValue:p,onChange:y,min:0,max:175,step:1},"waveHeight")}),we.jsxs(ok,{gap:"middle",wrap:!0,justify:"center",children:[we.jsxs($u,{title:e("WaveSettings.foregroundWave"),type:"inner",children:[we.jsx(Pt.Item,{label:we.jsxs(we.Fragment,{children:[e("WaveSettings.waveSpeed")," ",we.jsx(Hi,{title:e("WaveSettings.smallFast"),children:we.jsx(Bm,{style:{color:"gray"}})})]}),children:we.jsx(ao,{defaultValue:N,onChange:_,min:.1,max:10,step:.1},"speed")}),we.jsx(Pt.Item,{label:e("WaveSettings.waveOffsetY"),children:we.jsx(ao,{defaultValue:L,onChange:O,min:-35,max:35,step:1},"dy")}),we.jsx(Pt.Item,{label:e("WaveSettings.isWaveReverse"),children:we.jsx(No,{value:W,onChange:G,checkedChildren:e("WaveSettings.left"),unCheckedChildren:e("WaveSettings.right")})}),we.jsx(Pt.Item,{label:e("WaveSettings.isWaveGradient"),children:we.jsx(No,{value:S,onChange:h,checkedChildren:e("WaveSettings.gradient"),unCheckedChildren:e("WaveSettings.single")})}),S?we.jsxs(we.Fragment,{children:[we.jsx(Pt.Item,{label:e("WaveSettings.Gradient-start"),children:we.jsx(Kr,{value:E.start,onChange:ee=>P(Q=>({start:ee.toRgbString(),end:Q.end})),showText:!0},"Color-1-1")}),we.jsx(Pt.Item,{label:e("WaveSettings.Gradient-end"),children:we.jsx(Kr,{value:E.end,onChange:ee=>P(Q=>({start:Q.start,end:ee.toRgbString()})),showText:!0},"Color-1-2")})]}):we.jsx(we.Fragment,{children:we.jsx(Pt.Item,{label:e("WaveSettings.color"),children:we.jsx(Kr,{value:C,onChange:ee=>x(ee.toRgbString()),showText:!0},"Color-1-3")})})]}),we.jsxs($u,{title:e("WaveSettings.backgroundWave"),type:"inner",children:[we.jsx(Pt.Item,{label:we.jsxs(we.Fragment,{children:[e("WaveSettings.waveSpeed")," ",we.jsx(Hi,{title:e("WaveSettings.smallFast"),children:we.jsx(Bm,{style:{color:"gray"}})})]}),children:we.jsx(ao,{defaultValue:M,onChange:A,min:.1,max:10,step:.1},"speed-2")}),we.jsx(Pt.Item,{label:e("WaveSettings.waveOffsetX"),children:we.jsx(ao,{defaultValue:z,onChange:j,min:0,max:2,step:.1},"dx")}),we.jsx(Pt.Item,{label:e("WaveSettings.waveOffsetY"),children:we.jsx(ao,{defaultValue:R,onChange:F,min:-35,max:35,step:1},"dy-2")}),we.jsx(Pt.Item,{label:e("WaveSettings.bgWaveShow"),children:we.jsx(No,{value:D,onChange:H,checkedChildren:e("WaveSettings.show"),unCheckedChildren:e("WaveSettings.hide")})}),we.jsx(Pt.Item,{label:e("WaveSettings.isWaveReverse"),children:we.jsx(No,{value:Y,onChange:q,checkedChildren:e("WaveSettings.left"),unCheckedChildren:e("WaveSettings.right")})}),we.jsx(Pt.Item,{label:e("WaveSettings.isWaveGradient"),children:we.jsx(No,{value:m,onChange:b,checkedChildren:e("WaveSettings.gradient"),unCheckedChildren:e("WaveSettings.single")})}),m?we.jsxs(we.Fragment,{children:[we.jsx(Pt.Item,{label:e("WaveSettings.Gradient-start"),children:we.jsx(Kr,{value:I.start,onChange:ee=>T(Q=>({start:ee.toRgbString(),end:Q.end})),showText:!0},"Color-2-1")}),we.jsx(Pt.Item,{label:e("WaveSettings.Gradient-end"),children:we.jsx(Kr,{value:I.end,onChange:ee=>T(Q=>({start:Q.start,end:ee.toRgbString()})),showText:!0},"Color-2-2")})]}):we.jsx(we.Fragment,{children:we.jsx(Pt.Item,{label:e("WaveSettings.color"),children:we.jsx(Kr,{value:w,onChange:ee=>$(ee.toRgbString()),showText:!0},"Color-2-3")})})]})]})]})},{key:"4",label:e("Output.title"),children:we.jsxs(we.Fragment,{children:[we.jsx(Sd,{block:!0,type:"primary",onClick:()=>navigator.clipboard.writeText(JSON.stringify(Z,null,2)),children:e("Output.copy")}),we.jsx("code",{className:"output",children:JSON.stringify(Z,null,2)}),we.jsx(l$,{items:[{key:"1",label:e("Output.example"),children:we.jsx(G5,{...Z})}]})]})}];return we.jsxs(we.Fragment,{children:[we.jsx(xO,{value:n,...Z}),we.jsx("div",{className:"langSelector",children:we.jsx(e5,{defaultValue:t.language,onChange:ee=>{t.changeLanguage(ee)},options:[{label:"简体中文",value:"zh-CN"},{label:"English",value:"en"}]})}),we.jsx(Ip,{defaultActiveKey:"1",items:ae})]})}function G5(e){return we.jsx("code",{style:{textAlign:"left",userSelect:"text",whiteSpace:"pre-wrap",display:"block",padding:"8px",borderRadius:"8px"},children:`import { useState } from "react"; import WaveBall from "react-wave-progress-ball-svg"; import "react-wave-progress-ball-svg/dist/style.css"; @@ -321,4 +321,4 @@ export function ExampleBall(){ ) } -`})}const q5={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Nu{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||q5,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{let[l,s]=i;for(let u=0;u{let[l,s]=i;for(let u=0;u{e=r,t=o});return n.resolve=e,n.reject=t,n}function $b(e){return e==null?"":""+e}function X5(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const Y5=/###/g;function Dl(e,t,n){function r(l){return l&&l.indexOf("###")>-1?l.replace(Y5,"."):l}function o(){return!e||typeof e=="string"}const a=typeof t!="string"?t:t.split(".");let i=0;for(;i":">",'"':""","'":"'","/":"/"};function eD(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>J5[t]):e}class tD{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const nD=[" ",",","?","!",";"],rD=new tD(20);function oD(e,t,n){t=t||"",n=n||"";const r=nD.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const o=rD.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!o.test(e);if(!a){const i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a}function Um(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let a=0;a-1&&s0?e.replace("_","-"):e}class Ob extends _d{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,i=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):typeof r=="string"&&a?l.push(...r.split(a)):l.push(r)));const s=Mu(this.data,l);return!s&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),s||!i||typeof r!="string"?s:Um(this.data&&this.data[t]&&this.data[t][n],r,a)}addResource(t,n,r,o){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=[t,n];r&&(l=l.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(l=t.split("."),o=n,n=l[1]),this.addNamespaces(n),Eb(this.data,l,o),a.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(typeof r[a]=="string"||Array.isArray(r[a]))&&this.addResource(t,n,a,r[a],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,a){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),o=r,r=n,n=l[1]),this.addNamespaces(n);let s=Mu(this.data,l)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?V$(s,r,a):s={...s,...r},Eb(this.data,l,s),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var W$={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(a=>{this.processors[a]&&(t=this.processors[a].process(t,n,r,o))}),t}};const Rb={};class _u extends _d{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),X5(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Xr.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!oD(t,r,o);if(i&&!l){const s=t.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:t,namespaces:a};const u=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),t=u.join(o)}return typeof a=="string"&&(a=[a]),{key:t,namespaces:a}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:l}=this.extractFromKey(t[t.length-1],n),s=l[l.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const C=n.nsSeparator||this.options.nsSeparator;return o?{res:`${s}${C}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(n)}:`${s}${C}${i}`}return o?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(n)}:i}const f=this.resolve(t,n);let g=f&&f.res;const v=f&&f.usedKey||i,p=f&&f.exactUsedKey||i,y=Object.prototype.toString.apply(g),S=["[object Number]","[object Function]","[object RegExp]"],h=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&g&&(typeof g!="string"&&typeof g!="boolean"&&typeof g!="number")&&S.indexOf(y)<0&&!(typeof h=="string"&&Array.isArray(g))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const C=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,g,{...n,ns:l}):`key '${i} (${this.language})' returned an object instead of string.`;return o?(f.res=C,f.usedParams=this.getUsedParamsDetails(n),f):C}if(a){const C=Array.isArray(g),x=C?[]:{},w=C?p:v;for(const $ in g)if(Object.prototype.hasOwnProperty.call(g,$)){const E=`${w}${a}${$}`;x[$]=this.translate(E,{...n,joinArrays:!1,ns:l}),x[$]===E&&(x[$]=g[$])}g=x}}else if(m&&typeof h=="string"&&Array.isArray(g))g=g.join(h),g&&(g=this.extendTranslation(g,t,n,r));else{let C=!1,x=!1;const w=n.count!==void 0&&typeof n.count!="string",$=_u.hasDefaultValue(n),E=w?this.pluralResolver.getSuffix(u,n.count,n):"",P=n.ordinal&&w?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",I=w&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),T=I&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${E}`]||n[`defaultValue${P}`]||n.defaultValue;!this.isValidLookup(g)&&$&&(C=!0,g=T),this.isValidLookup(g)||(x=!0,g=i);const _=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&x?void 0:g,M=$&&T!==g&&this.options.updateMissing;if(x||C||M){if(this.logger.log(M?"updateKey":"missingKey",u,s,i,M?T:g),a){const R=this.resolve(i,{...n,keySeparator:!1});R&&R.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 A=[];const L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let R=0;R{const j=$&&z!==g?z:_;this.options.missingKeyHandler?this.options.missingKeyHandler(R,s,F,j,M,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(R,s,F,j,M,n),this.emit("missingKey",R,s,F,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?A.forEach(R=>{const F=this.pluralResolver.getSuffixes(R,n);I&&n[`defaultValue${this.options.pluralSeparator}zero`]&&F.indexOf(`${this.options.pluralSeparator}zero`)<0&&F.push(`${this.options.pluralSeparator}zero`),F.forEach(z=>{O([R],i+z,n[`defaultValue${z}`]||T)})}):O(A,i,T))}g=this.extendTranslation(g,t,n,f,r),x&&g===i&&this.options.appendNamespaceToMissingKey&&(g=`${s}:${i}`),(x||C)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,C?g:void 0):g=this.options.parseMissingKeyHandler(g))}return o?(f.res=g,f.usedParams=this.getUsedParamsDetails(n),f):g}extendTranslation(t,n,r,o,a){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const g=t.match(this.interpolator.nestingRegexp);d=g&&g.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language,r),u){const g=t.match(this.interpolator.nestingRegexp),v=g&&g.length;d1&&arguments[1]!==void 0?arguments[1]:{},r,o,a,i,l;return typeof t=="string"&&(t=[t]),t.forEach(s=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(s,n),d=u.key;o=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const g=n.count!==void 0&&typeof n.count!="string",v=g&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",y=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(S=>{this.isValidLookup(r)||(l=S,!Rb[`${y[0]}-${S}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(Rb[`${y[0]}-${S}`]=!0,this.logger.warn(`key "${o}" 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(h=>{if(this.isValidLookup(r))return;i=h;const m=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(m,d,h,S,n);else{let C;g&&(C=this.pluralResolver.getSuffix(h,n.count,n));const x=`${this.options.pluralSeparator}zero`,w=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(m.push(d+C),n.ordinal&&C.indexOf(w)===0&&m.push(d+C.replace(w,this.options.pluralSeparator)),v&&m.push(d+x)),p){const $=`${d}${this.options.contextSeparator}${n.context}`;m.push($),g&&(m.push($+C),n.ordinal&&C.indexOf(w)===0&&m.push($+C.replace(w,this.options.pluralSeparator)),v&&m.push($+x))}}let b;for(;b=m.pop();)this.isValidLookup(r)||(a=b,r=this.getResource(h,S,b,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:i,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function Qf(e){return e.charAt(0).toUpperCase()+e.slice(1)}class Ib{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Xr.create("languageUtils")}getScriptPartFromCode(t){if(t=Tu(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Tu(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Qf(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Qf(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Qf(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],a=i=>{i&&(this.isSupportedCode(i)?o.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),r.forEach(i=>{o.indexOf(i)<0&&a(this.formatLanguageCode(i))}),o}}let aD=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],iD={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const lD=["v1","v2","v3"],sD=["v4"],Pb={zero:0,one:1,two:2,few:3,many:4,other:5};function cD(){const e={};return aD.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:iD[t.fc]}})}),e}class uD{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Xr.create("pluralResolver"),(!this.options.compatibilityJSON||sD.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=cD()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Tu(t==="dev"?"en":t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,a)=>Pb[o]-Pb[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const a=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?a():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!lD.includes(this.options.compatibilityJSON)}}function Nb(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=Z5(e,t,n);return!a&&o&&typeof n=="string"&&(a=Um(e,n,r),a===void 0&&(a=Um(t,n,r))),a}class dD{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Xr.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:i,suffix:l,suffixEscaped:s,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:g,nestingPrefixEscaped:v,nestingSuffix:p,nestingSuffixEscaped:y,nestingOptionsSeparator:S,maxReplaces:h,alwaysFormat:m}=t.interpolation;this.escape=n!==void 0?n:eD,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?ti(a):i||"{{",this.suffix=l?ti(l):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=g?ti(g):v||ti("$t("),this.nestingSuffix=p?ti(p):y||ti(")"),this.nestingOptionsSeparator=S||",",this.maxReplaces=h||1e3,this.alwaysFormat=m!==void 0?m:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let a,i,l;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(p){return p.replace(/\$/g,"$$$$")}const d=p=>{if(p.indexOf(this.formatSeparator)<0){const m=Nb(n,s,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,r,{...o,...n,interpolationkey:p}):m}const y=p.split(this.formatSeparator),S=y.shift().trim(),h=y.join(this.formatSeparator).trim();return this.format(Nb(n,s,S,this.options.keySeparator,this.options.ignoreJSONStructure),h,r,{...o,...n,interpolationkey:S})};this.resetRegExp();const f=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,g=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>u(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?u(this.escape(p)):u(p)}].forEach(p=>{for(l=0;a=p.regex.exec(t);){const y=a[1].trim();if(i=d(y),i===void 0)if(typeof f=="function"){const h=f(t,a,o);i=typeof h=="string"?h:""}else if(o&&Object.prototype.hasOwnProperty.call(o,y))i="";else if(g){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${t}`),i="";else typeof i!="string"&&!this.useRawValueToEscape&&(i=$b(i));const S=p.safeValue(i);if(t=t.replace(a[0],S),g?(p.regex.lastIndex+=i.length,p.regex.lastIndex-=a[0].length):p.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,i;function l(s,u){const d=this.nestingOptionsSeparator;if(s.indexOf(d)<0)return s;const f=s.split(new RegExp(`${d}[ ]*{`));let g=`{${f[1]}`;s=f[0],g=this.interpolate(g,i);const v=g.match(/'/g),p=g.match(/"/g);(v&&v.length%2===0&&!p||p.length%2!==0)&&(g=g.replace(/'/g,'"'));try{i=JSON.parse(g),u&&(i={...u,...i})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${s}`,y),`${s}${d}${g}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,s}for(;o=this.nestingRegexp.exec(t);){let s=[];i={...r},i=i.replace&&typeof i.replace!="string"?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const d=o[1].split(this.formatSeparator).map(f=>f.trim());o[1]=d.shift(),s=d,u=!0}if(a=n(l.call(this,o[1].trim(),i),i),a&&o[0]===t&&typeof a!="string")return a;typeof a!="string"&&(a=$b(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),a=""),u&&(a=s.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}function fD(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(i=>{if(i){const[l,...s]=i.split(":"),u=s.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}}function ni(e){const t={};return function(r,o,a){const i=o+JSON.stringify(a);let l=t[i];return l||(l=e(Tu(o),a),t[i]=l),l(r)}}class gD{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Xr.create("formatter"),this.options=t,this.formats={number:ni((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return a=>o.format(a)}),currency:ni((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>o.format(a)}),datetime:ni((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return a=>o.format(a)}),relativetime:ni((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return a=>o.format(a,r.range||"day")}),list:ni((n,r)=>{const o=new Intl.ListFormat(n,{...r});return a=>o.format(a)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=ni(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((l,s)=>{const{formatName:u,formatOptions:d}=fD(s);if(this.formats[u]){let f=l;try{const g=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},v=g.locale||g.lng||o.locale||o.lng||r;f=this.formats[u](l,v,{...d,...o,...g})}catch(g){this.logger.warn(g)}return f}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}function mD(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class vD extends _d{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Xr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const a={},i={},l={},s={};return t.forEach(u=>{let d=!0;n.forEach(f=>{const g=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?i[g]===void 0&&(i[g]=!0):(this.state[g]=1,d=!1,i[g]===void 0&&(i[g]=!0),a[g]===void 0&&(a[g]=!0),s[f]===void 0&&(s[f]=!0)))}),d||(l[u]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(s)}}loaded(t,n,r){const o=t.split("|"),a=o[0],i=o[1];n&&this.emit("failedLoading",a,i,n),r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2;const l={};this.queue.forEach(s=>{Q5(s.loaded,[a],i),mD(s,t),n&&s.errors.push(n),s.pendingCount===0&&!s.done&&(Object.keys(s.loaded).forEach(u=>{l[u]||(l[u]={});const d=s.loaded[u];d.length&&d.forEach(f=>{l[u][f]===void 0&&(l[u][f]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(s=>!s.done)}read(t,n,r){let o=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(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:a,callback:i});return}this.readingCalls++;const l=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&o{this.read.call(this,t,n,r,o+1,a*2,i)},a);return}i(u,d)},s=this.backend[r].bind(this.backend);if(s.length===2){try{const u=s(t,n);u&&typeof u.then=="function"?u.then(d=>l(null,d)).catch(l):l(null,u)}catch(u){l(u)}return}return s(t,n,l)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=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."),o&&o();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const a=this.queueLoad(t,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(i,l)=>{i&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,i),!i&&l&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,l),this.loaded(t,i,l)})}saveMissing(t,n,r,o,a){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" 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(this.backend&&this.backend.create){const s={...i,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(t,n,r,o,s):d=u(t,n,r,o),d&&typeof d.then=="function"?d.then(f=>l(null,f)).catch(l):l(null,d)}catch(d){l(d)}else u(t,n,r,o,l,s)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}function Mb(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(o=>{n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Tb(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function hc(){}function pD(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class bs extends _d{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Tb(t),this.services={},this.logger=Xr,this.modules={external:[]},pD(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=Mb();this.options={...o,...this.options,...Tb(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function a(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?Xr.init(a(this.modules.logger),this.options):Xr.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=gD);const f=new Ib(this.options);this.store=new Ob(this.options.resources,this.options);const g=this.services;g.logger=Xr,g.resourceStore=this.store,g.languageUtils=f,g.pluralResolver=new uD(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(g.formatter=a(d),g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new dD(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new vD(a(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",function(v){for(var p=arguments.length,y=new Array(p>1?p-1:0),S=1;S1?p-1:0),S=1;S{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,r||(r=hc),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const s=pl(),u=()=>{const d=(f,g)=>{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),s.resolve(g),r(f,g)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),s}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hc;const o=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],i=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};o?i(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(s=>i(s)),this.options.preload&&this.options.preload.forEach(l=>i(l)),this.services.backendConnector.load(a,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const o=pl();return t||(t=this.languages),n||(n=this.options.ns),r||(r=hc),this.services.backendConnector.reload(t,n,a=>{o.resolve(),r(a)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&W$.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=pl();this.emit("languageChanging",t);const a=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},i=(s,u)=>{u?(a(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(s,function(){return r.t(...arguments)})},l=s=>{!t&&!s&&this.services.languageDetector&&(s=[]);const u=typeof s=="string"?s:this.services.languageUtils.getBestMatchFromCodes(s);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{i(d,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&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(t),o}getFixedT(t,n,r){var o=this;const a=function(i,l){let s;if(typeof l!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f`${s.keyPrefix}${g}${p}`):v=s.keyPrefix?`${s.keyPrefix}${g}${i}`:i,o.t(v,s)};return typeof t=="string"?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=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=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(l,s)=>{const u=this.services.backendConnector.state[`${l}|${s}`];return u===-1||u===2};if(n.precheck){const l=n.precheck(this,i);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!o||i(a,t)))}loadNamespaces(t,n){const r=pl();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=pl();typeof t=="string"&&(t=[t]);const o=this.options.preload||[],a=t.filter(i=>o.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=o.concat(a),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["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=this.services&&this.services.languageUtils||new Ib(Mb());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new bs(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hc;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},a=new bs(o);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Ob(this.store.data,o),a.services.resourceStore=a.store),a.translator=new _u(a.services,o),a.translator.on("*",function(l){for(var s=arguments.length,u=new Array(s>1?s-1:0),d=1;d{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const _b=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,SD=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(t);let a=`${e}=${o}`;if(r.maxAge>0){const i=r.maxAge-0;if(Number.isNaN(i))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(i)}`}if(r.domain){if(!_b.test(r.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${r.domain}`}if(r.path){if(!_b.test(r.path))throw new TypeError("option path is invalid");a+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},Lb={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=SD(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const i=o.substring(1).split("&");for(let l=0;l0&&i[l].substring(0,s)===t&&(n=i[l].substring(s+1))}}return n}};let hl=null;const jb=()=>{if(hl!==null)return hl;try{hl=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{hl=!1}return hl};var wD={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&jb())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&jb()&&window.localStorage.setItem(n,e)}};let yl=null;const Fb=()=>{if(yl!==null)return yl;try{yl=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{yl=!1}return yl};var $D={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Fb())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Fb()&&window.sessionStorage.setItem(n,e)}},ED={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let a=0;a0?t:void 0}},OD={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},RD={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},ID={name:"subdomain",lookup(e){var o,a;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((a=(o=window.location)==null?void 0:o.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function PD(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class U${constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=bD(n,this.options||{},PD()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(CD),this.addDetector(xD),this.addDetector(wD),this.addDetector($D),this.addDetector(ED),this.addDetector(OD),this.addDetector(RD),this.addDetector(ID)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}U$.type="languageDetector";const ND={title:"基本设置",value:"液面高度",adapt:"是否自适应外框大小",adaptToSize:"适应大小",fixedSize:"固定大小",size:"球的大小"},MD={title:"外框设置",lineWidth:"外框宽度",transparent:"透明",filled:"填充",color:"外框颜色"},TD={title:"波浪设置",height:"波浪高度",foregroundWave:"前景波浪",waveSpeed:"波浪速度",smallFast:"越小越快",waveOffsetY:"波浪Y轴偏移",isWaveReverse:"反转波浪",left:"左移",right:"右移",isWaveGradient:"是否渐变",gradient:"渐变",single:"单色","Gradient-start":"开始颜色","Gradient-end":"结束颜色",color:"颜色",backgroundWave:"背景波浪",waveOffsetX:"波浪X轴偏移",bgWaveShow:"是否显示",show:"显示",hide:"隐藏"},_D={title:"导出设置",copy:"复制",example:"使用示例"},zb={BasicSettings:ND,CircleSettings:MD,WaveSettings:TD,Output:_D},LD={title:"Basic Settings",value:"Completion percentage",adapt:"Is adapt to size",adaptToSize:"Adapt",fixedSize:"Fix",size:"Size"},jD={title:"Outline settings",lineWidth:"Outline width",transparent:"Transparent",filled:"Filled",color:"Outline color"},FD={title:"Wave Settings",height:"Wave height",foregroundWave:"Foreground Wave",waveSpeed:"Wave speed",smallFast:"The smaller, the faster",waveOffsetY:"Y-axis offset",isWaveReverse:"Reverse movement",left:"Shift left",right:"Shift right",isWaveGradient:"Gradient",gradient:"Gradient",single:"Monochrome","Gradient-start":"Gradient start color","Gradient-end":"Gradient end color",color:"Color",backgroundWave:"background Wave",waveOffsetX:"X-axis offset",bgWaveShow:"Visibility",show:"Display",hide:"Hide"},zD={title:"Output",copy:"Copy",example:"Example"},AD={BasicSettings:LD,CircleSettings:jD,WaveSettings:FD,Output:zD};Mn.use(U$).use(D5).init({debug:!0,fallbackLng:"zh",interpolation:{escapeValue:!1},resources:{en:{translation:AD},"zh-CN":{translation:zb},zh:{translation:zb}}});Zf.createRoot(document.getElementById("root")).render(we.jsx(V.StrictMode,{children:we.jsx(K5,{})})); +`})}const q5={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Nu{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||q5,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{let[l,s]=i;for(let u=0;u{let[l,s]=i;for(let u=0;u{e=r,t=o});return n.resolve=e,n.reject=t,n}function $b(e){return e==null?"":""+e}function X5(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const Y5=/###/g;function Dl(e,t,n){function r(l){return l&&l.indexOf("###")>-1?l.replace(Y5,"."):l}function o(){return!e||typeof e=="string"}const a=typeof t!="string"?t:t.split(".");let i=0;for(;i":">",'"':""","'":"'","/":"/"};function eD(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>J5[t]):e}class tD{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const nD=[" ",",","?","!",";"],rD=new tD(20);function oD(e,t,n){t=t||"",n=n||"";const r=nD.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const o=rD.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!o.test(e);if(!a){const i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a}function Um(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let a=0;a-1&&s0?e.replace("_","-"):e}class Ob extends _d{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,i=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):typeof r=="string"&&a?l.push(...r.split(a)):l.push(r)));const s=Mu(this.data,l);return!s&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),s||!i||typeof r!="string"?s:Um(this.data&&this.data[t]&&this.data[t][n],r,a)}addResource(t,n,r,o){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=[t,n];r&&(l=l.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(l=t.split("."),o=n,n=l[1]),this.addNamespaces(n),Eb(this.data,l,o),a.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(typeof r[a]=="string"||Array.isArray(r[a]))&&this.addResource(t,n,a,r[a],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,a){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),o=r,r=n,n=l[1]),this.addNamespaces(n);let s=Mu(this.data,l)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?V$(s,r,a):s={...s,...r},Eb(this.data,l,s),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var W$={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(a=>{this.processors[a]&&(t=this.processors[a].process(t,n,r,o))}),t}};const Rb={};class _u extends _d{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),X5(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Xr.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!oD(t,r,o);if(i&&!l){const s=t.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:t,namespaces:a};const u=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),t=u.join(o)}return typeof a=="string"&&(a=[a]),{key:t,namespaces:a}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:l}=this.extractFromKey(t[t.length-1],n),s=l[l.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const C=n.nsSeparator||this.options.nsSeparator;return o?{res:`${s}${C}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(n)}:`${s}${C}${i}`}return o?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(n)}:i}const f=this.resolve(t,n);let g=f&&f.res;const v=f&&f.usedKey||i,p=f&&f.exactUsedKey||i,y=Object.prototype.toString.apply(g),S=["[object Number]","[object Function]","[object RegExp]"],h=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&g&&(typeof g!="string"&&typeof g!="boolean"&&typeof g!="number")&&S.indexOf(y)<0&&!(typeof h=="string"&&Array.isArray(g))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const C=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,g,{...n,ns:l}):`key '${i} (${this.language})' returned an object instead of string.`;return o?(f.res=C,f.usedParams=this.getUsedParamsDetails(n),f):C}if(a){const C=Array.isArray(g),x=C?[]:{},w=C?p:v;for(const $ in g)if(Object.prototype.hasOwnProperty.call(g,$)){const E=`${w}${a}${$}`;x[$]=this.translate(E,{...n,joinArrays:!1,ns:l}),x[$]===E&&(x[$]=g[$])}g=x}}else if(m&&typeof h=="string"&&Array.isArray(g))g=g.join(h),g&&(g=this.extendTranslation(g,t,n,r));else{let C=!1,x=!1;const w=n.count!==void 0&&typeof n.count!="string",$=_u.hasDefaultValue(n),E=w?this.pluralResolver.getSuffix(u,n.count,n):"",P=n.ordinal&&w?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",I=w&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),T=I&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${E}`]||n[`defaultValue${P}`]||n.defaultValue;!this.isValidLookup(g)&&$&&(C=!0,g=T),this.isValidLookup(g)||(x=!0,g=i);const _=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&x?void 0:g,M=$&&T!==g&&this.options.updateMissing;if(x||C||M){if(this.logger.log(M?"updateKey":"missingKey",u,s,i,M?T:g),a){const R=this.resolve(i,{...n,keySeparator:!1});R&&R.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 A=[];const L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let R=0;R{const j=$&&z!==g?z:_;this.options.missingKeyHandler?this.options.missingKeyHandler(R,s,F,j,M,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(R,s,F,j,M,n),this.emit("missingKey",R,s,F,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?A.forEach(R=>{const F=this.pluralResolver.getSuffixes(R,n);I&&n[`defaultValue${this.options.pluralSeparator}zero`]&&F.indexOf(`${this.options.pluralSeparator}zero`)<0&&F.push(`${this.options.pluralSeparator}zero`),F.forEach(z=>{O([R],i+z,n[`defaultValue${z}`]||T)})}):O(A,i,T))}g=this.extendTranslation(g,t,n,f,r),x&&g===i&&this.options.appendNamespaceToMissingKey&&(g=`${s}:${i}`),(x||C)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,C?g:void 0):g=this.options.parseMissingKeyHandler(g))}return o?(f.res=g,f.usedParams=this.getUsedParamsDetails(n),f):g}extendTranslation(t,n,r,o,a){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const g=t.match(this.interpolator.nestingRegexp);d=g&&g.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language,r),u){const g=t.match(this.interpolator.nestingRegexp),v=g&&g.length;d1&&arguments[1]!==void 0?arguments[1]:{},r,o,a,i,l;return typeof t=="string"&&(t=[t]),t.forEach(s=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(s,n),d=u.key;o=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const g=n.count!==void 0&&typeof n.count!="string",v=g&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",y=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(S=>{this.isValidLookup(r)||(l=S,!Rb[`${y[0]}-${S}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(Rb[`${y[0]}-${S}`]=!0,this.logger.warn(`key "${o}" 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(h=>{if(this.isValidLookup(r))return;i=h;const m=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(m,d,h,S,n);else{let C;g&&(C=this.pluralResolver.getSuffix(h,n.count,n));const x=`${this.options.pluralSeparator}zero`,w=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(m.push(d+C),n.ordinal&&C.indexOf(w)===0&&m.push(d+C.replace(w,this.options.pluralSeparator)),v&&m.push(d+x)),p){const $=`${d}${this.options.contextSeparator}${n.context}`;m.push($),g&&(m.push($+C),n.ordinal&&C.indexOf(w)===0&&m.push($+C.replace(w,this.options.pluralSeparator)),v&&m.push($+x))}}let b;for(;b=m.pop();)this.isValidLookup(r)||(a=b,r=this.getResource(h,S,b,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:i,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function Qf(e){return e.charAt(0).toUpperCase()+e.slice(1)}class Ib{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Xr.create("languageUtils")}getScriptPartFromCode(t){if(t=Tu(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Tu(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Qf(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Qf(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Qf(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],a=i=>{i&&(this.isSupportedCode(i)?o.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),r.forEach(i=>{o.indexOf(i)<0&&a(this.formatLanguageCode(i))}),o}}let aD=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],iD={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const lD=["v1","v2","v3"],sD=["v4"],Pb={zero:0,one:1,two:2,few:3,many:4,other:5};function cD(){const e={};return aD.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:iD[t.fc]}})}),e}class uD{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Xr.create("pluralResolver"),(!this.options.compatibilityJSON||sD.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=cD()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Tu(t==="dev"?"en":t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,a)=>Pb[o]-Pb[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const a=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?a():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!lD.includes(this.options.compatibilityJSON)}}function Nb(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=Z5(e,t,n);return!a&&o&&typeof n=="string"&&(a=Um(e,n,r),a===void 0&&(a=Um(t,n,r))),a}class dD{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Xr.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:i,suffix:l,suffixEscaped:s,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:g,nestingPrefixEscaped:v,nestingSuffix:p,nestingSuffixEscaped:y,nestingOptionsSeparator:S,maxReplaces:h,alwaysFormat:m}=t.interpolation;this.escape=n!==void 0?n:eD,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?ti(a):i||"{{",this.suffix=l?ti(l):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=g?ti(g):v||ti("$t("),this.nestingSuffix=p?ti(p):y||ti(")"),this.nestingOptionsSeparator=S||",",this.maxReplaces=h||1e3,this.alwaysFormat=m!==void 0?m:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let a,i,l;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(p){return p.replace(/\$/g,"$$$$")}const d=p=>{if(p.indexOf(this.formatSeparator)<0){const m=Nb(n,s,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,r,{...o,...n,interpolationkey:p}):m}const y=p.split(this.formatSeparator),S=y.shift().trim(),h=y.join(this.formatSeparator).trim();return this.format(Nb(n,s,S,this.options.keySeparator,this.options.ignoreJSONStructure),h,r,{...o,...n,interpolationkey:S})};this.resetRegExp();const f=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,g=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>u(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?u(this.escape(p)):u(p)}].forEach(p=>{for(l=0;a=p.regex.exec(t);){const y=a[1].trim();if(i=d(y),i===void 0)if(typeof f=="function"){const h=f(t,a,o);i=typeof h=="string"?h:""}else if(o&&Object.prototype.hasOwnProperty.call(o,y))i="";else if(g){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${t}`),i="";else typeof i!="string"&&!this.useRawValueToEscape&&(i=$b(i));const S=p.safeValue(i);if(t=t.replace(a[0],S),g?(p.regex.lastIndex+=i.length,p.regex.lastIndex-=a[0].length):p.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,i;function l(s,u){const d=this.nestingOptionsSeparator;if(s.indexOf(d)<0)return s;const f=s.split(new RegExp(`${d}[ ]*{`));let g=`{${f[1]}`;s=f[0],g=this.interpolate(g,i);const v=g.match(/'/g),p=g.match(/"/g);(v&&v.length%2===0&&!p||p.length%2!==0)&&(g=g.replace(/'/g,'"'));try{i=JSON.parse(g),u&&(i={...u,...i})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${s}`,y),`${s}${d}${g}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,s}for(;o=this.nestingRegexp.exec(t);){let s=[];i={...r},i=i.replace&&typeof i.replace!="string"?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const d=o[1].split(this.formatSeparator).map(f=>f.trim());o[1]=d.shift(),s=d,u=!0}if(a=n(l.call(this,o[1].trim(),i),i),a&&o[0]===t&&typeof a!="string")return a;typeof a!="string"&&(a=$b(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),a=""),u&&(a=s.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}function fD(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(i=>{if(i){const[l,...s]=i.split(":"),u=s.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}}function ni(e){const t={};return function(r,o,a){const i=o+JSON.stringify(a);let l=t[i];return l||(l=e(Tu(o),a),t[i]=l),l(r)}}class gD{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Xr.create("formatter"),this.options=t,this.formats={number:ni((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return a=>o.format(a)}),currency:ni((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>o.format(a)}),datetime:ni((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return a=>o.format(a)}),relativetime:ni((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return a=>o.format(a,r.range||"day")}),list:ni((n,r)=>{const o=new Intl.ListFormat(n,{...r});return a=>o.format(a)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=ni(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((l,s)=>{const{formatName:u,formatOptions:d}=fD(s);if(this.formats[u]){let f=l;try{const g=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},v=g.locale||g.lng||o.locale||o.lng||r;f=this.formats[u](l,v,{...d,...o,...g})}catch(g){this.logger.warn(g)}return f}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}function mD(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class vD extends _d{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Xr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const a={},i={},l={},s={};return t.forEach(u=>{let d=!0;n.forEach(f=>{const g=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?i[g]===void 0&&(i[g]=!0):(this.state[g]=1,d=!1,i[g]===void 0&&(i[g]=!0),a[g]===void 0&&(a[g]=!0),s[f]===void 0&&(s[f]=!0)))}),d||(l[u]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(s)}}loaded(t,n,r){const o=t.split("|"),a=o[0],i=o[1];n&&this.emit("failedLoading",a,i,n),r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2;const l={};this.queue.forEach(s=>{Q5(s.loaded,[a],i),mD(s,t),n&&s.errors.push(n),s.pendingCount===0&&!s.done&&(Object.keys(s.loaded).forEach(u=>{l[u]||(l[u]={});const d=s.loaded[u];d.length&&d.forEach(f=>{l[u][f]===void 0&&(l[u][f]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(s=>!s.done)}read(t,n,r){let o=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(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:a,callback:i});return}this.readingCalls++;const l=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&o{this.read.call(this,t,n,r,o+1,a*2,i)},a);return}i(u,d)},s=this.backend[r].bind(this.backend);if(s.length===2){try{const u=s(t,n);u&&typeof u.then=="function"?u.then(d=>l(null,d)).catch(l):l(null,u)}catch(u){l(u)}return}return s(t,n,l)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=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."),o&&o();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const a=this.queueLoad(t,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(i,l)=>{i&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,i),!i&&l&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,l),this.loaded(t,i,l)})}saveMissing(t,n,r,o,a){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" 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(this.backend&&this.backend.create){const s={...i,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(t,n,r,o,s):d=u(t,n,r,o),d&&typeof d.then=="function"?d.then(f=>l(null,f)).catch(l):l(null,d)}catch(d){l(d)}else u(t,n,r,o,l,s)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}function Mb(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(o=>{n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Tb(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function hc(){}function pD(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class bs extends _d{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Tb(t),this.services={},this.logger=Xr,this.modules={external:[]},pD(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=Mb();this.options={...o,...this.options,...Tb(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function a(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?Xr.init(a(this.modules.logger),this.options):Xr.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=gD);const f=new Ib(this.options);this.store=new Ob(this.options.resources,this.options);const g=this.services;g.logger=Xr,g.resourceStore=this.store,g.languageUtils=f,g.pluralResolver=new uD(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(g.formatter=a(d),g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new dD(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new vD(a(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",function(v){for(var p=arguments.length,y=new Array(p>1?p-1:0),S=1;S1?p-1:0),S=1;S{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,r||(r=hc),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const s=pl(),u=()=>{const d=(f,g)=>{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),s.resolve(g),r(f,g)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),s}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hc;const o=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],i=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};o?i(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(s=>i(s)),this.options.preload&&this.options.preload.forEach(l=>i(l)),this.services.backendConnector.load(a,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const o=pl();return t||(t=this.languages),n||(n=this.options.ns),r||(r=hc),this.services.backendConnector.reload(t,n,a=>{o.resolve(),r(a)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&W$.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=pl();this.emit("languageChanging",t);const a=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},i=(s,u)=>{u?(a(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(s,function(){return r.t(...arguments)})},l=s=>{!t&&!s&&this.services.languageDetector&&(s=[]);const u=typeof s=="string"?s:this.services.languageUtils.getBestMatchFromCodes(s);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{i(d,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&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(t),o}getFixedT(t,n,r){var o=this;const a=function(i,l){let s;if(typeof l!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f`${s.keyPrefix}${g}${p}`):v=s.keyPrefix?`${s.keyPrefix}${g}${i}`:i,o.t(v,s)};return typeof t=="string"?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=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=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(l,s)=>{const u=this.services.backendConnector.state[`${l}|${s}`];return u===-1||u===2};if(n.precheck){const l=n.precheck(this,i);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!o||i(a,t)))}loadNamespaces(t,n){const r=pl();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=pl();typeof t=="string"&&(t=[t]);const o=this.options.preload||[],a=t.filter(i=>o.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=o.concat(a),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["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=this.services&&this.services.languageUtils||new Ib(Mb());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new bs(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hc;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},a=new bs(o);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Ob(this.store.data,o),a.services.resourceStore=a.store),a.translator=new _u(a.services,o),a.translator.on("*",function(l){for(var s=arguments.length,u=new Array(s>1?s-1:0),d=1;d{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const _b=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,SD=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(t);let a=`${e}=${o}`;if(r.maxAge>0){const i=r.maxAge-0;if(Number.isNaN(i))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(i)}`}if(r.domain){if(!_b.test(r.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${r.domain}`}if(r.path){if(!_b.test(r.path))throw new TypeError("option path is invalid");a+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},Lb={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=SD(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const i=o.substring(1).split("&");for(let l=0;l0&&i[l].substring(0,s)===t&&(n=i[l].substring(s+1))}}return n}};let hl=null;const jb=()=>{if(hl!==null)return hl;try{hl=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{hl=!1}return hl};var wD={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&jb())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&jb()&&window.localStorage.setItem(n,e)}};let yl=null;const Fb=()=>{if(yl!==null)return yl;try{yl=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{yl=!1}return yl};var $D={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Fb())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Fb()&&window.sessionStorage.setItem(n,e)}},ED={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let a=0;a0?t:void 0}},OD={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},RD={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},ID={name:"subdomain",lookup(e){var o,a;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((a=(o=window.location)==null?void 0:o.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function PD(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class U${constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=bD(n,this.options||{},PD()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(CD),this.addDetector(xD),this.addDetector(wD),this.addDetector($D),this.addDetector(ED),this.addDetector(OD),this.addDetector(RD),this.addDetector(ID)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}U$.type="languageDetector";const ND={title:"基本设置",value:"液面高度",adapt:"是否自适应外框大小",adaptToSize:"适应大小",fixedSize:"固定大小",size:"球的大小"},MD={title:"外框设置",lineWidth:"外框宽度",transparent:"透明",filled:"填充",bgColor:"背景颜色",color:"外框颜色"},TD={title:"波浪设置",height:"波浪高度",foregroundWave:"前景波浪",waveSpeed:"波浪速度",smallFast:"越小越快",waveOffsetY:"波浪Y轴偏移",isWaveReverse:"反转波浪",left:"左移",right:"右移",isWaveGradient:"是否渐变",gradient:"渐变",single:"单色","Gradient-start":"开始颜色","Gradient-end":"结束颜色",color:"颜色",backgroundWave:"背景波浪",waveOffsetX:"波浪X轴偏移",bgWaveShow:"是否显示",show:"显示",hide:"隐藏"},_D={title:"导出设置",copy:"复制",example:"使用示例"},zb={BasicSettings:ND,CircleSettings:MD,WaveSettings:TD,Output:_D},LD={title:"Basic Settings",value:"Completion percentage",adapt:"Is adapt to size",adaptToSize:"Adapt",fixedSize:"Fix",size:"Size"},jD={title:"Outline settings",lineWidth:"Outline width",transparent:"Transparent",filled:"Filled",bgColor:"Background Color",color:"Outline color"},FD={title:"Wave Settings",height:"Wave height",foregroundWave:"Foreground Wave",waveSpeed:"Wave speed",smallFast:"The smaller, the faster",waveOffsetY:"Y-axis offset",isWaveReverse:"Reverse movement",left:"Shift left",right:"Shift right",isWaveGradient:"Gradient",gradient:"Gradient",single:"Monochrome","Gradient-start":"Gradient start color","Gradient-end":"Gradient end color",color:"Color",backgroundWave:"background Wave",waveOffsetX:"X-axis offset",bgWaveShow:"Visibility",show:"Display",hide:"Hide"},zD={title:"Output",copy:"Copy",example:"Example"},AD={BasicSettings:LD,CircleSettings:jD,WaveSettings:FD,Output:zD};Mn.use(U$).use(D5).init({debug:!0,fallbackLng:"zh",interpolation:{escapeValue:!1},resources:{en:{translation:AD},"zh-CN":{translation:zb},zh:{translation:zb}}});Zf.createRoot(document.getElementById("root")).render(we.jsx(V.StrictMode,{children:we.jsx(K5,{})})); diff --git a/index.html b/index.html index 089a182..e70494a 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Wave Progress Ball - SVG - +