@elementor/elementor-one-assets 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +159 -0
- package/index.cjs.js +2 -0
- package/index.d.ts +53 -0
- package/index.esm.js +2 -0
- package/locales/de/assets-whatsnew.json +169 -0
- package/locales/de/common.json +5 -0
- package/locales/de/send-feedback.json +23 -0
- package/locales/en/assets-whatsnew.json +169 -0
- package/locales/en/common.json +12 -0
- package/locales/en/send-feedback.json +23 -0
- package/locales/es/assets-whatsnew.json +169 -0
- package/locales/es/common.json +5 -0
- package/locales/es/send-feedback.json +23 -0
- package/locales/fr/assets-whatsnew.json +169 -0
- package/locales/fr/common.json +5 -0
- package/locales/fr/send-feedback.json +23 -0
- package/locales/he-IL/assets-whatsnew.json +169 -0
- package/locales/he-IL/common.json +5 -0
- package/locales/he-IL/send-feedback.json +23 -0
- package/locales/id-ID/assets-whatsnew.json +169 -0
- package/locales/id-ID/common.json +5 -0
- package/locales/id-ID/send-feedback.json +23 -0
- package/locales/it/assets-whatsnew.json +169 -0
- package/locales/it/common.json +5 -0
- package/locales/it/send-feedback.json +23 -0
- package/locales/nl/assets-whatsnew.json +169 -0
- package/locales/nl/common.json +5 -0
- package/locales/nl/send-feedback.json +23 -0
- package/locales/pl-PL/assets-whatsnew.json +169 -0
- package/locales/pl-PL/common.json +5 -0
- package/locales/pl-PL/send-feedback.json +23 -0
- package/locales/pt-PT/assets-whatsnew.json +169 -0
- package/locales/pt-PT/common.json +5 -0
- package/locales/pt-PT/send-feedback.json +23 -0
- package/locales/tr-TR/assets-whatsnew.json +169 -0
- package/locales/tr-TR/common.json +5 -0
- package/locales/tr-TR/send-feedback.json +23 -0
- package/package.json +50 -0
package/README.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# @elementor/elementor-one-assets
|
|
2
|
+
|
|
3
|
+
A publishable npm package containing shared UI components and utilities for Elementor projects.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @elementor/elementor-one-assets
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Required Dependencies
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install react react-dom @elementor/ui @elementor/icons
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Optional Dependencies
|
|
18
|
+
|
|
19
|
+
Install based on features you use:
|
|
20
|
+
|
|
21
|
+
| Dependency | Required for |
|
|
22
|
+
| ---------------------------------- | ------------------------------------------ |
|
|
23
|
+
| `react-redux` + `@reduxjs/toolkit` | Redux state management |
|
|
24
|
+
| `react-router-dom` | Routing features |
|
|
25
|
+
| `axios` | HTTP requests |
|
|
26
|
+
| `react-hook-form` | Form components (e.g., SendFeedbackDialog) |
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Example: Install all optional deps
|
|
30
|
+
npm install react-redux @reduxjs/toolkit react-router-dom axios react-hook-form
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Quick Start (Development)
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Build the package
|
|
39
|
+
npx nx build elementor-one-assets
|
|
40
|
+
|
|
41
|
+
# Run tests
|
|
42
|
+
npx nx test elementor-one-assets
|
|
43
|
+
|
|
44
|
+
# Lint
|
|
45
|
+
npx nx lint elementor-one-assets
|
|
46
|
+
|
|
47
|
+
#Test build
|
|
48
|
+
npx nx test-build elementor-one-assets
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Local Development
|
|
54
|
+
|
|
55
|
+
> **Note:** This local development workflow only works within the **elementor-acd-workspace** monorepo. For external projects, you must install the published package from npm.
|
|
56
|
+
|
|
57
|
+
Local development is designed for **instant hot reload** without any build steps. You just need to install the package:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm install ./dist/packages/elementor-one-assets
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### How It Works
|
|
64
|
+
|
|
65
|
+
When running locally (`NX_PUBLIC_LOCAL=true`), rspack resolves imports from `@elementor/elementor-one-assets` directly to the **source files** instead of `node_modules`. This means:
|
|
66
|
+
|
|
67
|
+
- ✅ **No build step required** - just edit and save
|
|
68
|
+
- ✅ **True hot module replacement** - changes appear instantly
|
|
69
|
+
- ✅ **Same experience as workspace libs** - feels like editing any other library
|
|
70
|
+
|
|
71
|
+
This works via a **path alias** in `global.rspack.config.ts`:
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
resolve: {
|
|
75
|
+
alias: isLocalDev
|
|
76
|
+
? { '@elementor/elementor-one-assets': packageSourcePath }
|
|
77
|
+
: {},
|
|
78
|
+
},
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
This code is commented out since we want to use the published version. When working on the package itself uncomment this part.
|
|
82
|
+
|
|
83
|
+
## Testing the Built Package
|
|
84
|
+
|
|
85
|
+
Before publishing, verify that the rollup-bundled package works correctly.
|
|
86
|
+
|
|
87
|
+
### Why Test the Build?
|
|
88
|
+
|
|
89
|
+
Local development uses **rspack** to compile source files directly, but the published package uses **rollup**. Testing ensures both produce the same result.
|
|
90
|
+
|
|
91
|
+
### Quick Build Test
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
npx nx test-build elementor-one-assets
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
This will:
|
|
98
|
+
|
|
99
|
+
1. Build the package with rollup
|
|
100
|
+
2. Verify the bundle loads correctly
|
|
101
|
+
3. Print the exported modules
|
|
102
|
+
|
|
103
|
+
### Full Integration Test
|
|
104
|
+
|
|
105
|
+
To test the actual installed package (from `node_modules`) in a running app:
|
|
106
|
+
|
|
107
|
+
**Step 1:** Comment out the alias in `global.rspack.config.ts`
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
resolve: {
|
|
111
|
+
// Temporarily comment out for testing
|
|
112
|
+
// alias: isLocalDev
|
|
113
|
+
// ? { '@elementor/elementor-one-assets': packageSourcePath }
|
|
114
|
+
// : {},
|
|
115
|
+
},
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Step 2:** If testing unpublished changes, build and install from dist
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Build the package
|
|
122
|
+
npx nx build elementor-one-assets
|
|
123
|
+
|
|
124
|
+
# Install from local dist
|
|
125
|
+
npm install ./dist/packages/elementor-one-assets
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Step 3:** Run and test the app
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
npx nx serve acd-client:locally
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Step 4:** After testing, revert your changes
|
|
135
|
+
|
|
136
|
+
1. Uncomment the alias in `global.rspack.config.ts`
|
|
137
|
+
2. Revert `package.json` and `package-lock.json`:
|
|
138
|
+
|
|
139
|
+
### Checklist Before Publishing
|
|
140
|
+
|
|
141
|
+
- [ ] `npx nx lint elementor-one-assets` passes
|
|
142
|
+
- [ ] `npx nx test elementor-one-assets` passes
|
|
143
|
+
- [ ] `npx nx test-build elementor-one-assets` passes
|
|
144
|
+
- [ ] Tested installed version from dist
|
|
145
|
+
- [ ] Version bumped appropriately
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Publishing
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# Dry run first
|
|
153
|
+
npx nx release --group=elementor-one-assets --dry-run
|
|
154
|
+
|
|
155
|
+
# Release (patch/minor/major)
|
|
156
|
+
npx nx release --group=elementor-one-assets patch
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
package/index.cjs.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@elementor/ui/AppBar"),r=require("@elementor/ui/Stack"),n=require("@elementor/ui/Toolbar"),s=require("@elementor/ui/Typography"),i=require("@elementor/ui/IconButton"),o=require("@elementor/icons/BulbIcon"),a=require("@elementor/icons/HelpIcon"),l=require("@elementor/ui/Divider"),c=require("@elementor/icons/UserIcon"),u=require("@elementor/ui/Button"),h=require("@elementor/ui/CircularProgress"),d=require("@elementor/ui/usePopupState"),p=require("@elementor/ui/Menu"),f=require("@elementor/ui/MenuItem"),g=require("@elementor/ui/ListItemIcon"),m=require("@elementor/ui/ListItemText"),y=require("@elementor/icons/LogoutIcon"),b=require("@reduxjs/toolkit"),v=require("react"),S=require("react-redux"),E=require("@elementor/ui/Avatar"),x=require("@elementor/ui/DirectionProvider"),_=require("@elementor/ui/styles"),w=require("@elementor/icons/SpeakerphoneIcon"),A=require("@elementor/ui/Drawer"),P=require("@elementor/ui/Box"),L=require("@elementor/ui/Chip"),O=require("@elementor/icons/XIcon"),T=require("@elementor/ui/Badge"),k=require("@elementor/ui/Dialog"),C=require("@elementor/ui/DialogContent"),I=require("@elementor/ui/DialogActions"),N=require("@elementor/ui/DialogTitle"),R=require("@elementor/ui/FormControl"),H=require("@elementor/ui/TextField"),B=require("@elementor/ui/DialogHeader"),F=require("@elementor/ui/Autocomplete"),j=require("@elementor/ui/Alert"),D=require("@elementor/ui/AlertAction"),U=require("@elementor/ui/SvgIcon"),M=v.forwardRef(((t,r)=>e.jsx(U,{viewBox:"0 0 25 24",...t,ref:r,children:e.jsx("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M12.1207 0C5.42401 0 0 5.37 0 12C0 18.63 5.42401 24 12.1207 24C18.8174 24 24.2414 18.63 24.2414 12C24.2414 5.37 18.8174 0 12.1207 0ZM8.48448 18H6.06034V6H8.48448V18ZM18.181 18H10.9086V15.6H18.181V18ZM18.181 13.2H10.9086V10.8H18.181V13.2ZM18.181 8.4H10.9086V6H18.181V8.4Z",fill:"currentColor"})})}))),V={};function G(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];K(t[0])&&V[t[0]]||(K(t[0])&&(V[t[0]]=new Date),function(){if(console&&console.warn){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];K(t[0])&&(t[0]="react-i18next:: "+t[0]),console.warn(...t)}}(...t))}const $=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout((()=>{e.off("initialized",r)}),0),t()};e.on("initialized",r)}},q=(e,t,r)=>{e.loadNamespaces(t,$(e,r))},z=(e,t,r,n)=>{K(r)&&(r=[r]),r.forEach((t=>{0>e.options.ns.indexOf(t)&&e.options.ns.push(t)})),e.loadLanguages(t,$(e,n))},K=e=>"string"==typeof e,X=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,W={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},J=e=>W[e];let Y,Z={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(X,J)};const Q={type:"3rdParty",init(e){!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Z={...Z,...e}}(e.options.react),(e=>{Y=e})(e)}},ee=v.createContext();class te{addUsedNamespaces(e){e.forEach((e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)}))}constructor(){this.getUsedNamespaces=()=>Object.keys(this.usedNamespaces),this.usedNamespaces={}}}const re=(e,t,r,n)=>e.getFixedT(t,r,n),ne=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{i18n:r}=t,{i18n:n,defaultNS:s}=v.useContext(ee)||{},i=r||n||Y;if(i&&!i.reportNamespaces&&(i.reportNamespaces=new te),!i){G("You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>{return K(t)?t:"object"==typeof(r=t)&&null!==r&&K(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e;var r},t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}i.options.react&&void 0!==i.options.react.wait&&G("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...Z,...i.options.react,...t},{useSuspense:a,keyPrefix:l}=o;let c=e||s||i.options&&i.options.defaultNS;c=K(c)?[c]:c||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(c);const u=(i.isInitialized||i.initializedStoreOnce)&&c.every((e=>function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{lng:r.lng,precheck:(t,n)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!n(t.isLanguageChangingTo,e))return!1}}):function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=t.languages[0],s=!!t.options&&t.options.fallbackLng,i=t.languages[t.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,r)=>{const n=t.services.backendConnector.state[`${e}|${r}`];return-1===n||2===n};return!(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)||!t.hasResourceBundle(n,e)&&t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages)&&(!o(n,e)||s&&!o(i,e)))}(e,t,r):(G("i18n.languages were undefined or empty",t.languages),!0)}(e,i,o))),h=((e,t,r,n)=>v.useCallback(re(e,t,r,n),[e,t,r,n]))(i,t.lng||null,"fallback"===o.nsMode?c:c[0],l),d=()=>h,p=()=>re(i,t.lng||null,"fallback"===o.nsMode?c:c[0],l),[f,g]=v.useState(d);let m=c.join();t.lng&&(m=`${t.lng}${m}`);const y=(e=>{const t=v.useRef();return v.useEffect((()=>{t.current=e}),[e,void 0]),t.current})(m),b=v.useRef(!0);v.useEffect((()=>{const{bindI18n:e,bindI18nStore:r}=o;b.current=!0,u||a||(t.lng?z(i,t.lng,c,(()=>{b.current&&g(p)})):q(i,c,(()=>{b.current&&g(p)}))),u&&y&&y!==m&&b.current&&g(p);const n=()=>{b.current&&g(p)};return e&&i&&i.on(e,n),r&&i&&i.store.on(r,n),()=>{b.current=!1,e&&i&&e.split(" ").forEach((e=>i.off(e,n))),r&&i&&r.split(" ").forEach((e=>i.store.off(e,n)))}}),[i,m]),v.useEffect((()=>{b.current&&u&&g(d)}),[i,l,u]);const S=[f,i,u];if(S.t=f,S.i18n=i,S.ready=u,u)return S;if(!u&&!a)return S;throw new Promise((e=>{t.lng?z(i,t.lng,c,(()=>e())):q(i,c,(()=>e()))}))},se={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 ie{init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||se,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ie(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new ie(this.logger,e)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}}var oe=new ie;class ae{on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const r=this.observers[e].get(t)||0;this.observers[e].set(t,r+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];this.observers[e]&&Array.from(this.observers[e].entries()).forEach((e=>{let[t,n]=e;for(let e=0;n>e;e++)t(...r)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((t=>{let[n,s]=t;for(let t=0;s>t;t++)n.call(n,e,...r)}))}constructor(){this.observers={}}}const le=()=>{let e,t;const r=new Promise(((r,n)=>{e=r,t=n}));return r.resolve=e,r.reject=t,r},ce=e=>null==e?"":""+e,ue=/###/g,he=e=>e&&e.indexOf("###")>-1?e.replace(ue,"."):e,de=e=>!e||"string"==typeof e,pe=(e,t,r)=>{const n="string"!=typeof t?t:t.split(".");let s=0;for(;s<n.length-1;){if(de(e))return{};const t=he(n[s]);!e[t]&&r&&(e[t]=new r),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++s}return de(e)?{}:{obj:e,k:he(n[s])}},fe=(e,t,r)=>{const{obj:n,k:s}=pe(e,t,Object);if(void 0!==n||1===t.length)return void(n[s]=r);let i=t[t.length-1],o=t.slice(0,t.length-1),a=pe(e,o,Object);for(;void 0===a.obj&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=pe(e,o,Object),a&&a.obj&&void 0!==a.obj[`${a.k}.${i}`]&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=r},ge=(e,t)=>{const{obj:r,k:n}=pe(e,t);if(r)return r[n]},me=(e,t,r)=>{for(const n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):me(e[n],t[n],r):e[n]=t[n]);return e},ye=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var be={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const ve=e=>"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>be[e])):e,Se=[" ",",","?","!",";"],Ee=new class{getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const r=RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}}(20),xe=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(r);let s=e;for(let e=0;e<n.length;){if(!s||"object"!=typeof s)return;let t,i="";for(let o=e;o<n.length;++o)if(o!==e&&(i+=r),i+=n[o],t=s[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&o<n.length-1)continue;e+=o-e+1;break}s=t}return s},_e=e=>e&&e.indexOf("_")>0?e.replace("_","-"):e;class we extends ae{addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const s=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],r&&(Array.isArray(r)?o.push(...r):"string"==typeof r&&s?o.push(...r.split(s)):o.push(r)));const a=ge(this.data,o);return a||t||r||-1>=e.indexOf(".")||(e=o[0],t=o[1],r=o.slice(2).join(".")),a||!i||"string"!=typeof r?a:xe(this.data&&this.data[e]&&this.data[e][t],r,s)}addResource(e,t,r,n){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator;let o=[e,t];r&&(o=o.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(o=e.split("."),n=t,t=o[1]),this.addNamespaces(t),fe(this.data,o,n),s.silent||this.emit("added",e,t,r,n)}addResources(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const n in r)("string"==typeof r[n]||Array.isArray(r[n]))&&this.addResource(e,t,n,r[n],{silent:!0});n.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,n,s){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),n=r,r=t,t=o[1]),this.addNamespaces(t);let a=ge(this.data,o)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),n?me(a,r,s):a={...a,...r},fe(this.data,o,a),i.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}}var Ae={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,s){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,r,n,s))})),t}};const Pe={};class Le extends ae{changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const r=this.resolve(e,t);return r&&void 0!==r.res}extractFromKey(e,t){let r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");const n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let s=t.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,o=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,r)=>{t=t||"",r=r||"";const n=Se.filter((e=>0>t.indexOf(e)&&0>r.indexOf(e)));if(0===n.length)return!0;const s=Ee.getRegExp(`(${n.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!s.test(e);if(!i){const t=e.indexOf(r);t>0&&!s.test(e.substring(0,t))&&(i=!0)}return i})(e,r,n));if(i&&!o){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:s};const i=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(i[0])>-1)&&(s=i.shift()),e=i.join(n)}return"string"==typeof s&&(s=[s]),{key:e,namespaces:s}}translate(e,t,r){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[e+""]);const n=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:o}=this.extractFromKey(e[e.length-1],t),a=o[o.length-1],l=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(c){const e=t.nsSeparator||this.options.nsSeparator;return n?{res:`${a}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:`${a}${e}${i}`}return n?{res:i,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:i}const u=this.resolve(e,t);let h=u&&u.res;const d=u&&u.usedKey||i,p=u&&u.exactUsedKey||i,f=Object.prototype.toString.apply(h),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&h&&"string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(f)&&("string"!=typeof g||!Array.isArray(h))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,h,{...t,ns:o}):`key '${i} (${this.language})' returned an object instead of string.`;return n?(u.res=e,u.usedParams=this.getUsedParamsDetails(t),u):e}if(s){const e=Array.isArray(h),r=e?[]:{},n=e?p:d;for(const e in h)if(Object.prototype.hasOwnProperty.call(h,e)){const i=`${n}${s}${e}`;r[e]=this.translate(i,{...t,joinArrays:!1,ns:o}),r[e]===i&&(r[e]=h[e])}h=r}}else if(m&&"string"==typeof g&&Array.isArray(h))h=h.join(g),h&&(h=this.extendTranslation(h,e,t,r));else{let n=!1,o=!1;const c=void 0!==t.count&&"string"!=typeof t.count,d=Le.hasDefaultValue(t),p=c?this.pluralResolver.getSuffix(l,t.count,t):"",f=t.ordinal&&c?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",g=c&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),m=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t["defaultValue"+p]||t["defaultValue"+f]||t.defaultValue;!this.isValidLookup(h)&&d&&(n=!0,h=m),this.isValidLookup(h)||(o=!0,h=i);const y=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:h,b=d&&m!==h&&this.options.updateMissing;if(o||n||b){if(this.logger.log(b?"updateKey":"missingKey",l,a,i,b?m:h),s){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const r=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&r&&r[0])for(let t=0;t<r.length;t++)e.push(r[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const n=(e,r,n)=>{const s=d&&n!==h?n:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,a,r,s,b,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,a,r,s,b,t),this.emit("missingKey",e,a,r,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?e.forEach((e=>{const r=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&0>r.indexOf(this.options.pluralSeparator+"zero")&&r.push(this.options.pluralSeparator+"zero"),r.forEach((r=>{n([e],i+r,t["defaultValue"+r]||m)}))})):n(e,i,m))}h=this.extendTranslation(h,e,t,u,r),o&&h===i&&this.options.appendNamespaceToMissingKey&&(h=`${a}:${i}`),(o||n)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${i}`:i,n?h:void 0):this.options.parseMissingKeyHandler(h))}return n?(u.res=h,u.usedParams=this.getUsedParamsDetails(t),u):h}extendTranslation(e,t,r,n,s){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const o="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(o){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let l=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,r.lng||this.language||n.usedLng,r),o){const t=e.match(this.interpolator.nestingRegexp);(t&&t.length)>a&&(r.nest=!1)}!r.lng&&"v1"!==this.options.compatibilityAPI&&n&&n.res&&(r.lng=this.language||n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return s&&s[0]===n[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${n[0]} in key: ${t[0]}`),null):i.translate(...n,t)}),r)),r.interpolation&&this.interpolator.reset()}const o=r.postProcess||this.options.postProcess,a="string"==typeof o?[o]:o;return null!=e&&a&&a.length&&!1!==r.applyPostProcessor&&(e=Ae.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let t,r,n,s,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const a=this.extractFromKey(e,o),l=a.key;r=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==o.count&&"string"!=typeof o.count,h=u&&!o.ordinal&&0===o.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==o.context&&("string"==typeof o.context||"number"==typeof o.context)&&""!==o.context,p=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);c.forEach((e=>{this.isValidLookup(t)||(i=e,!Pe[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(Pe[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" 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!!!")),p.forEach((r=>{if(this.isValidLookup(t))return;s=r;const i=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,l,r,e,o);else{let e;u&&(e=this.pluralResolver.getSuffix(r,o.count,o));const t=this.options.pluralSeparator+"zero",n=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(i.push(l+e),o.ordinal&&0===e.indexOf(n)&&i.push(l+e.replace(n,this.options.pluralSeparator)),h&&i.push(l+t)),d){const r=`${l}${this.options.contextSeparator}${o.context}`;i.push(r),u&&(i.push(r+e),o.ordinal&&0===e.indexOf(n)&&i.push(r+e.replace(n,this.options.pluralSeparator)),h&&i.push(r+t))}}let a;for(;a=i.pop();)this.isValidLookup(t)||(n=a,t=this.getResource(r,e,a,o))})))}))})),{res:t,usedKey:r,exactUsedKey:n,usedLng:s,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&"string"!=typeof e.replace;let n=r?e.replace:e;if(r&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!r){n={...n};for(const e of t)delete n[e]}return n}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,n;super(),r=e,n=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((e=>{r[e]&&(n[e]=r[e])})),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=oe.create("translator")}}const Oe=e=>e.charAt(0).toUpperCase()+e.slice(1);class Te{getScriptPartFromCode(e){if(!(e=_e(e))||0>e.indexOf("-"))return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=_e(e))||0>e.indexOf("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map((e=>e.toLowerCase())):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=Oe(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=Oe(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=Oe(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const r=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(r)||(t=r)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find((e=>e===r?e:0>e.indexOf("-")&&0>r.indexOf("-")?void 0:e.indexOf("-")>0&&0>r.indexOf("-")&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),n=[],s=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn("rejecting language code not found in supportedLngs: "+e))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(e))):"string"==typeof e&&s(this.formatLanguageCode(e)),r.forEach((e=>{0>n.indexOf(e)&&s(this.formatLanguageCode(e))})),n}constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=oe.create("languageUtils")}}let ke=[{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}],Ce={1:e=>+(e>1),2:e=>+(1!=e),3:e=>0,4:e=>+(e%10==1&&e%100!=11?0:2>e%10||e%10>4||e%100>=10&&20>e%100?2:1),5:e=>+(0==e?0:1==e?1:2==e?2:3>e%100||e%100>10?11>e%100?5:4:3),6:e=>+(1==e?0:2>e||e>4?2:1),7:e=>+(1==e?0:2>e%10||e%10>4||e%100>=10&&20>e%100?2:1),8:e=>+(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>+(e>=2),10:e=>+(1==e?0:2==e?1:7>e?2:11>e?3:4),11:e=>+(1==e||11==e?0:2==e||12==e?1:e>2&&20>e?2:3),12:e=>+(e%10!=1||e%100==11),13:e=>+(0!==e),14:e=>+(1==e?0:2==e?1:3==e?2:3),15:e=>+(e%10==1&&e%100!=11?0:2>e%10||e%100>=10&&20>e%100?2:1),16:e=>+(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>+(1==e||e%10==1&&e%100!=11?0:1),18:e=>+(0==e?0:1==e?1:2),19:e=>+(1==e?0:0==e||e%100>1&&11>e%100?1:e%100>10&&20>e%100?2:3),20:e=>+(1==e?0:0==e||e%100>0&&20>e%100?1:2),21:e=>+(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>+(1==e?0:2==e?1:(0>e||e>10)&&e%10==0?2:3)};const Ie=["v1","v2","v3"],Ne=["v4"],Re={zero:0,one:1,two:2,few:3,many:4,other:5};class He{addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=_e("dev"===e?"en":e),n=t.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:n});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];const i=new Intl.PluralRules(r,{type:n});return this.pluralRulesCache[s]=i,i}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=this.getRule(e,t);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort(((e,t)=>Re[e]-Re[t])).map((e=>`${this.options.prepend}${t.ordinal?"ordinal"+this.options.prepend:""}${e}`)):r.numbers.map((r=>this.getSuffix(e,r,t))):[]}getSuffix(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.getRule(e,r);return n?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?"ordinal"+this.options.prepend:""}${n.select(t)}`:this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: "+e),"")}getSuffixRetroCompatible(e,t){const r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let n=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===n?n="plural":1===n&&(n=""));const s=()=>this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString();return"v1"===this.options.compatibilityJSON?1===n?"":"number"==typeof n?"_plural_"+n.toString():s():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?s():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!Ie.includes(this.options.compatibilityJSON)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=oe.create("pluralResolver"),this.options.compatibilityJSON&&!Ne.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&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=(()=>{const e={};return ke.forEach((t=>{t.lngs.forEach((r=>{e[r]={numbers:t.nr,plurals:Ce[t.fc]}}))})),e})(),this.pluralRulesCache={}}}const Be=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",s=4>=arguments.length||void 0===arguments[4]||arguments[4],i=((e,t,r)=>{const n=ge(e,r);return void 0!==n?n:ge(t,r)})(e,t,r);return!i&&s&&"string"==typeof r&&(i=xe(e,r,n),void 0===i&&(i=xe(t,r,n))),i},Fe=e=>e.replace(/\$/g,"$$$$");class je{init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:n,prefix:s,prefixEscaped:i,suffix:o,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:h,nestingPrefixEscaped:d,nestingSuffix:p,nestingSuffixEscaped:f,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:ve,this.escapeValue=void 0===r||r,this.useRawValueToEscape=void 0!==n&&n,this.prefix=s?ye(s):i||"{{",this.suffix=o?ye(o):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?ye(h):d||ye("$t("),this.nestingSuffix=p?ye(p):f||ye(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,r,n){let s,i,o;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(0>e.indexOf(this.formatSeparator)){const s=Be(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(s,void 0,r,{...n,...t,interpolationkey:e}):s}const s=e.split(this.formatSeparator),i=s.shift().trim(),o=s.join(this.formatSeparator).trim();return this.format(Be(t,a,i,this.options.keySeparator,this.options.ignoreJSONStructure),o,r,{...n,...t,interpolationkey:i})};this.resetRegExp();const c=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,u=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Fe(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Fe(this.escape(e)):Fe(e)}].forEach((t=>{for(o=0;s=t.regex.exec(e);){const r=s[1].trim();if(i=l(r),void 0===i)if("function"==typeof c){const t=c(e,s,n);i="string"==typeof t?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))i="";else{if(u){i=s[0];continue}this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=ce(i));const a=t.safeValue(i);if(e=e.replace(s[0],a),u?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=s[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}})),e}nest(e,t){let r,n,s,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=(e,t)=>{const r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;const n=e.split(RegExp(r+"[ ]*{"));let i="{"+n[1];e=n[0],i=this.interpolate(i,s);const o=i.match(/'/g),a=i.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(i=i.replace(/'/g,'"'));try{s=JSON.parse(i),t&&(s={...t,...s})}catch(t){return this.logger.warn("failed parsing options string in nesting for key "+e,t),`${e}${r}${i}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let a=[];s={...i},s=s.replace&&"string"!=typeof s.replace?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let l=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){const e=r[1].split(this.formatSeparator).map((e=>e.trim()));r[1]=e.shift(),a=e,l=!0}if(n=t(o.call(this,r[1].trim(),s),s),n&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=ce(n)),n||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),n=""),l&&(n=a.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:r[1].trim()})),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=oe.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}}const De=e=>{const t={};return(r,n,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const o=n+JSON.stringify(i);let a=t[o];return a||(a=e(_e(n),s),t[o]=a),a(r)}};class Ue{init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=De(t)}format(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const s=t.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&0>s[0].indexOf(")")&&s.find((e=>e.indexOf(")")>-1))){const e=s.findIndex((e=>e.indexOf(")")>-1));s[0]=[s[0],...s.splice(1,e)].join(this.formatSeparator)}return s.reduce(((e,t)=>{const{formatName:s,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const s=n[1].substring(0,n[1].length-1);"currency"===t&&0>s.indexOf(":")?r.currency||(r.currency=s.trim()):"relativetime"===t&&0>s.indexOf(":")?r.range||(r.range=s.trim()):s.split(";").forEach((e=>{if(e){const[t,...n]=e.split(":"),s=n.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();r[i]||(r[i]=s),"false"===s&&(r[i]=!1),"true"===s&&(r[i]=!0),isNaN(s)||(r[i]=parseInt(s,10))}}))}return{formatName:t,formatOptions:r}})(t);if(this.formats[s]){let t=e;try{const o=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},a=o.locale||o.lng||n.locale||n.lng||r;t=this.formats[s](e,a,{...i,...n,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn("there was no format function for "+s),e}),e)}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=oe.create("formatter"),this.options=e,this.formats={number:De(((e,t)=>{const r=new Intl.NumberFormat(e,{...t});return e=>r.format(e)})),currency:De(((e,t)=>{const r=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>r.format(e)})),datetime:De(((e,t)=>{const r=new Intl.DateTimeFormat(e,{...t});return e=>r.format(e)})),relativetime:De(((e,t)=>{const r=new Intl.RelativeTimeFormat(e,{...t});return e=>r.format(e,t.range||"day")})),list:De(((e,t)=>{const r=new Intl.ListFormat(e,{...t});return e=>r.format(e)}))},this.init(e)}}class Me extends ae{queueLoad(e,t,r,n){const s={},i={},o={},a={};return e.forEach((e=>{let n=!0;t.forEach((t=>{const o=`${e}|${t}`;!r.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:0>this.state[o]||(1===this.state[o]?void 0===i[o]&&(i[o]=!0):(this.state[o]=1,n=!1,void 0===i[o]&&(i[o]=!0),void 0===s[o]&&(s[o]=!0),void 0===a[t]&&(a[t]=!0)))})),n||(o[e]=!0)})),(Object.keys(s).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(s),pending:Object.keys(i),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(e,t,r){const n=e.split("|"),s=n[0],i=n[1];t&&this.emit("failedLoading",s,i,t),!t&&r&&this.store.addResourceBundle(s,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const o={};this.queue.forEach((r=>{((e,t,r)=>{const{obj:n,k:s}=pe(e,t,Object);n[s]=n[s]||[],n[s].push(r)})(r.loaded,[s],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(r,e),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach((e=>{o[e]||(o[e]={});const t=r.loaded[e];t.length&&t.forEach((t=>{void 0===o[e][t]&&(o[e][t]=!0)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",o),this.queue=this.queue.filter((e=>!e.done))}read(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:n,wait:s,callback:i});this.readingCalls++;const o=(o,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}o&&a&&n<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,r,n+1,2*s,i)}),s):i(o,a)},a=this.backend[r].bind(this.backend);if(2!==a.length)return a(e,t,o);try{const r=a(e,t);r&&"function"==typeof r.then?r.then((e=>o(null,e))).catch(o):o(null,r)}catch(e){o(e)}}prepareLoading(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=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."),n&&n();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const s=this.queueLoad(e,t,r,n);if(!s.toLoad.length)return s.pending.length||n(),null;s.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=e.split("|"),n=r[0],s=r[1];this.read(n,s,"read",void 0,void 0,((r,i)=>{r&&this.logger.warn(`${t}loading namespace ${s} for language ${n} failed`,r),!r&&i&&this.logger.log(`${t}loaded namespace ${s} for language ${n}`,i),this.loaded(e,r,i)}))}saveMissing(e,t,r,n,s){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=r&&""!==r){if(this.backend&&this.backend.create){const a={...i,isUpdate:s},l=this.backend.create.bind(this.backend);if(6>l.length)try{let s;s=5===l.length?l(e,t,r,n,a):l(e,t,r,n),s&&"function"==typeof s.then?s.then((e=>o(null,e))).catch(o):o(null,s)}catch(e){o(e)}else l(e,t,r,n,o,a)}e&&e[0]&&this.store.addResource(e[0],t,r,n)}}constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=n,this.logger=oe.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=0>n.maxRetries?5:n.maxRetries,this.retryTimeout=1>n.retryTimeout?350:n.retryTimeout,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,n.backend,n)}}const Ve=()=>({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:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const r=e[3]||e[2];Object.keys(r).forEach((e=>{t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Ge=e=>("string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),$e=()=>{};class qe extends ae{init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));const n=Ve();this.options={...n,...this.options,...Ge(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...n.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const s=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?oe.init(s(this.modules.logger),this.options):oe.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=Ue);const r=new Te(this.options);this.store=new we(this.options.resources,this.options);const i=this.services;i.logger=oe,i.resourceStore=this.store,i.languageUtils=r,i.pluralResolver=new He(r,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(i.formatter=s(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new je(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Me(s(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),s=1;r>s;s++)n[s-1]=arguments[s];e.emit(t,...n)})),this.modules.languageDetector&&(i.languageDetector=s(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=s(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Le(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),s=1;r>s;s++)n[s-1]=arguments[s];e.emit(t,...n)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,r||(r=$e),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=le(),o=()=>{const e=(e,t)=>{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),i.resolve(t),r(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?o():setTimeout(o,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$e;const r="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],n=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)}))};r?n(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>n(e))),this.options.preload&&this.options.preload.forEach((e=>n(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,r){const n=le();return"function"==typeof e&&(r=e,e=void 0),"function"==typeof t&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=$e),this.services.backendConnector.reload(e,t,(e=>{n.resolve(),r(e)})),n}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Ae.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&-1>=["cimode","dev"].indexOf(e))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(-1>=["cimode","dev"].indexOf(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var r=this;this.isLanguageChangingTo=e;const n=le();this.emit("languageChanging",e);const s=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(s(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,n.resolve((function(){return r.t(...arguments)})),t&&t(e,(function(){return r.t(...arguments)}))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const r="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);r&&(this.language||s(r),this.translator.language||this.translator.changeLanguage(r),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(r)),this.loadResources(r,(e=>{i(e,r)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,r){var n=this;const s=function(e,t){let i;if("object"!=typeof t){for(var o=arguments.length,a=Array(o>2?o-2:0),l=2;o>l;l++)a[l-2]=arguments[l];i=n.options.overloadTranslationOptionHandler([e,t].concat(a))}else i={...t};i.lng=i.lng||s.lng,i.lngs=i.lngs||s.lngs,i.ns=i.ns||s.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||r||s.keyPrefix);const c=n.options.keySeparator||".";let u;return u=i.keyPrefix&&Array.isArray(e)?e.map((e=>`${i.keyPrefix}${c}${e}`)):i.keyPrefix?`${i.keyPrefix}${c}${e}`:e,n.t(u,i)};return"string"==typeof e?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=r,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;const i=(e,t)=>{const r=this.services.backendConnector.state[`${e}|${t}`];return-1===r||0===r||2===r};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!(!this.hasResourceBundle(r,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!i(r,e)||n&&!i(s,e)))}loadNamespaces(e,t){const r=le();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)})),this.loadResources((e=>{r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=le();"string"==typeof e&&(e=[e]);const n=this.options.preload||[],s=e.filter((e=>0>n.indexOf(e)&&this.services.languageUtils.isSupportedCode(e)));return s.length?(this.options.preload=n.concat(s),this.loadResources((e=>{r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new Te(Ve());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new qe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$e;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},s=new qe(n);return void 0===e.debug&&void 0===e.prefix||(s.logger=s.logger.clone(e)),["store","services","language"].forEach((e=>{s[e]=this[e]})),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r&&(s.store=new we(this.store.data,n),s.services.resourceStore=s.store),s.translator=new Le(s.services,n),s.translator.on("*",(function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];s.emit(e,...r)})),s.init(n,t),s.translator.options=n,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var r;if(super(),this.options=Ge(e),this.services={},this.logger=oe,this.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(r=this)).forEach((e=>{"function"==typeof r[e]&&(r[e]=r[e].bind(r))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}}const ze=qe.createInstance();function Ke(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function s(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(s())return{};var o=n(i.shift());!e[o]&&r&&(e[o]=new r),e=e[o]}return s()?{}:{obj:e,k:n(i.shift())}}ze.createInstance=qe.createInstance;var Xe=[],We=Xe.forEach,Je=Xe.slice,Ye=function(e,t){return Ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Ye(e,t)};function Ze(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+t+" is not a constructor or null");function r(){this.constructor=e}Ye(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var Qe,et,tt,rt=function(){return rt=Object.assign||function(e){for(var t,r=1,n=arguments.length;n>r;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},rt.apply(this,arguments)};function nt(e,t,r){if(r||2===arguments.length)for(var n,s=0,i=t.length;i>s;s++)!n&&s in t||(n||(n=Array.prototype.slice.call(t,0,s)),n[s]=t[s]);return e.concat(n||Array.prototype.slice.call(t))}function st(e){return e.type===et.literal}function it(e){return e.type===et.argument}function ot(e){return e.type===et.number}function at(e){return e.type===et.date}function lt(e){return e.type===et.time}function ct(e){return e.type===et.select}function ut(e){return e.type===et.plural}function ht(e){return e.type===et.pound}function dt(e){return e.type===et.tag}function pt(e){return!(!e||"object"!=typeof e||e.type!==tt.number)}function ft(e){return!(!e||"object"!=typeof e||e.type!==tt.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(Qe||(Qe={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(et||(et={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(tt||(tt={}));var gt=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,mt=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function yt(e){var t={};return e.replace(mt,(function(e){var r=e.length;switch(e[0]){case"G":t.era=4===r?"long":5===r?"narrow":"short";break;case"y":t.year=2===r?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===r?"long":5===r?"narrow":"short";break;case"e":if(4>r)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(4>r)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=4>r?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var bt=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,vt=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,St=/^(@+)?(\+|#+)?[rs]?$/g,Et=/(\*)(0+)|(#+)(0+)|(0+)/g,xt=/^(0+)$/;function _t(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(St,(function(e,r,n){return"string"!=typeof n?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):"+"===n?t.minimumSignificantDigits=r.length:"#"===r[0]?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""})),t}function wt(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function At(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if("+!"===r?(t.signDisplay="always",e=e.slice(2)):"+?"===r&&(t.signDisplay="exceptZero",e=e.slice(2)),!xt.test(e))throw Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Pt(e){return wt(e)||{}}function Lt(e){for(var t={},r=0,n=e;r<n.length;r++){var s=n[r];switch(s.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=s.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=s.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=rt(rt(rt({},t),{notation:"scientific"}),s.options.reduce((function(e,t){return rt(rt({},e),Pt(t))}),{}));continue;case"engineering":t=rt(rt(rt({},t),{notation:"engineering"}),s.options.reduce((function(e,t){return rt(rt({},e),Pt(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(s.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(s.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");s.options[0].replace(Et,(function(e,r,n,s,i,o){if(r)t.minimumIntegerDigits=n.length;else{if(s&&i)throw Error("We currently do not support maximum integer digits");if(o)throw Error("We currently do not support exact integer digits")}return""}));continue}if(xt.test(s.stem))t.minimumIntegerDigits=s.stem.length;else if(vt.test(s.stem)){if(s.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");s.stem.replace(vt,(function(e,r,n,s,i,o){return"*"===n?t.minimumFractionDigits=r.length:s&&"#"===s[0]?t.maximumFractionDigits=s.length:i&&o?(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length+o.length):(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length),""}));var i=s.options[0];"w"===i?t=rt(rt({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=rt(rt({},t),_t(i)))}else if(St.test(s.stem))t=rt(rt({},t),_t(s.stem));else{var o=wt(s.stem);o&&(t=rt(rt({},t),o));var a=At(s.stem);a&&(t=rt(rt({},t),a))}}return t}var Ot,Tt={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function kt(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw Error("Invalid hourCycle")}var r,n=e.language;return"root"!==n&&(r=e.maximize().region),(Tt[r||""]||Tt[n||""]||Tt["".concat(n,"-001")]||Tt["001"])[0]}var Ct=RegExp("^".concat(gt.source,"*")),It=RegExp("".concat(gt.source,"*$"));function Nt(e,t){return{start:e,end:t}}var Rt=!!String.prototype.startsWith&&!0,Ht=!!String.fromCodePoint,Bt=!!Object.fromEntries,Ft=!!String.prototype.codePointAt,jt=!!String.prototype.trimStart,Dt=!!String.prototype.trimEnd,Ut=Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&9007199254740991>=Math.abs(e)},Mt=!0;try{Mt="a"===(null===(Ot=Wt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Ot?void 0:Ot[0])}catch(e){Mt=!1}var Vt,Gt=Rt?function(e,t,r){return e.startsWith(t,r)}:function(e,t,r){return e.slice(r,r+t.length)===t},$t=Ht?String.fromCodePoint:function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];for(var r,n="",s=e.length,i=0;s>i;){if((r=e[i++])>1114111)throw RangeError(r+" is not a valid code point");n+=65536>r?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},qt=Bt?Object.fromEntries:function(e){for(var t={},r=0,n=e;r<n.length;r++){var s=n[r],i=s[0],o=s[1];t[i]=o}return t},zt=Ft?function(e,t){return e.codePointAt(t)}:function(e,t){var r=e.length;if(t>=0&&r>t){var n,s=e.charCodeAt(t);return 55296>s||s>56319||t+1===r||56320>(n=e.charCodeAt(t+1))||n>57343?s:n-56320+(s-55296<<10)+65536}},Kt=jt?function(e){return e.trimStart()}:function(e){return e.replace(Ct,"")},Xt=Dt?function(e){return e.trimEnd()}:function(e){return e.replace(It,"")};function Wt(e,t){return RegExp(e,t)}if(Mt){var Jt=Wt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Vt=function(e,t){var r;return Jt.lastIndex=t,null!==(r=Jt.exec(e)[1])&&void 0!==r?r:""}}else Vt=function(e,t){for(var r=[];;){var n=zt(e,t);if(void 0===n||Qt(n)||er(n))break;r.push(n),t+=65536>n?1:2}return $t.apply(void 0,r)};var Yt=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,r){for(var n=[];!this.isEOF();){var s=this.char();if(123===s){if((i=this.parseArgument(e,r)).err)return i;n.push(i.val)}else{if(125===s&&e>0)break;if(35!==s||"plural"!==t&&"selectordinal"!==t){if(60===s&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(Qe.UNMATCHED_CLOSING_TAG,Nt(this.clonePosition(),this.clonePosition()))}if(60===s&&!this.ignoreTag&&Zt(this.peek()||0)){if((i=this.parseTag(e,t)).err)return i;n.push(i.val)}else{var i;if((i=this.parseLiteral(e,t)).err)return i;n.push(i.val)}}else{var o=this.clonePosition();this.bump(),n.push({type:et.pound,location:Nt(o,this.clonePosition())})}}}return{val:n,err:null}},e.prototype.parseTag=function(e,t){var r=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:et.literal,value:"<".concat(n,"/>"),location:Nt(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(e+1,t,!0);if(s.err)return s;var i=s.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Zt(this.char()))return this.error(Qe.INVALID_TAG,Nt(o,this.clonePosition()));var a=this.clonePosition();return n!==this.parseTagName()?this.error(Qe.UNMATCHED_CLOSING_TAG,Nt(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:et.tag,value:n,children:i,location:Nt(r,this.clonePosition())},err:null}:this.error(Qe.INVALID_TAG,Nt(o,this.clonePosition())))}return this.error(Qe.UNCLOSED_TAG,Nt(r,this.clonePosition()))}return this.error(Qe.INVALID_TAG,Nt(r,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&57>=e||95===e||e>=97&&122>=e||e>=65&&90>=e||183==e||e>=192&&214>=e||e>=216&&246>=e||e>=248&&893>=e||e>=895&&8191>=e||e>=8204&&8205>=e||e>=8255&&8256>=e||e>=8304&&8591>=e||e>=11264&&12271>=e||e>=12289&&55295>=e||e>=63744&&64975>=e||e>=65008&&65533>=e||e>=65536&&983039>=e);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var r=this.clonePosition(),n="";;){var s=this.tryParseQuote(t);if(s)n+=s;else{var i=this.tryParseUnquoted(e,t);if(i)n+=i;else{var o=this.tryParseLeftAngleBracket();if(!o)break;n+=o}}}var a=Nt(r,this.clonePosition());return{val:{type:et.literal,value:n,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(Zt(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(39===r){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(r);this.bump()}return $t.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var r=this.char();return 60===r||123===r||35===r&&("plural"===t||"selectordinal"===t)||125===r&&e>0?null:(this.bump(),$t(r))},e.prototype.parseArgument=function(e,t){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Qe.EXPECT_ARGUMENT_CLOSING_BRACE,Nt(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error(Qe.EMPTY_ARGUMENT,Nt(r,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(Qe.MALFORMED_ARGUMENT,Nt(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Qe.EXPECT_ARGUMENT_CLOSING_BRACE,Nt(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:et.argument,value:n,location:Nt(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Qe.EXPECT_ARGUMENT_CLOSING_BRACE,Nt(r,this.clonePosition())):this.parseArgumentOptions(e,t,n,r);default:return this.error(Qe.MALFORMED_ARGUMENT,Nt(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),r=Vt(this.message,t),n=t+r.length;return this.bumpTo(n),{value:r,location:Nt(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,r,n){var s,i=this.clonePosition(),o=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(o){case"":return this.error(Qe.EXPECT_ARGUMENT_TYPE,Nt(i,a));case"number":case"date":case"time":this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((y=this.parseSimpleArgStyleIfPossible()).err)return y;if(0===(p=Xt(y.val)).length)return this.error(Qe.EXPECT_ARGUMENT_STYLE,Nt(this.clonePosition(),this.clonePosition()));l={style:p,styleLocation:Nt(c,this.clonePosition())}}if((b=this.tryParseArgumentClose(n)).err)return b;var u=Nt(n,this.clonePosition());if(l&&Gt(null==l?void 0:l.style,"::",0)){var h=Kt(l.style.slice(2));if("number"===o)return(y=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?y:{val:{type:et.number,value:r,location:u,style:y.val},err:null};if(0===h.length)return this.error(Qe.EXPECT_DATE_TIME_SKELETON,u);var d=h;this.locale&&(d=function(e,t){for(var r="",n=0;n<e.length;n++){var s=e.charAt(n);if("j"===s){for(var i=0;n+1<e.length&&e.charAt(n+1)===s;)i++,n++;var o=1+(1&i),a=2>i?1:3+(i>>1),l=kt(t);for("H"!=l&&"k"!=l||(a=0);a-- >0;)r+="a";for(;o-- >0;)r=l+r}else r+="J"===s?"H":s}return r}(h,this.locale));var p={type:tt.dateTime,pattern:d,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?yt(d):{}};return{val:{type:"date"===o?et.date:et.time,value:r,location:u,style:p},err:null}}return{val:{type:"number"===o?et.number:"date"===o?et.date:et.time,value:r,location:u,style:null!==(s=null==l?void 0:l.style)&&void 0!==s?s:null},err:null};case"plural":case"selectordinal":case"select":var f=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Qe.EXPECT_SELECT_ARGUMENT_OPTIONS,Nt(f,rt({},f)));this.bumpSpace();var g=this.parseIdentifierIfPossible(),m=0;if("select"!==o&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(Qe.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Nt(this.clonePosition(),this.clonePosition()));var y;if(this.bumpSpace(),(y=this.tryParseDecimalInteger(Qe.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Qe.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return y;this.bumpSpace(),g=this.parseIdentifierIfPossible(),m=y.val}var b,v=this.tryParsePluralOrSelectOptions(e,o,t,g);if(v.err)return v;if((b=this.tryParseArgumentClose(n)).err)return b;var S=Nt(n,this.clonePosition());return"select"===o?{val:{type:et.select,value:r,options:qt(v.val),location:S},err:null}:{val:{type:et.plural,value:r,options:qt(v.val),offset:m,pluralType:"plural"===o?"cardinal":"ordinal",location:S},err:null};default:return this.error(Qe.INVALID_ARGUMENT_TYPE,Nt(i,a))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(Qe.EXPECT_ARGUMENT_CLOSING_BRACE,Nt(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Qe.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Nt(r,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(0>=e)return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var r=[];try{r=function(e){if(0===e.length)throw Error("Number skeleton cannot be empty");for(var t=[],r=0,n=e.split(bt).filter((function(e){return e.length>0}));r<n.length;r++){var s=n[r].split("/");if(0===s.length)throw Error("Invalid number skeleton");for(var i=s[0],o=s.slice(1),a=0,l=o;a<l.length;a++)if(0===l[a].length)throw Error("Invalid number skeleton");t.push({stem:i,options:o})}return t}(e)}catch(e){return this.error(Qe.INVALID_NUMBER_SKELETON,t)}return{val:{type:tt.number,tokens:r,location:t,parsedOptions:this.shouldParseSkeletons?Lt(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,r,n){for(var s,i=!1,o=[],a=new Set,l=n.value,c=n.location;;){if(0===l.length){var u=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var h=this.tryParseDecimalInteger(Qe.EXPECT_PLURAL_ARGUMENT_SELECTOR,Qe.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;c=Nt(u,this.clonePosition()),l=this.message.slice(u.offset,this.offset())}if(a.has(l))return this.error("select"===t?Qe.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Qe.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(i=!0),this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?Qe.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Qe.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Nt(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(e+1,t,r);if(p.err)return p;var f=this.tryParseArgumentClose(d);if(f.err)return f;o.push([l,{value:p.val,location:Nt(d,this.clonePosition())}]),a.add(l),this.bumpSpace(),l=(s=this.parseIdentifierIfPossible()).value,c=s.location}return 0===o.length?this.error("select"===t?Qe.EXPECT_SELECT_ARGUMENT_SELECTOR:Qe.EXPECT_PLURAL_ARGUMENT_SELECTOR,Nt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(Qe.MISSING_OTHER_CLAUSE,Nt(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var s=!1,i=0;!this.isEOF();){var o=this.char();if(48>o||o>57)break;s=!0,i=10*i+(o-48),this.bump()}var a=Nt(n,this.clonePosition());return s?Ut(i*=r)?{val:i,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=zt(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=65536>e?1:2)}},e.prototype.bumpIf=function(e){if(Gt(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),r=this.message.indexOf(e,t);return 0>r?(this.bumpTo(this.message.length),!1):(this.bumpTo(r),!0)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Qt(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),r=this.message.charCodeAt(t+(65536>e?1:2));return null!=r?r:null},e}();function Zt(e){return e>=97&&122>=e||e>=65&&90>=e}function Qt(e){return e>=9&&13>=e||32===e||133===e||e>=8206&&8207>=e||8232===e||8233===e}function er(e){return e>=33&&35>=e||36===e||e>=37&&39>=e||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&47>=e||e>=58&&59>=e||e>=60&&62>=e||e>=63&&64>=e||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&165>=e||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&8213>=e||e>=8214&&8215>=e||8216===e||8217===e||8218===e||e>=8219&&8220>=e||8221===e||8222===e||8223===e||e>=8224&&8231>=e||e>=8240&&8248>=e||8249===e||8250===e||e>=8251&&8254>=e||e>=8257&&8259>=e||8260===e||8261===e||8262===e||e>=8263&&8273>=e||8274===e||8275===e||e>=8277&&8286>=e||e>=8592&&8596>=e||e>=8597&&8601>=e||e>=8602&&8603>=e||e>=8604&&8607>=e||8608===e||e>=8609&&8610>=e||8611===e||e>=8612&&8613>=e||8614===e||e>=8615&&8621>=e||8622===e||e>=8623&&8653>=e||e>=8654&&8655>=e||e>=8656&&8657>=e||8658===e||8659===e||8660===e||e>=8661&&8691>=e||e>=8692&&8959>=e||e>=8960&&8967>=e||8968===e||8969===e||8970===e||8971===e||e>=8972&&8991>=e||e>=8992&&8993>=e||e>=8994&&9e3>=e||9001===e||9002===e||e>=9003&&9083>=e||9084===e||e>=9085&&9114>=e||e>=9115&&9139>=e||e>=9140&&9179>=e||e>=9180&&9185>=e||e>=9186&&9254>=e||e>=9255&&9279>=e||e>=9280&&9290>=e||e>=9291&&9311>=e||e>=9472&&9654>=e||9655===e||e>=9656&&9664>=e||9665===e||e>=9666&&9719>=e||e>=9720&&9727>=e||e>=9728&&9838>=e||9839===e||e>=9840&&10087>=e||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&10175>=e||e>=10176&&10180>=e||10181===e||10182===e||e>=10183&&10213>=e||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&10239>=e||e>=10240&&10495>=e||e>=10496&&10626>=e||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&10711>=e||10712===e||10713===e||10714===e||10715===e||e>=10716&&10747>=e||10748===e||10749===e||e>=10750&&11007>=e||e>=11008&&11055>=e||e>=11056&&11076>=e||e>=11077&&11078>=e||e>=11079&&11084>=e||e>=11085&&11123>=e||e>=11124&&11125>=e||e>=11126&&11157>=e||11158===e||e>=11159&&11263>=e||e>=11776&&11777>=e||11778===e||11779===e||11780===e||11781===e||e>=11782&&11784>=e||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&11798>=e||11799===e||e>=11800&&11801>=e||11802===e||11803===e||11804===e||11805===e||e>=11806&&11807>=e||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&11822>=e||11823===e||e>=11824&&11833>=e||e>=11834&&11835>=e||e>=11836&&11839>=e||11840===e||11841===e||11842===e||e>=11843&&11855>=e||e>=11856&&11857>=e||11858===e||e>=11859&&11903>=e||e>=12289&&12291>=e||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&12307>=e||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&12319>=e||12320===e||12336===e||64830===e||64831===e||e>=65093&&65094>=e}function tr(e){e.forEach((function(e){if(delete e.location,ct(e)||ut(e))for(var t in e.options)delete e.options[t].location,tr(e.options[t].value);else ot(e)&&pt(e.style)||(at(e)||lt(e))&&ft(e.style)?delete e.style.location:dt(e)&&tr(e.children)}))}function rr(e,t){void 0===t&&(t={}),t=rt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Yt(e,t).parse();if(r.err){var n=SyntaxError(Qe[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return(null==t?void 0:t.captureLocation)||tr(r.val),r.val}function nr(e,t){var r=t&&t.cache?t.cache:hr,n=t&&t.serializer?t.serializer:lr;return(t&&t.strategy?t.strategy:ar)(e,{cache:r,serializer:n})}function sr(e,t,r,n){var s,i=null==(s=n)||"number"==typeof s||"boolean"==typeof s?n:r(n),o=t.get(i);return void 0===o&&(o=e.call(this,n),t.set(i,o)),o}function ir(e,t,r){var n=Array.prototype.slice.call(arguments,3),s=r(n),i=t.get(s);return void 0===i&&(i=e.apply(this,n),t.set(s,i)),i}function or(e,t,r,n,s){return r.bind(t,e,n,s)}function ar(e,t){return or(e,this,1===e.length?sr:ir,t.cache.create(),t.serializer)}var lr=function(){return JSON.stringify(arguments)};function cr(){this.cache=Object.create(null)}cr.prototype.get=function(e){return this.cache[e]},cr.prototype.set=function(e,t){this.cache[e]=t};var ur,hr={create:function(){return new cr}},dr={variadic:function(e,t){return or(e,this,ir,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(ur||(ur={}));var pr,fr=function(e){function t(t,r,n){var s=e.call(this,t)||this;return s.code=r,s.originalMessage=n,s}return Ze(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),gr=function(e){function t(t,r,n,s){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(r,'". Options are "').concat(Object.keys(n).join('", "'),'"'),ur.INVALID_VALUE,s)||this}return Ze(t,e),t}(fr),mr=function(e){function t(t,r,n){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(r),ur.INVALID_VALUE,n)||this}return Ze(t,e),t}(fr),yr=function(e){function t(t,r){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(r,'"'),ur.MISSING_VALUE,r)||this}return Ze(t,e),t}(fr);function br(e){return"function"==typeof e}function vr(e,t,r,n,s,i,o){if(1===e.length&&st(e[0]))return[{type:pr.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];if(st(u))a.push({type:pr.literal,value:u.value});else if(ht(u))"number"==typeof i&&a.push({type:pr.literal,value:r.getNumberFormat(t).format(i)});else{var h=u.value;if(!s||!(h in s))throw new yr(h,o);var d=s[h];if(it(u))d&&"string"!=typeof d&&"number"!=typeof d||(d="string"==typeof d||"number"==typeof d?d+"":""),a.push({type:"string"==typeof d?pr.literal:pr.object,value:d});else if(at(u)){var p="string"==typeof u.style?n.date[u.style]:ft(u.style)?u.style.parsedOptions:void 0;a.push({type:pr.literal,value:r.getDateTimeFormat(t,p).format(d)})}else if(lt(u))p="string"==typeof u.style?n.time[u.style]:ft(u.style)?u.style.parsedOptions:n.time.medium,a.push({type:pr.literal,value:r.getDateTimeFormat(t,p).format(d)});else if(ot(u))(p="string"==typeof u.style?n.number[u.style]:pt(u.style)?u.style.parsedOptions:void 0)&&p.scale&&(d*=p.scale||1),a.push({type:pr.literal,value:r.getNumberFormat(t,p).format(d)});else{if(dt(u)){var f=u.children,g=u.value,m=s[g];if(!br(m))throw new mr(g,"function",o);var y=m(vr(f,t,r,n,s,i).map((function(e){return e.value})));Array.isArray(y)||(y=[y]),a.push.apply(a,y.map((function(e){return{type:"string"==typeof e?pr.literal:pr.object,value:e}})))}if(ct(u)){if(!(b=u.options[d]||u.options.other))throw new gr(u.value,d,Object.keys(u.options),o);a.push.apply(a,vr(b.value,t,r,n,s))}else if(ut(u)){var b;if(!(b=u.options["=".concat(d)])){if(!Intl.PluralRules)throw new fr('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',ur.MISSING_INTL_API,o);var v=r.getPluralRules(t,{type:u.pluralType}).select(d-(u.offset||0));b=u.options[v]||u.options.other}if(!b)throw new gr(u.value,d,Object.keys(u.options),o);a.push.apply(a,vr(b.value,t,r,n,s,d-(u.offset||0)))}}}}return 2>(S=a).length?S:S.reduce((function(e,t){var r=e[e.length-1];return r&&r.type===pr.literal&&t.type===pr.literal?r.value+=t.value:e.push(t),e}),[]);var S}function Sr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(pr||(pr={}));var Er=function(){function e(t,r,n,s){var i,o,a,l=this;if(void 0===r&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=l.formatToParts(e);if(1===t.length)return t[0].value;var r=t.reduce((function(e,t){return e.length&&t.type===pr.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return r.length>1?r:r[0]||""},this.formatToParts=function(e){return vr(l.ast,l.locales,l.formatters,l.formats,e,void 0,l.message)},this.resolvedOptions=function(){var e;return{locale:(null===(e=l.resolvedLocale)||void 0===e?void 0:e.toString())||Intl.NumberFormat.supportedLocalesOf(l.locales)[0]}},this.getAst=function(){return l.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var c=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)0>t.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]])}return r}(s||{},["formatters"]);this.ast=e.__parse(t,rt(rt({},c),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=(o=e.formats,(a=n)?Object.keys(o).reduce((function(e,t){var r,n;return e[t]=(r=o[t],(n=a[t])?rt(rt(rt({},r||{}),n||{}),Object.keys(r).reduce((function(e,t){return e[t]=rt(rt({},r[t]),n[t]||{}),e}),{})):r),e}),rt({},o)):o),this.formatters=s&&s.formatters||(void 0===(i=this.formatterCache)&&(i={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:nr((function(){for(var e,t=[],r=0;arguments.length>r;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,nt([void 0],t,!1)))}),{cache:Sr(i.number),strategy:dr.variadic}),getDateTimeFormat:nr((function(){for(var e,t=[],r=0;arguments.length>r;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,nt([void 0],t,!1)))}),{cache:Sr(i.dateTime),strategy:dr.variadic}),getPluralRules:nr((function(){for(var e,t=[],r=0;arguments.length>r;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,nt([void 0],t,!1)))}),{cache:Sr(i.pluralRules),strategy:dr.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){if(void 0!==Intl.Locale){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])}},e.__parse=rr,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();function xr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _r(e){for(var t=1;arguments.length>t;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xr(Object(r),!0).forEach((function(t){wr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function wr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ar,Pr=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type="i18nFormat",this.mem={},this.init(null,t)}return t=e,r=[{key:"init",value:function(e,t){var r=this,n=e&&e.options&&e.options.i18nFormat||{};if(this.options=function(e){return We.call(Je.call(arguments,1),(function(t){if(t)for(var r in t)void 0===e[r]&&(e[r]=t[r])})),e}(n,t,this.options||{},{memoize:!0,memoizeFallback:!1,bindI18n:"",bindI18nStore:"",parseErrorHandler:function(e,t,r,n){return r},parseLngForICU:function(e){return e}}),this.formats=this.options.formats,e){var s=this.options,i=s.bindI18n,o=s.bindI18nStore,a=s.memoize;e.IntlMessageFormat=Er,e.ICU=this,a&&(i&&e.on(i,(function(){return r.clearCache()})),o&&e.store.on(o,(function(){return r.clearCache()})))}}},{key:"addUserDefinedFormats",value:function(e){this.formats=this.formats?_r(_r({},this.formats),e):e}},{key:"parse",value:function(e,t,r,n,s,i){var o,a,l,c,u=i&&i.resolved&&i.resolved.res,h=this.options.memoize&&"".concat(r,".").concat(n,".").concat(s.replace(/\./g,"###"));this.options.memoize&&(o=function(e,t){var r=Ke(e,t),n=r.obj,s=r.k;if(n)return n[s]}(this.mem,h));try{if(!o){var d=this.options.parseLngForICU(r);o=new Er(e,d,this.formats,{ignoreTag:!0}),this.options.memoize&&(this.options.memoizeFallback||!i||u)&&(a=this.mem,l=o,(c=Ke(a,h,Object)).obj[c.k]=l)}return o.format(t)}catch(r){return this.options.parseErrorHandler(r,s,e,t)}}},{key:"addLookupKeys",value:function(e,t,r,n,s){return e}},{key:"clearCache",value:function(){this.mem={}}}],r&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),e;var t,r}();Pr.type="i18nFormat",function(e){e.EN="en",e.DE="de",e.ES="es",e.IT="it",e.NL="nl",e.PT="pt-PT",e.FR="fr",e.HE="he-IL"}(Ar||(Ar={}));const Lr={store:["he-IL"]};function Or(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var Tr=function e(t,r){function n(e,n,s){if("undefined"!=typeof document){"number"==typeof(s=Or({},r,s)).expires&&(s.expires=new Date(Date.now()+864e5*s.expires)),s.expires&&(s.expires=s.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var o in s)s[o]&&(i+="; "+o,!0!==s[o]&&(i+="="+s[o].split(";")[0]));return document.cookie=e+"="+t.write(n,e)+i}}return Object.create({set:n,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],n={},s=0;s<r.length;s++){var i=r[s].split("="),o=i.slice(1).join("=");try{var a=decodeURIComponent(i[0]);if(n[a]=t.read(o,a),e===a)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){n(e,"",Or({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,Or({},this.attributes,t))},withConverter:function(t){return e(Or({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});class kr{}kr.defaultLanguage="en",kr.normalizeLocale=e=>{const t=e.replace(/_/g,"-");try{return new Intl.Locale(t).toString()}catch(e){return kr.defaultLanguage}},kr.setSystemLanguage=e=>{const t=process.env.NX_PUBLIC_ELEMENTOR_SUBDOMAIN||void 0;Tr.set("elementor_locale",kr.convertToElementorLocale(e),{expires:Number.MAX_SAFE_INTEGER,path:"/",domain:t});const r=window.braze?.getUser();r&&r.setLanguage(e)},kr.getSystemLanguage=()=>{const e=kr.getSupportedLanguage(new URLSearchParams(window.location.search).get("lang")),t=kr.getSupportedLanguage(Tr.get("elementor_locale")),r=kr.getSupportedLanguage(navigator.language||navigator.languages[0]);let n=Ar.EN;return e?n=e:t?n=t:r&&(n=r),Object.values(Ar).includes(n)?n:Ar.EN},kr.isLanguageExcluded=e=>(Lr[process.env.NX_PUBLIC_PROJECT_NAME||""]||[]).includes(e),kr.getSupportedLanguages=()=>Object.values(Ar).filter((e=>!kr.isLanguageExcluded(e))),kr.getSupportedLanguage=e=>{if(!e)return null;if(kr.isLanguageExcluded(e))return null;if(Object.values(Ar).includes(e))return e;const t=kr.normalizeLocale(e);if(Object.values(Ar).includes(t))return t;const r=e.split("_")[0];if(r&&Object.values(Ar).includes(r))return r;const n=e.split("-")[0];return n&&Object.values(Ar).includes(n)?n:null},kr.convertToElementorLocale=e=>{if(!e)return`${kr.defaultLanguage}-${kr.defaultLanguage.toUpperCase()}`;const t=e.toLowerCase(),r={[Ar.EN]:"US"},n={[Ar.HE]:"he-IL",[Ar.PT]:"pt-PT"};return n[e]?n[e]:`${t}-${r[e]||e.toUpperCase()}`};class Cr{constructor(){this.definedLanguage=kr.getSystemLanguage(),this.instances=[],this.changeLanguage=async e=>{if(kr.isLanguageExcluded(e))return;this.definedLanguage=e;const t=kr.normalizeLocale(e),r=this.instances.map((e=>e.changeLanguage(t)));kr.setSystemLanguage(e),await Promise.all(r)},this.createInstance=(e,t)=>{const r=ze.createInstance();var n;return r.use(Pr).use((n=e,{type:"backend",init:function(e,t,r){},read:function(e,t,r){if("function"!=typeof n)r(null,n&&n[e]&&n[e][t]);else{if(3>n.length){try{var s=n(e,t);s&&"function"==typeof s.then?s.then((function(e){return r(null,e&&e.default||e)})).catch(r):r(null,s)}catch(e){r(e)}return}n(e,t,r)}}})).use(Q).init({lng:kr.normalizeLocale(this.definedLanguage),fallbackLng:"en",ns:"common",interpolation:{escapeValue:!1},react:{useSuspense:!0}}),this.instances.push(r),r},this.getLanguage=()=>this.definedLanguage}}Cr.getSingleton=()=>(Cr.singleton||(Cr.singleton=new Cr),Cr.singleton);const Ir=Cr.getSingleton(),Nr=({children:t,directionInstance:r})=>{const n=(()=>{const[e,t]=v.useState(Ir.getLanguage()),{i18n:r}=ne();return v.useEffect((()=>{const e=e=>{t(e)};return r.on("languageChanged",e),()=>{r.off("languageChanged",e)}}),[r]),e})(),s=n===Ar.HE;return v.useEffect((()=>{const e=s?"rtl":"ltr";document.documentElement.dir=e}),[s]),e.jsxs(x,{rtl:s,children:[r&&v.createElement(r,{rtl:s,children:t}),!r&&t]})},Rr=({themeInstance:t,directionInstance:r,children:n,colorScheme:s="light",...i})=>e.jsx(Nr,{directionInstance:r,children:e.jsxs(_.ThemeProvider,{colorScheme:s,...i,children:[t&&v.createElement(t,{...i,colorScheme:s,children:n}),!t&&n]})}),Hr=t=>{const{isLoading:r,...n}=t,s=v.useMemo((()=>r?{disabled:!0,startIcon:e.jsx(h,{"data-test":"spinner"})}:{}),[r]);return e.jsx(Rr,{children:e.jsx(u,{...n,...s,children:t.children})})};var Br,Fr,jr,Dr;Br={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},Fr=["(","?"],jr={")":["("],":":["?","?:"]},Dr=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var Ur={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return t>e},"<=":function(e,t){return t>=e},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,r){if(e)throw t;return r}};var Mr={contextDelimiter:"",onMissingKey:null};function Vr(e,t){var r;for(r in this.data=e,this.pluralForms={},this.options={},Mr)this.options[r]=void 0!==t&&r in t?t[r]:Mr[r]}Vr.prototype.getPluralForm=function(e,t){var r,n,s,i,o=this.pluralForms[e];return o||("function"!=typeof(s=(r=this.data[e][""])["Plural-Forms"]||r["plural-forms"]||r.plural_forms)&&(n=function(e){var t,r,n;for(t=e.split(";"),r=0;r<t.length;r++)if(0===(n=t[r].trim()).indexOf("plural="))return n.substr(7)}(r["Plural-Forms"]||r["plural-forms"]||r.plural_forms),i=function(e){var t=function(e){for(var t,r,n,s,i=[],o=[];t=e.match(Dr);){for(r=t[0],(n=e.substr(0,t.index).trim())&&i.push(n);s=o.pop();){if(jr[r]){if(jr[r][0]===s){r=jr[r][1]||r;break}}else if(Fr.indexOf(s)>=0||Br[r]>Br[s]){o.push(s);break}i.push(s)}jr[r]||o.push(r),e=e.substr(t.index+r.length)}return(e=e.trim())&&i.push(e),i.concat(o.reverse())}(e);return function(e){return function(e,t){var r,n,s,i,o,a,l=[];for(r=0;r<e.length;r++){if(o=e[r],i=Ur[o]){for(n=i.length,s=Array(n);n--;)s[n]=l.pop();try{a=i.apply(null,s)}catch(e){return e}}else a=t.hasOwnProperty(o)?t[o]:+o;l.push(a)}return l[0]}(t,e)}}(n),s=function(e){return+i({n:e})}),o=this.pluralForms[e]=s),o(t)},Vr.prototype.dcnpgettext=function(e,t,r,n,s){var i,o,a;return i=void 0===s?0:this.getPluralForm(e,s),o=r,t&&(o=t+this.options.contextDelimiter+r),(a=this.data[e][o])&&a[i]?a[i]:(this.options.onMissingKey&&this.options.onMissingKey(r,e),0===i?r:n)};var Gr={plural_forms:e=>1===e?0:1},$r=/^i18n\.(n?gettext|has_translation)(_|$)/,qr=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)},zr=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)},Kr=function(e,t){return function(r,n,s,i=10){const o=e[t];if(!zr(r))return;if(!qr(n))return;if("function"!=typeof s)return void console.error("The hook callback must be a function.");if("number"!=typeof i)return void console.error("If specified, the hook priority must be a number.");const a={callback:s,priority:i,namespace:n};if(o[r]){const e=o[r].handlers;let t;for(t=e.length;t>0&&i<e[t-1].priority;t--);t===e.length?e[t]=a:e.splice(t,0,a),o.__current.forEach((e=>{e.name!==r||e.currentIndex<t||e.currentIndex++}))}else o[r]={handlers:[a],runs:0};"hookAdded"!==r&&e.doAction("hookAdded",r,n,s,i)}},Xr=function(e,t,r=!1){return function(n,s){const i=e[t];if(!zr(n))return;if(!r&&!qr(s))return;if(!i[n])return 0;let o=0;if(r)o=i[n].handlers.length,i[n]={runs:i[n].runs,handlers:[]};else{const e=i[n].handlers;for(let t=e.length-1;t>=0;t--)e[t].namespace===s&&(e.splice(t,1),o++,i.__current.forEach((e=>{e.name!==n||e.currentIndex<t||e.currentIndex--})))}return"hookRemoved"!==n&&e.doAction("hookRemoved",n,s),o}},Wr=function(e,t){return function(r,n){const s=e[t];return void 0!==n?r in s&&s[r].handlers.some((e=>e.namespace===n)):r in s}},Jr=function(e,t,r,n){return function(s,...i){const o=e[t];o[s]||(o[s]={handlers:[],runs:0}),o[s].runs++;const a=o[s].handlers;if("production"!==process.env.NODE_ENV&&"hookAdded"!==s&&o.all&&a.push(...o.all.handlers),!a||!a.length)return r?i[0]:void 0;const l={name:s,currentIndex:0};return(n?async function(){try{o.__current.add(l);let e=r?i[0]:void 0;for(;l.currentIndex<a.length;){const t=a[l.currentIndex];e=await t.callback.apply(null,i),r&&(i[0]=e),l.currentIndex++}return r?e:void 0}finally{o.__current.delete(l)}}:function(){try{o.__current.add(l);let e=r?i[0]:void 0;for(;l.currentIndex<a.length;)e=a[l.currentIndex].callback.apply(null,i),r&&(i[0]=e),l.currentIndex++;return r?e:void 0}finally{o.__current.delete(l)}})()}},Yr=function(e,t){return function(){const r=e[t],n=Array.from(r.__current);return n.at(-1)?.name??null}},Zr=function(e,t){return function(r){const n=e[t];return void 0===r?n.__current.size>0:Array.from(n.__current).some((e=>e.name===r))}},Qr=function(e,t){return function(r){const n=e[t];if(zr(r))return n[r]&&n[r].runs?n[r].runs:0}},en=((e,t,r)=>{const n=new Vr({}),s=new Set,i=()=>{s.forEach((e=>e()))},o=(e,t="default")=>{n.data[t]={...n.data[t],...e},n.data[t][""]={...Gr,...n.data[t]?.[""]},delete n.pluralForms[t]},a=(e,t)=>{o(e,t),i()},l=(e="default",t,r,s,i)=>(n.data[e]||o(void 0,e),n.dcnpgettext(e,t,r,s,i)),c=e=>e||"default",u=(e,t,n)=>{let s=l(n,t,e);return r?(s=r.applyFilters("i18n.gettext_with_context",s,e,t,n),r.applyFilters("i18n.gettext_with_context_"+c(n),s,e,t,n)):s};if(r){const e=e=>{$r.test(e)&&i()};r.addAction("hookAdded","core/i18n",e),r.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:(e="default")=>n.data[e],setLocaleData:a,addLocaleData:(e,t="default")=>{n.data[t]={...n.data[t],...e,"":{...Gr,...n.data[t]?.[""],...e?.[""]}},delete n.pluralForms[t],i()},resetLocaleData:(e,t)=>{n.data={},n.pluralForms={},a(e,t)},subscribe:e=>(s.add(e),()=>s.delete(e)),__:(e,t)=>{let n=l(t,void 0,e);return r?(n=r.applyFilters("i18n.gettext",n,e,t),r.applyFilters("i18n.gettext_"+c(t),n,e,t)):n},_x:u,_n:(e,t,n,s)=>{let i=l(s,void 0,e,t,n);return r?(i=r.applyFilters("i18n.ngettext",i,e,t,n,s),r.applyFilters("i18n.ngettext_"+c(s),i,e,t,n,s)):i},_nx:(e,t,n,s,i)=>{let o=l(i,s,e,t,n);return r?(o=r.applyFilters("i18n.ngettext_with_context",o,e,t,n,s,i),r.applyFilters("i18n.ngettext_with_context_"+c(i),o,e,t,n,s,i)):o},isRTL:()=>"rtl"===u("ltr","text direction"),hasTranslation:(e,t,s)=>{const i=t?t+""+e:e;let o=!!n.data?.[s??"default"]?.[i];return r&&(o=r.applyFilters("i18n.has_translation",o,e,t,s),o=r.applyFilters("i18n.has_translation_"+c(s),o,e,t,s)),o}}})(0,0,new class{constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=Kr(this,"actions"),this.addFilter=Kr(this,"filters"),this.removeAction=Xr(this,"actions"),this.removeFilter=Xr(this,"filters"),this.hasAction=Wr(this,"actions"),this.hasFilter=Wr(this,"filters"),this.removeAllActions=Xr(this,"actions",!0),this.removeAllFilters=Xr(this,"filters",!0),this.doAction=Jr(this,"actions",!1,!1),this.doActionAsync=Jr(this,"actions",!1,!0),this.applyFilters=Jr(this,"filters",!0,!1),this.applyFiltersAsync=Jr(this,"filters",!0,!0),this.currentAction=Yr(this,"actions"),this.currentFilter=Yr(this,"filters"),this.doingAction=Zr(this,"actions"),this.doingFilter=Zr(this,"filters"),this.didAction=Qr(this,"actions"),this.didFilter=Qr(this,"filters")}});en.getLocaleData.bind(en),en.setLocaleData.bind(en),en.resetLocaleData.bind(en),en.subscribe.bind(en);var tn=en.__.bind(en);en._x.bind(en),en._n.bind(en),en._nx.bind(en),en.isRTL.bind(en),en.hasTranslation.bind(en);var rn=(e,t)=>{let r,n,s=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(r=e.namespace.replace(/^\/|\/$/g,""),n=e.endpoint.replace(/^\//,""),s=n?r+"/"+n:r),delete e.namespace,delete e.endpoint,t({...e,path:s})};function nn(e){let t="";const r=Object.entries(e);let n;for(;n=r.shift();){let[e,s]=n;if(Array.isArray(s)||s&&s.constructor===Object){const t=Object.entries(s).reverse();for(const[n,s]of t)r.unshift([`${e}[${n}]`,s])}else void 0!==s&&(null===s&&(s=""),t+="&"+[e,s+""].map(encodeURIComponent).join("="))}return t.substr(1)}function sn(e){try{return decodeURIComponent(e)}catch(t){return e}}function on(e){return(function(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce(((e,t)=>{const[r,n=""]=t.split("=").filter(Boolean).map(sn);return r&&function(e,t,r){const n=t.length,s=n-1;for(let i=0;n>i;i++){let n=t[i];!n&&Array.isArray(e)&&(n=e.length.toString()),n=["__proto__","constructor","prototype"].includes(n)?n.toUpperCase():n;const o=!isNaN(+t[i+1]);e[n]=i===s?r:e[n]||(o?[]:{}),Array.isArray(e[n])&&!o&&(e[n]={...e[n]}),e=e[n]}}(e,r.replace(/\]/g,"").split("["),n),e}),Object.create(null))}function an(e="",t){if(!t||!Object.keys(t).length)return e;const r=function(e){const t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}(e)||"";let n=e.replace(r,"");const s=e.indexOf("?");return-1!==s&&(t=Object.assign(on(e),t),n=n.substr(0,s)),n+"?"+nn(t)+r}function ln(e,t){return on(e)[t]}function cn(e,t){return void 0!==ln(e,t)}function un(e,...t){const r=e.replace(/^[^#]*/,""),n=(e=e.replace(/#.*/,"")).indexOf("?");if(-1===n)return e+r;const s=on(e),i=e.substr(0,n);t.forEach((e=>delete s[e]));const o=nn(s);return(o?i+"?"+o:i)+r}function hn(e){const t=e.split("?"),r=t[1],n=t[0];return r?n+"?"+r.split("&").map((e=>e.split("="))).map((e=>e.map(decodeURIComponent))).sort(((e,t)=>e[0].localeCompare(t[0]))).map((e=>e.map(encodeURIComponent))).map((e=>e.join("="))).join("&"):n}function dn(e,t){if(t)return Promise.resolve(e.body);try{return Promise.resolve(new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}catch{return Object.entries(e.headers).forEach((([t,r])=>{"link"===t.toLowerCase()&&(e.headers[t]=r.replace(/<([^>]+)>/,((e,t)=>`<${encodeURI(t)}>`)))})),Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}}var pn=({path:e,url:t,...r},n)=>({...r,url:t&&an(t,n),path:e&&an(e,n)}),fn=e=>e.json?e.json():Promise.reject(e),gn=e=>{const{next:t}=(e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}})(e.headers.get("link"));return t},mn=async(e,t)=>{if(!1===e.parse)return t(e);if(!(e=>{const t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),r=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||r})(e))return t(e);const r=await On({...pn(e,{per_page:100}),parse:!1}),n=await fn(r);if(!Array.isArray(n))return n;let s=gn(r);if(!s)return n;let i=[].concat(n);for(;s;){const t=await On({...e,path:void 0,url:s,parse:!1}),r=await fn(t);i=i.concat(r),s=gn(t)}return i},yn=new Set(["PATCH","PUT","DELETE"]),bn="GET";async function vn(e){try{return await e.json()}catch{throw{code:"invalid_json",message:tn("The response is not a valid JSON response.")}}}async function Sn(e,t=!0){return t?204===e.status?null:await vn(e):e}async function En(e,t=!0){if(!t)throw e;throw await vn(e)}var xn={Accept:"application/json, */*;q=0.1"},_n={credentials:"include"},wn=[(e,t)=>("string"!=typeof e.url||cn(e.url,"_locale")||(e.url=an(e.url,{_locale:"user"})),"string"!=typeof e.path||cn(e.path,"_locale")||(e.path=an(e.path,{_locale:"user"})),t(e)),rn,(e,t)=>{const{method:r=bn}=e;return yn.has(r.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":r,"Content-Type":"application/json"},method:"POST"}),t(e)},mn],An=e=>{const{url:t,path:r,data:n,parse:s=!0,...i}=e;let{body:o,headers:a}=e;return a={...xn,...a},n&&(o=JSON.stringify(n),a["Content-Type"]="application/json"),globalThis.fetch(t||r||window.location.href,{..._n,...i,body:o,headers:a}).then((e=>e.ok?Sn(e,s):En(e,s)),(e=>{if(e&&"AbortError"===e.name)throw e;if(!globalThis.navigator.onLine)throw{code:"offline_error",message:tn("Unable to connect. Please check your Internet connection.")};throw{code:"fetch_error",message:tn("Could not get a valid response from the server.")}}))},Pn=e=>wn.reduceRight(((e,t)=>r=>t(r,e)),An)(e).catch((t=>"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):globalThis.fetch(Pn.nonceEndpoint).then((e=>e.ok?e.text():Promise.reject(t))).then((t=>(Pn.nonceMiddleware.nonce=t,Pn(e))))));Pn.use=function(e){wn.unshift(e)},Pn.setFetchHandler=function(e){An=e},Pn.createNonceMiddleware=function(e){const t=(e,r)=>{const{headers:n={}}=e;for(const s in n)if("x-wp-nonce"===s.toLowerCase()&&n[s]===t.nonce)return r(e);return r({...e,headers:{...n,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t},Pn.createPreloadingMiddleware=function(e){const t=Object.fromEntries(Object.entries(e).map((([e,t])=>[hn(e),t])));return(e,r)=>{const{parse:n=!0}=e;let s=e.path;if(!s&&e.url){const{rest_route:t,...r}=on(e.url);"string"==typeof t&&(s=an(t,r))}if("string"!=typeof s)return r(e);const i=e.method||"GET",o=hn(s);if("GET"===i&&t[o]){const e=t[o];return delete t[o],dn(e,!!n)}if("OPTIONS"===i&&t[i]&&t[i][o]){const e=t[i][o];return delete t[i][o],dn(e,!!n)}return r(e)}},Pn.createRootURLMiddleware=e=>(t,r)=>rn(t,(t=>{let n,s=t.url,i=t.path;return"string"==typeof i&&(n=e,-1!==e.indexOf("?")&&(i=i.replace("?","&")),i=i.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(i=i.replace("?","&")),s=n+i),r({...t,url:s})})),Pn.fetchAllMiddleware=mn,Pn.mediaUploadMiddleware=(e,t)=>{if(!function(e){const t=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&t}(e))return t(e);let r=0;const n=e=>(r++,t({path:`/wp/v2/media/${e}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((()=>5>r?n(e):(t({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"}),Promise.reject()))));return t({...e,parse:!1}).catch((t=>{if(!(t instanceof globalThis.Response))return Promise.reject(t);const r=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&600>t.status&&r?n(r).catch((()=>!1!==e.parse?Promise.reject({code:"post_process",message:tn("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t))):En(t,e.parse)})).then((t=>Sn(t,e.parse)))},Pn.createThemePreviewMiddleware=e=>(t,r)=>{if("string"==typeof t.url){const r=ln(t.url,"wp_theme_preview");void 0===r?t.url=an(t.url,{wp_theme_preview:e}):""===r&&(t.url=un(t.url,"wp_theme_preview"))}if("string"==typeof t.path){const r=ln(t.path,"wp_theme_preview");void 0===r?t.path=an(t.path,{wp_theme_preview:e}):""===r&&(t.path=un(t.path,"wp_theme_preview"))}return r(t)};var Ln,On=Pn;class Tn extends Error{constructor(e){super(e),this.name="APIError"}}!function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH",e.DELETE="DELETE",e.HEAD="HEAD"}(Ln||(Ln={}));const kn="/wp/v2";class Cn{static async request({path:e,data:t,method:r=Ln.POST}){try{const n=(window?.elementorOneSettingsData?.wpRestUrl||"/wp-json/").replace(/\/$/,""),s=window?.elementorOneSettingsData?.wpRestNonce;let i=`${n}${e}`;"GET"!==r||e.startsWith(kn)||(i=an(i,{sb_time:(new Date).getTime()}));const o=await On({url:i,method:r,data:t,headers:{"X-WP-Nonce":s}});if(e.startsWith(kn))return o;if(void 0===o.success)return o;if(!o.success)throw new Tn(o.data?.message||"Unknown error");return o.data}catch(e){throw e instanceof Tn?e:new Tn(e?.message||"Unknown error")}}}const In="/elementor-one/v1";class Nn extends Cn{static async initConnect(e="new"){const t={wp_rest:window?.elementorOneSettingsData?.wpRestNonce};return"update"===e&&(t.update_redirect_uri=!0),Cn.request({method:Ln.POST,path:In+"/connect/authorize",data:t})}static async getInstalledPlugins(){return await Cn.request({method:Ln.GET,path:In+"/plugins"})}static async installPlugin(e,t){return await Cn.request({method:Ln.POST,path:In+"/plugins",data:{slug:e,status:t}})}static async clearSession(){return Cn.request({method:Ln.POST,path:In+"/connect/deactivate_and_disconnect",data:{wp_rest:window?.elementorOneSettingsData?.wpRestNonce,clear_session:!0}})}static async deactivateAndDisconnect(){return Cn.request({method:Ln.POST,path:In+"/connect/deactivate_and_disconnect",data:{wp_rest:window?.elementorOneSettingsData?.wpRestNonce}})}static async deactivate(){return Cn.request({method:Ln.POST,path:In+"/connect/deactivate",data:{wp_rest:window?.elementorOneSettingsData?.wpRestNonce}})}static async disconnect(){return Cn.request({method:Ln.POST,path:In+"/connect/disconnect",data:{wp_rest:window?.elementorOneSettingsData?.wpRestNonce}})}static async reconnect(){return Cn.request({method:Ln.POST,path:In+"/connect/reconnect",data:{wp_rest:window?.elementorOneSettingsData?.wpRestNonce}})}static async attachApps(e){return Cn.request({method:Ln.POST,path:In+"/apps/link",data:{app_type:e}})}static async detachApps(e){return Cn.request({method:Ln.POST,path:In+"/apps/unlink",data:{app_type:e}})}static async getPluginSettings(){return Cn.request({method:Ln.GET,path:In+"/settings"})}static async getSettings(){return Cn.request({method:Ln.GET,path:kn+"/settings"})}static async updateSettings(e){return Cn.request({method:Ln.PUT,path:kn+"/settings",data:e})}}const Rn=b.createSlice({name:"sharedElementorOne",initialState:{pluginSettings:void 0,dataFetched:{},loadingState:{},errorState:{}},reducers:{setPluginSettings(e,t){e.pluginSettings=t.payload},setDataFetched(e,t){e.dataFetched[t.payload.key]=t.payload.value},setLoadState(e,t){e.loadingState[t.payload.key]=t.payload.value},setErrorState(e,t){e.errorState[t.payload.key]=t.payload.value}}}),{actions:Hn}=Rn;class Bn{}Bn.setPluginSettings=Hn.setPluginSettings,Bn.setDataFetched=Hn.setDataFetched,Bn.setLoadState=Hn.setLoadState,Bn.setErrorState=Hn.setErrorState;class Fn{}var jn,Dn,Un;Fn.selectState=e=>e.sharedElementorOne,Fn.selectPluginSettings=b.createSelector(Fn.selectState,(e=>e?.pluginSettings)),Fn.selectDataFetched=b.createSelector([Fn.selectState,(e,t)=>t],((e,t)=>e?.dataFetched[t]||void 0)),Fn.selectLoadingState=b.createSelector([Fn.selectState,(e,t)=>t],((e,t)=>e?.loadingState[t]||void 0)),Fn.selectErrorState=b.createSelector([Fn.selectState,(e,t)=>t],((e,t)=>e?.errorState[t]||void 0)),function(e){e.PLUGIN="PLUGIN",e.HOSTING="HOSTING",e.APP_AI="APP_AI",e.APP_IO="APP_IO",e.APP_BKP="APP_BKP",e.FREE_TRIAL="FREE_TRIAL",e.APP_SERVICE="APP_SERVICE",e.APP_STRATTIC="APP_STRATTIC",e.APP_SUPPORT="APP_SUPPORT",e.APP_MAILER="APP_MAILER",e.APP_EMPMA="APP_EMPMA",e.APP_ACCESS="APP_ACCESS",e.APP_MANAGE="APP_MANAGE",e.APP_DOMAIN="APP_DOMAIN",e.APP_ONE="APP_ONE"}(jn||(jn={})),function(e){e.Active="active",e.Expired="expired",e.OnHold="onhold",e.Canceled="canceled"}(Dn||(Dn={})),function(e){e.Pending="Pending",e.Completed="Completed",e.Failed="Failed",e.OnHold="OnHold"}(Un||(Un={}));const Mn=[];for(let e=0;256>e;++e)Mn.push((e+256).toString(16).slice(1));let Vn;const Gn=new Uint8Array(16),$n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function qn(e,t,r){if($n.randomUUID&&!e)return $n.randomUUID();const n=(e=e||{}).random??e.rng?.()??function(){if(!Vn){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Vn=crypto.getRandomValues.bind(crypto)}return Vn(Gn)}();if(16>n.length)throw Error("Random bytes length must be >= 16");return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(e,t=0){return(Mn[e[t+0]]+Mn[e[t+1]]+Mn[e[t+2]]+Mn[e[t+3]]+"-"+Mn[e[t+4]]+Mn[e[t+5]]+"-"+Mn[e[t+6]]+Mn[e[t+7]]+"-"+Mn[e[t+8]]+Mn[e[t+9]]+"-"+Mn[e[t+10]]+Mn[e[t+11]]+Mn[e[t+12]]+Mn[e[t+13]]+Mn[e[t+14]]+Mn[e[t+15]]).toLowerCase()}(n)}const zn=b.createSlice({name:"shared",initialState:{alertError:void 0,sharedLoader:void 0,showMobileNav:!1,toasts:[]},reducers:{setAlertError(e,t){e.alertError=t.payload},setSharedLoader(e,t){e.sharedLoader=t.payload},setShowMobileNav(e,t){e.showMobileNav=t.payload},setToast(e,t){const r={id:t.payload.id||qn(),type:t.payload.type||"info",text:t.payload.text||"",show:void 0===t.payload.show||t.payload.show,autohide:void 0===t.payload.autohide||t.payload.autohide,...t.payload},n=e.toasts?.find((e=>e.id===r.id));n?Object.assign(n,r):e.toasts?.push(r)},removeToast(e,t){const r=e.toasts?.find((e=>e.id===t.payload));r&&(r.show=!1)}}}),{actions:Kn}=zn;class Xn{}Xn.setAlertError=Kn.setAlertError,Xn.setSharedLoader=Kn.setSharedLoader,Xn.setShowMobileNav=Kn.setShowMobileNav,Xn.setToast=Kn.setToast,Xn.removeToast=Kn.removeToast;const Wn=()=>S.useDispatch(),Jn=S.useSelector;class Yn{}Yn.getPluginSettings=()=>async e=>{try{e(Bn.setLoadState({key:"pluginSettings",value:!0}));const t=await Nn.getPluginSettings();e(Bn.setPluginSettings(t))}catch(t){e(Xn.setAlertError({shouldRefresh:!0})),e(Bn.setErrorState({key:"pluginSettings",value:t?.message}))}finally{e(Bn.setDataFetched({key:"pluginSettings",value:!0})),e(Bn.setLoadState({key:"pluginSettings",value:!1}))}},Yn.connect=()=>async e=>{try{e(Bn.setLoadState({key:"connect",value:!0}));const t=await Nn.initConnect();window.open(t,"_self")?.focus()}catch(t){e(Xn.setAlertError({shouldRefresh:!0}))}finally{e(Bn.setLoadState({key:"connect",value:!1}))}},Yn.disconnect=()=>async e=>{try{e(Bn.setLoadState({key:"disconnect",value:!0})),await Nn.disconnect(),e(Yn.getPluginSettings())}catch(t){e(Xn.setAlertError({shouldRefresh:!0}))}finally{e(Bn.setLoadState({key:"disconnect",value:!1}))}},Yn.attachApps=e=>async t=>{try{return t(Bn.setLoadState({key:"attachApps-"+e,value:!0})),await Nn.attachApps(e)}catch(e){return void t(Xn.setAlertError({shouldRefresh:!0}))}finally{t(Bn.setLoadState({key:"attachApps-"+e,value:!1}))}},Yn.detachApps=e=>async t=>{try{return t(Bn.setLoadState({key:"detachApps-"+e,value:!0})),await Nn.detachApps(e)}catch(e){return void t(Xn.setAlertError({shouldRefresh:!0}))}finally{t(Bn.setLoadState({key:"detachApps-"+e,value:!1}))}};class Zn{}Zn.getInitials=(e,t)=>e||t?`${e?.charAt(0)}${t?.charAt(0)}`:"",Zn.getFullName=(e,t)=>`${e}${e&&t?" ":""}${t}`;const Qn=new Map,es=new Map,ts=({firstName:t="",lastName:r="",showInitials:n,size:i=32,iconSize:o="medium",onClick:a})=>{const l=Zn.getFullName(t,r),u=Zn.getInitials(t,r);return e.jsxs(E,{alt:l,sx:{height:i,width:i,color:"common.white"},onClick:a,children:[n&&(u?e.jsx(s,{variant:"caption","data-test":"user-avatar-initials",children:u}):e.jsx(c,{fontSize:o})),!n&&e.jsx(c,{fontSize:o})]})},rs=Ir.createInstance(((e,t)=>import(`./locales/${e}/${t}.json`))),ns=t=>{const{t:r}=ne("common",{i18n:rs}),n=Wn(),s=Jn((e=>Fn.selectLoadingState(e,"disconnect")));return e.jsx(p,{...t,"data-test":"user-profile-menu",anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{sx:{overflow:"visible !important",borderRadius:1}},children:e.jsxs(f,{onClick:async()=>{await n(Yn.disconnect()),t.onClose?.({},"backdropClick")},disabled:s,children:[e.jsx(g,{children:s?e.jsx(h,{size:16}):e.jsx(y,{fontSize:"small"})}),e.jsx(m,{children:r("header.userProfileMenu.disconnect")})]})})},ss=()=>{const{t:t}=ne("common",{i18n:rs}),r=Wn(),n=Jn(Fn.selectPluginSettings),s=Jn((e=>Fn.selectLoadingState(e,"connect"))),o=d({variant:"popover",popupId:"user-info-popover"});return e.jsx(e.Fragment,{children:n?.isConnected?e.jsxs(e.Fragment,{children:[e.jsx(i,{disableRipple:!0,...d.bindTrigger(o),"data-test":"profile-dropdown",children:e.jsx(ts,{})}),e.jsx(ns,{...d.bindMenu(o)})]}):e.jsx(u,{variant:"outlined",color:"secondary",size:"small",startIcon:s?e.jsx(h,{size:16}):e.jsx(c,{}),onClick:()=>{r(Yn.connect())},disabled:s,children:t("header.userInfo.connectAccount")})})},is=({id:t,title:r,description:n,topic:i,imageSrc:o,chipTags:a,link:l,readMoreText:c,cta:h,ctaLink:d,onItemClickedCallback:p})=>{const{t:f}=ne("assets-whatsnew",{i18n:rs}),{cachedImageSrc:g,isLoading:m,error:y}=(e=>{const[t,r]=v.useState(e&&Qn.get(e)||void 0),[n,s]=v.useState(!1),[i,o]=v.useState(null),a=v.useRef(!0);return v.useEffect((()=>{if(!e)return void r(void 0);if(Qn.has(e))return void r(Qn.get(e));if(es.has(e))return void es.get(e)?.then((e=>{a.current&&r(e)})).catch((e=>{a.current&&o(e.message)}));s(!0),o(null);const t=new Promise(((t,r)=>{const n=new Image;n.onload=()=>{Qn.set(e,e),t(e)},n.onerror=()=>{r(Error("Failed to load image: "+e))},n.src=e}));es.set(e,t),t.then((e=>{a.current&&(r(e),s(!1))})).catch((e=>{a.current&&(o(e.message),s(!1))})).finally((()=>{es.delete(e)}))}),[e]),v.useEffect((()=>()=>{a.current=!1}),[]),{cachedImageSrc:t,isLoading:n,error:i}})(o),b=v.useMemo((()=>f(t+".chipTags",{returnObjects:!0})),[f,t]),S=()=>{p?.()};return e.jsxs(P,{marginTop:2,children:[i&&e.jsx(s,{variant:"caption",color:"text.tertiary",children:f(t+".topic",{defaultValue:i})}),e.jsx(s,{variant:"subtitle1",color:"text.primary",children:f(t+".title",{defaultValue:r})}),o&&e.jsx(P,{style:{marginBottom:16},children:g&&!m&&!y&&e.jsx("img",{src:g,alt:f(t+".title",{defaultValue:r}),style:{width:"100%",height:"auto"}})}),a&&e.jsx(P,{display:"flex",gap:1,flexWrap:"wrap",marginBottom:1,children:a.map(((r,n)=>{const s=b?.at(n)||r;return e.jsx(L,{variant:"outlined",label:s},`${t}-${r}`)}))}),e.jsxs(s,{variant:"body2",color:e=>e.palette.text.secondary,sx:{marginBottom:1},children:[f(t+".description",{defaultValue:n}),c&&e.jsx("a",{href:l,target:"_blank",rel:"noreferrer",onClick:S,children:" "+f(t+".readMoreText",{defaultValue:c})})]}),h&&e.jsx(u,{variant:"contained",color:"promotion",href:d,target:"_blank",onClick:S,children:f(t+".cta",{defaultValue:h})})]})};let os=null;const as=async e=>{try{const t=await fetch(e);if(!t.ok)throw Error(`HTTP ${t.status} ${t.statusText} when fetching image from: ${e}`);const r=await t.blob();return new Promise(((e,t)=>{const n=new FileReader;n.onload=()=>e(n.result),n.onerror=()=>t(Error("Base64 conversion failed")),n.readAsDataURL(r)}))}catch(t){return console.warn(`Failed to convert image ${e}:`,t),e}},ls={local:{SUPPORT_FORM_URL:"https://my.stg.elementor.red/support-form/"},development:{SUPPORT_FORM_URL:"https://my.dev.elementor.red/support-form/"},staging:{SUPPORT_FORM_URL:"https://my.stg.elementor.red/support-form/"},production:{SUPPORT_FORM_URL:"https://my.elementor.com/support-form/"}},cs=v.createContext(null),us=()=>{const e=v.useContext(cs);if(!e)throw Error("Wrap your component in <ElementorOneAssetsProvider> to access the env config");return e},hs=({onClose:t,onItemClickedCallback:r,notificationsApiUrl:n})=>{const{t:o}=ne("common",{i18n:rs}),[a,c]=v.useState([]),[u,h]=v.useState(!0),d=us(),{NOTIFICATIONS_API_URL:p}=d;return v.useEffect((()=>{(async()=>{try{const e=await(async e=>{if(null!==os)return os;try{if(!e)throw Error("Notifications API URL is not defined");const t=await fetch(e);if(!t.ok)throw Error("Failed to fetch notifications: "+t.status);const r=((await t.json()).notifications||[]).filter(((e,t,r)=>r.findIndex((t=>t.id===e.id))===t)),n=await Promise.all(r.map((async e=>({...e,imageSrc:e.imageSrc?await as(e.imageSrc):e.imageSrc}))));return os=n,n}catch(e){return console.error("Error fetching notifications:",e),os=[],[]}})(n||p);c(e),h(!1)}catch(e){c([]),h(!1)}})()}),[n,p]),e.jsxs(P,{children:[e.jsxs(P,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsx(s,{variant:"subtitle1",color:"primary.text",children:o("whatsNew")}),e.jsx(i,{onClick:()=>{t()},"data-test":"service-banner-close",children:e.jsx(O,{})})]}),e.jsx(P,{children:!u&&a?.map(((t,n)=>e.jsxs(P,{"data-test":"whats-new-card-"+n,children:[e.jsx(is,{...t,onItemClickedCallback:r}),e.jsx(l,{sx:{margin:"16px 0"}})]},t.id)))})]})},ds=({onCloseCallback:t,onItemClickedCallback:r,containerSx:n={},notificationsApiUrl:s})=>{const[o,a]=v.useState(!1),[l,c]=v.useState(!1),u=()=>{a(!1),t?.()};return e.jsxs(e.Fragment,{children:[e.jsx(T,{color:"primary",overlap:"circular",badgeContent:"",invisible:l,variant:"dot",children:e.jsx(i,{onClick:()=>{o||l||c(!0),a(!o)},"data-test":"whats-new-button",children:e.jsx(w,{})})}),e.jsx(Rr,{themeInstance:_.ThemeProvider,directionInstance:x,colorScheme:"light",children:e.jsx(A,{variant:"temporary",open:o,hideBackdrop:!0,disableScrollLock:!0,anchor:"right",onClose:u,sx:n,children:e.jsx(hs,{onClose:u,onItemClickedCallback:r,notificationsApiUrl:s})})})]})};var ps=e=>"checkbox"===e.type,fs=e=>e instanceof Date,gs=e=>null==e;const ms=e=>"object"==typeof e;var ys=e=>!gs(e)&&!Array.isArray(e)&&ms(e)&&!fs(e),bs=e=>ys(e)&&e.target?ps(e.target)?e.target.checked:e.target.value:e,vs=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),Ss=e=>{const t=e.constructor&&e.constructor.prototype;return ys(t)&&t.hasOwnProperty("isPrototypeOf")},Es="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function xs(e){let t;const r=Array.isArray(e),n="undefined"!=typeof FileList&&e instanceof FileList;if(e instanceof Date)t=new Date(e);else{if(Es&&(e instanceof Blob||n)||!r&&!ys(e))return e;if(t=r?[]:Object.create(Object.getPrototypeOf(e)),r||Ss(e))for(const r in e)e.hasOwnProperty(r)&&(t[r]=xs(e[r]));else t=e}return t}var _s=e=>/^\w*$/.test(e),ws=e=>void 0===e,As=e=>Array.isArray(e)?e.filter(Boolean):[],Ps=e=>As(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ls=(e,t,r)=>{if(!t||!ys(e))return r;const n=(_s(t)?[t]:Ps(t)).reduce(((e,t)=>gs(e)?e:e[t]),e);return ws(n)||n===e?ws(e[t])?r:e[t]:n},Os=e=>"boolean"==typeof e,Ts=(e,t,r)=>{let n=-1;const s=_s(t)?[t]:Ps(t),i=s.length,o=i-1;for(;++n<i;){const t=s[n];let i=r;if(n!==o){const r=e[t];i=ys(r)||Array.isArray(r)?r:isNaN(+s[n+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=i,e=e[t]}};const ks="blur",Cs="focusout",Is="change",Ns="onBlur",Rs="onChange",Hs="onSubmit",Bs="onTouched",Fs="all",js="pattern",Ds="required",Us=v.createContext(null);Us.displayName="HookFormContext";const Ms=()=>v.useContext(Us);var Vs=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const s=i;return t._proxyFormState[s]!==Fs&&(t._proxyFormState[s]=!n||Fs),r&&(r[s]=!0),e[s]}});return s};const Gs="undefined"!=typeof window?v.useLayoutEffect:v.useEffect;var $s=e=>"string"==typeof e,qs=(e,t,r,n,s)=>$s(e)?(n&&t.watch.add(e),Ls(r,e,s)):Array.isArray(e)?e.map((e=>(n&&t.watch.add(e),Ls(r,e)))):(n&&(t.watchAll=!0),r),zs=e=>gs(e)||!ms(e);function Ks(e,t,r=new WeakSet){if(zs(e)||zs(t))return e===t;if(fs(e)&&fs(t))return e.getTime()===t.getTime();const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const i of n){const n=e[i];if(!s.includes(i))return!1;if("ref"!==i){const e=t[i];if(fs(n)&&fs(e)||ys(n)&&ys(e)||Array.isArray(n)&&Array.isArray(e)?!Ks(n,e,r):n!==e)return!1}}return!0}const Xs=e=>e.render(function(e){const t=Ms(),{name:r,disabled:n,control:s=t.control,shouldUnregister:i,defaultValue:o}=e,a=vs(s._names.array,r),l=v.useMemo((()=>Ls(s._formValues,r,Ls(s._defaultValues,r,o))),[s,r,o]),c=function(e){const t=Ms(),{control:r=t.control,name:n,defaultValue:s,disabled:i,exact:o,compute:a}=e||{},l=v.useRef(s),c=v.useRef(a),u=v.useRef(void 0);c.current=a;const h=v.useMemo((()=>r._getWatch(n,l.current)),[r,n]),[d,p]=v.useState(c.current?c.current(h):h);return Gs((()=>r._subscribe({name:n,formState:{values:!0},exact:o,callback:e=>{if(!i){const t=qs(n,r._names,e.values||r._formValues,!1,l.current);if(c.current){const e=c.current(t);Ks(e,u.current)||(p(e),u.current=e)}else p(t)}}})),[r,i,n,o]),v.useEffect((()=>r._removeUnmounted())),d}({control:s,name:r,defaultValue:l,exact:!0}),u=function(e){const t=Ms(),{control:r=t.control,disabled:n,name:s,exact:i}=e||{},[o,a]=v.useState(r._formState),l=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Gs((()=>r._subscribe({name:s,formState:l.current,exact:i,callback:e=>{!n&&a({...r._formState,...e})}})),[s,n,i]),v.useEffect((()=>{l.current.isValid&&r._setValid(!0)}),[r]),v.useMemo((()=>Vs(o,r,l.current,!1)),[o,r])}({control:s,name:r,exact:!0}),h=v.useRef(e),d=v.useRef(s.register(r,{...e.rules,value:c,...Os(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const p=v.useMemo((()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ls(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!Ls(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Ls(u.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Ls(u.validatingFields,r)},error:{enumerable:!0,get:()=>Ls(u.errors,r)}})),[u,r]),f=v.useCallback((e=>d.current.onChange({target:{value:bs(e),name:r},type:Is})),[r]),g=v.useCallback((()=>d.current.onBlur({target:{value:Ls(s._formValues,r),name:r},type:ks})),[r,s._formValues]),m=v.useCallback((e=>{const t=Ls(s._fields,r);t&&e&&(t._f.ref={focus:()=>e.focus&&e.focus(),select:()=>e.select&&e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}),[s._fields,r]),y=v.useMemo((()=>({name:r,value:c,...Os(n)||u.disabled?{disabled:u.disabled||n}:{},onChange:f,onBlur:g,ref:m})),[r,n,u.disabled,f,g,m,c]);return v.useEffect((()=>{const e=s._options.shouldUnregister||i;s.register(r,{...h.current.rules,...Os(h.current.disabled)?{disabled:h.current.disabled}:{}});const t=(e,t)=>{const r=Ls(s._fields,e);r&&r._f&&(r._f.mount=t)};if(t(r,!0),e){const e=xs(Ls(s._options.defaultValues,r));Ts(s._defaultValues,r,e),ws(Ls(s._formValues,r))&&Ts(s._formValues,r,e)}return!a&&s.register(r),()=>{(a?e&&!s._state.action:e)?s.unregister(r):t(r,!1)}}),[r,s,a,i]),v.useEffect((()=>{s._setDisabledField({disabled:n,name:r})}),[n,r,s]),v.useMemo((()=>({field:y,formState:u,fieldState:p})),[y,u,p])}(e));var Ws=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},Js=e=>Array.isArray(e)?e:[e],Ys=()=>{let e=[];return{get observers(){return e},next:t=>{for(const r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}},Zs=e=>ys(e)&&!Object.keys(e).length,Qs=e=>"file"===e.type,ei=e=>"function"==typeof e,ti=e=>{if(!Es)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ri=e=>"select-multiple"===e.type,ni=e=>"radio"===e.type,si=e=>ti(e)&&e.isConnected;function ii(e,t){const r=Array.isArray(t)?t:_s(t)?[t]:Ps(t),n=1===r.length?e:function(e,t){const r=t.slice(0,-1).length;let n=0;for(;r>n;)e=ws(e)?n++:e[t[n++]];return e}(e,r),s=r.length-1,i=r[s];return n&&delete n[i],0!==s&&(ys(n)&&Zs(n)||Array.isArray(n)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!ws(e[t]))return!1;return!0}(n))&&ii(e,r.slice(0,-1)),e}var oi=e=>{for(const t in e)if(ei(e[t]))return!0;return!1};function ai(e,t={}){const r=Array.isArray(e);if(ys(e)||r)for(const r in e)Array.isArray(e[r])||ys(e[r])&&!oi(e[r])?(t[r]=Array.isArray(e[r])?[]:{},ai(e[r],t[r])):gs(e[r])||(t[r]=!0);return t}function li(e,t,r){const n=Array.isArray(e);if(ys(e)||n)for(const n in e)Array.isArray(e[n])||ys(e[n])&&!oi(e[n])?ws(t)||zs(r[n])?r[n]=Array.isArray(e[n])?ai(e[n],[]):{...ai(e[n])}:li(e[n],gs(t)?{}:t[n],r[n]):r[n]=!Ks(e[n],t[n]);return r}var ci=(e,t)=>li(e,t,ai(t));const ui={value:!1,isValid:!1},hi={value:!0,isValid:!0};var di=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ws(e[0].attributes.value)?ws(e[0].value)||""===e[0].value?hi:{value:e[0].value,isValid:!0}:hi:ui}return ui},pi=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>ws(e)?e:t?""===e?NaN:e?+e:e:r&&$s(e)?new Date(e):n?n(e):e;const fi={isValid:!1,value:null};var gi=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),fi):fi;function mi(e){const t=e.ref;return Qs(t)?t.files:ni(t)?gi(e.refs).value:ri(t)?[...t.selectedOptions].map((({value:e})=>e)):ps(t)?di(e.refs).value:pi(ws(t.value)?e.ref.value:t.value,e)}var yi=e=>e instanceof RegExp,bi=e=>ws(e)?e:yi(e)?e.source:ys(e)?yi(e.value)?e.value.source:e.value:e,vi=e=>({isOnSubmit:!e||e===Hs,isOnBlur:e===Ns,isOnChange:e===Rs,isOnAll:e===Fs,isOnTouch:e===Bs});const Si="AsyncFunction";var Ei=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))));const xi=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const r=Ls(e,s);if(r){const{_f:e,...i}=r;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],s)&&!n)return!0;if(e.ref&&t(e.ref,e.name)&&!n)return!0;if(xi(i,t))break}else if(ys(i)&&xi(i,t))break}}};function _i(e,t,r){const n=Ls(e,r);if(n||_s(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const n=s.join("."),i=Ls(t,n),o=Ls(e,n);if(i&&!Array.isArray(i)&&r!==n)return{name:r};if(o&&o.type)return{name:n,error:o};if(o&&o.root&&o.root.type)return{name:n+".root",error:o.root};s.pop()}return{name:r}}var wi=(e,t,r)=>{const n=Js(Ls(e,r));return Ts(n,"root",t[r]),Ts(e,r,n),e},Ai=e=>$s(e);function Pi(e,t,r="validate"){if(Ai(e)||Array.isArray(e)&&e.every(Ai)||Os(e)&&!e)return{type:r,message:Ai(e)?e:"",ref:t}}var Li=e=>ys(e)&&!yi(e)?e:{value:e,message:""},Oi=async(e,t,r,n,s,i)=>{const{ref:o,refs:a,required:l,maxLength:c,minLength:u,min:h,max:d,pattern:p,validate:f,name:g,valueAsNumber:m,mount:y}=e._f,b=Ls(r,g);if(!y||t.has(g))return{};const v=a?a[0]:o,S=e=>{s&&v.reportValidity&&(v.setCustomValidity(Os(e)?"":e||""),v.reportValidity())},E={},x=ni(o),_=ps(o),w=x||_,A=(m||Qs(o))&&ws(o.value)&&ws(b)||ti(o)&&""===o.value||""===b||Array.isArray(b)&&!b.length,P=Ws.bind(null,g,n,E),L=(e,t,r,n="maxLength",s="minLength")=>{const i=e?t:r;E[g]={type:e?n:s,message:i,ref:o,...P(e?n:s,i)}};if(i?!Array.isArray(b)||!b.length:l&&(!w&&(A||gs(b))||Os(b)&&!b||_&&!di(a).isValid||x&&!gi(a).isValid)){const{value:e,message:t}=Ai(l)?{value:!!l,message:l}:Li(l);if(e&&(E[g]={type:Ds,message:t,ref:v,...P(Ds,t)},!n))return S(t),E}if(!(A||gs(h)&&gs(d))){let e,t;const r=Li(d),s=Li(h);if(gs(b)||isNaN(b)){const n=o.valueAsDate||new Date(b),i=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;$s(r.value)&&b&&(e=a?i(b)>i(r.value):l?b>r.value:n>new Date(r.value)),$s(s.value)&&b&&(t=a?i(b)<i(s.value):l?b<s.value:n<new Date(s.value))}else{const n=o.valueAsNumber||(b?+b:b);gs(r.value)||(e=n>r.value),gs(s.value)||(t=n<s.value)}if((e||t)&&(L(!!e,r.message,s.message,"max","min"),!n))return S(E[g].message),E}if((c||u)&&!A&&($s(b)||i&&Array.isArray(b))){const e=Li(c),t=Li(u),r=!gs(e.value)&&b.length>+e.value,s=!gs(t.value)&&b.length<+t.value;if((r||s)&&(L(r,e.message,t.message),!n))return S(E[g].message),E}if(p&&!A&&$s(b)){const{value:e,message:t}=Li(p);if(yi(e)&&!b.match(e)&&(E[g]={type:js,message:t,ref:o,...P(js,t)},!n))return S(t),E}if(f)if(ei(f)){const e=Pi(await f(b,r),v);if(e&&(E[g]={...e,...P("validate",e.message)},!n))return S(e.message),E}else if(ys(f)){let e={};for(const t in f){if(!Zs(e)&&!n)break;const s=Pi(await f[t](b,r),v,t);s&&(e={...s,...P(t,s.message)},S(s.message),n&&(E[g]=e))}if(!Zs(e)&&(E[g]={ref:v,...e},!n))return E}return S(!0),E};const Ti={mode:Hs,reValidateMode:Rs,shouldFocusError:!0};function ki(e={}){let t,r={...Ti,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:ei(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},i=(ys(r.defaultValues)||ys(r.values))&&xs(r.defaultValues||r.values)||{},o=r.shouldUnregister?{}:xs(i),a={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...u};const d={array:Ys(),state:Ys()},p=r.criteriaMode===Fs,f=async e=>{if(!r.disabled&&(u.isValid||h.isValid||e)){const e=r.resolver?Zs((await b()).errors):await v(s,!0);e!==n.isValid&&d.state.next({isValid:e})}},g=(e,t)=>{!r.disabled&&(u.isValidating||u.validatingFields||h.isValidating||h.validatingFields)&&((e||Array.from(l.mount)).forEach((e=>{e&&(t?Ts(n.validatingFields,e,t):ii(n.validatingFields,e))})),d.state.next({validatingFields:n.validatingFields,isValidating:!Zs(n.validatingFields)}))},m=(e,t,r,n)=>{const l=Ls(s,e);if(l){const s=Ls(o,e,ws(r)?Ls(i,e):r);ws(s)||n&&n.defaultChecked||t?Ts(o,e,t?s:mi(l._f)):x(e,s),a.mount&&f()}},y=(e,t,s,o,a)=>{let l=!1,c=!1;const p={name:e};if(!r.disabled){if(!s||o){(u.isDirty||h.isDirty)&&(c=n.isDirty,n.isDirty=p.isDirty=S(),l=c!==p.isDirty);const r=Ks(Ls(i,e),t);c=!!Ls(n.dirtyFields,e),r?ii(n.dirtyFields,e):Ts(n.dirtyFields,e,!0),p.dirtyFields=n.dirtyFields,l=l||(u.dirtyFields||h.dirtyFields)&&c!==!r}if(s){const t=Ls(n.touchedFields,e);t||(Ts(n.touchedFields,e,s),p.touchedFields=n.touchedFields,l=l||(u.touchedFields||h.touchedFields)&&t!==s)}l&&a&&d.state.next(p)}return l?p:{}},b=async e=>{g(e,!0);const t=await r.resolver(o,r.context,((e,t,r,n)=>{const s={};for(const r of e){const e=Ls(t,r);e&&Ts(s,r,e._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}})(e||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return g(e),t},v=async(e,t,s={valid:!0})=>{for(const a in e){const c=e[a];if(c){const{_f:e,...h}=c;if(e){const h=l.array.has(e.name),d=c._f&&(!!(i=c._f)&&!!i.validate&&!!(ei(i.validate)&&i.validate.constructor.name===Si||ys(i.validate)&&Object.values(i.validate).find((e=>e.constructor.name===Si))));d&&u.validatingFields&&g([a],!0);const f=await Oi(c,l.disabled,o,p,r.shouldUseNativeValidation&&!t,h);if(d&&u.validatingFields&&g([a]),f[e.name]&&(s.valid=!1,t))break;!t&&(Ls(f,e.name)?h?wi(n.errors,f,e.name):Ts(n.errors,e.name,f[e.name]):ii(n.errors,e.name))}!Zs(h)&&await v(h,t,s)}}var i;return s.valid},S=(e,t)=>!r.disabled&&(e&&t&&Ts(o,e,t),!Ks(O(),i)),E=(e,t,r)=>qs(e,l,{...a.mount?o:ws(t)?i:$s(e)?{[e]:t}:t},r,t),x=(e,t,r={})=>{const n=Ls(s,e);let i=t;if(n){const r=n._f;r&&(!r.disabled&&Ts(o,e,pi(t,r)),i=ti(r.ref)&&gs(t)?"":t,ri(r.ref)?[...r.ref.options].forEach((e=>e.selected=i.includes(e.value))):r.refs?ps(r.ref)?r.refs.forEach((e=>{e.defaultChecked&&e.disabled||(e.checked=Array.isArray(i)?!!i.find((t=>t===e.value)):i===e.value||!!i)})):r.refs.forEach((e=>e.checked=e.value===i)):Qs(r.ref)?r.ref.value="":(r.ref.value=i,r.ref.type||d.state.next({name:e,values:xs(o)})))}(r.shouldDirty||r.shouldTouch)&&y(e,i,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&L(e)},_=(e,t,r)=>{for(const n in t){if(!t.hasOwnProperty(n))return;const i=t[n],o=e+"."+n,a=Ls(s,o);(l.array.has(e)||ys(i)||a&&!a._f)&&!fs(i)?_(o,i,r):x(o,i,r)}},w=(e,t,r={})=>{const c=Ls(s,e),p=l.array.has(e),f=xs(t);Ts(o,e,f),p?(d.array.next({name:e,values:xs(o)}),(u.isDirty||u.dirtyFields||h.isDirty||h.dirtyFields)&&r.shouldDirty&&d.state.next({name:e,dirtyFields:ci(i,o),isDirty:S(e,f)})):!c||c._f||gs(f)?x(e,f,r):_(e,f,r),Ei(e,l)&&d.state.next({...n,name:e}),d.state.next({name:a.mount?e:void 0,values:xs(o)})},A=async e=>{a.mount=!0;const i=e.target;let m=i.name,S=!0;const E=Ls(s,m),x=e=>{S=Number.isNaN(e)||fs(e)&&isNaN(e.getTime())||Ks(e,Ls(o,m,e))},_=vi(r.mode),w=vi(r.reValidateMode);if(E){let a,P;const O=i.type?mi(E._f):bs(e),T=e.type===ks||e.type===Cs,k=!((A=E._f).mount&&(A.required||A.min||A.max||A.maxLength||A.minLength||A.pattern||A.validate)||r.resolver||Ls(n.errors,m)||E._f.deps)||((e,t,r,n,s)=>!s.isOnAll&&(!r&&s.isOnTouch?!(t||e):(r?n.isOnBlur:s.isOnBlur)?!e:!(r?n.isOnChange:s.isOnChange)||e))(T,Ls(n.touchedFields,m),n.isSubmitted,w,_),C=Ei(m,l,T);Ts(o,m,O),T?i&&i.readOnly||(E._f.onBlur&&E._f.onBlur(e),t&&t(0)):E._f.onChange&&E._f.onChange(e);const I=y(m,O,T),N=!Zs(I)||C;if(!T&&d.state.next({name:m,type:e.type,values:xs(o)}),k)return(u.isValid||h.isValid)&&("onBlur"===r.mode?T&&f():T||f()),N&&d.state.next({name:m,...C?{}:I});if(!T&&C&&d.state.next({...n}),r.resolver){const{errors:e}=await b([m]);if(x(O),S){const t=_i(n.errors,s,m),r=_i(e,s,t.name||m);a=r.error,m=r.name,P=Zs(e)}}else g([m],!0),a=(await Oi(E,l.disabled,o,p,r.shouldUseNativeValidation))[m],g([m]),x(O),S&&(a?P=!1:(u.isValid||h.isValid)&&(P=await v(s,!0)));S&&(E._f.deps&&L(E._f.deps),((e,s,i,o)=>{const a=Ls(n.errors,e),l=(u.isValid||h.isValid)&&Os(s)&&n.isValid!==s;var p;if(r.delayError&&i?(p=()=>((e,t)=>{Ts(n.errors,e,t),d.state.next({errors:n.errors})})(e,i),t=e=>{clearTimeout(c),c=setTimeout(p,e)},t(r.delayError)):(clearTimeout(c),t=null,i?Ts(n.errors,e,i):ii(n.errors,e)),(i?!Ks(a,i):a)||!Zs(o)||l){const t={...o,...l&&Os(s)?{isValid:s}:{},errors:n.errors,name:e};n={...n,...t},d.state.next(t)}})(m,P,a,I))}var A},P=(e,t)=>{if(Ls(n.errors,t)&&e.focus)return e.focus(),1},L=async(e,t={})=>{let i,o;const a=Js(e);if(r.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(e)for(const r of e){const e=Ls(t,r);e?Ts(n.errors,r,e):ii(n.errors,r)}else n.errors=t;return t})(ws(e)?e:a);i=Zs(t),o=e?!a.some((e=>Ls(t,e))):i}else e?(o=(await Promise.all(a.map((async e=>{const t=Ls(s,e);return await v(t&&t._f?{[e]:t}:t)})))).every(Boolean),(o||n.isValid)&&f()):o=i=await v(s);return d.state.next({...!$s(e)||(u.isValid||h.isValid)&&i!==n.isValid?{}:{name:e},...r.resolver||!e?{isValid:i}:{},errors:n.errors}),t.shouldFocus&&!o&&xi(s,P,e?a:l.mount),o},O=e=>{const t={...a.mount?o:i};return ws(e)?t:$s(e)?Ls(t,e):e.map((e=>Ls(t,e)))},T=(e,t)=>({invalid:!!Ls((t||n).errors,e),isDirty:!!Ls((t||n).dirtyFields,e),error:Ls((t||n).errors,e),isValidating:!!Ls(n.validatingFields,e),isTouched:!!Ls((t||n).touchedFields,e)}),k=(e,t,r)=>{const i=(Ls(s,e,{_f:{}})._f||{}).ref,o=Ls(n.errors,e)||{},{ref:a,message:l,type:c,...u}=o;Ts(n.errors,e,{...u,...t,ref:i}),d.state.next({name:e,errors:n.errors,isValid:!1}),r&&r.shouldFocus&&i&&i.focus&&i.focus()},C=e=>d.state.subscribe({next:t=>{var r,s,a;r=e.name,s=t.name,a=e.exact,(!r||!s||r===s||Js(r).some((e=>e&&(a?e===s:e.startsWith(s)||s.startsWith(e)))))&&((e,t,r,n)=>{r(e);const{name:s,...i}=e;return Zs(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find((e=>t[e]===(!n||Fs)))})(t,e.formState||u,D,e.reRenderRoot)&&e.callback({values:{...o},...n,...t,defaultValues:i})}}).unsubscribe,I=(e,t={})=>{for(const a of e?Js(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(ii(s,a),ii(o,a)),!t.keepError&&ii(n.errors,a),!t.keepDirty&&ii(n.dirtyFields,a),!t.keepTouched&&ii(n.touchedFields,a),!t.keepIsValidating&&ii(n.validatingFields,a),!r.shouldUnregister&&!t.keepDefaultValue&&ii(i,a);d.state.next({values:xs(o)}),d.state.next({...n,...t.keepDirty?{isDirty:S()}:{}}),!t.keepIsValid&&f()},N=({disabled:e,name:t})=>{(Os(e)&&a.mount||e||l.disabled.has(t))&&(e?l.disabled.add(t):l.disabled.delete(t))},R=(e,t={})=>{let n=Ls(s,e);const o=Os(t.disabled)||Os(r.disabled);return Ts(s,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),n?N({disabled:Os(t.disabled)?t.disabled:r.disabled,name:e}):m(e,!0,t.value),{...o?{disabled:t.disabled||r.disabled}:{},...r.progressive?{required:!!t.required,min:bi(t.min),max:bi(t.max),minLength:bi(t.minLength),maxLength:bi(t.maxLength),pattern:bi(t.pattern)}:{},name:e,onChange:A,onBlur:A,ref:o=>{if(o){R(e,t),n=Ls(s,e);const r=ws(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=(e=>ni(e)||ps(e))(r),l=n._f.refs||[];if(a?l.find((e=>e===r)):r===n._f.ref)return;Ts(s,e,{_f:{...n._f,...a?{refs:[...l.filter(si),r,...Array.isArray(Ls(i,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),m(e,!1,void 0,r)}else n=Ls(s,e,{}),n._f&&(n._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(!vs(l.array,e)||!a.action)&&l.unMount.add(e)}}},H=()=>r.shouldFocusError&&xi(s,P,l.mount),B=(e,t)=>async i=>{let a;i&&(i.preventDefault&&i.preventDefault(),i.persist&&i.persist());let c=xs(o);if(d.state.next({isSubmitting:!0}),r.resolver){const{errors:e,values:t}=await b();n.errors=e,c=xs(t)}else await v(s);if(l.disabled.size)for(const e of l.disabled)ii(c,e);if(ii(n.errors,"root"),Zs(n.errors)){d.state.next({errors:{}});try{await e(c,i)}catch(e){a=e}}else t&&await t({...n.errors},i),H(),setTimeout(H);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Zs(n.errors)&&!a,submitCount:n.submitCount+1,errors:n.errors}),a)throw a},F=(e,t={})=>{const c=e?xs(e):i,h=xs(c),p=Zs(e),f=p?i:h;if(t.keepDefaultValues||(i=c),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(ci(i,o))]);for(const t of Array.from(e))Ls(n.dirtyFields,t)?Ts(f,t,Ls(o,t)):w(t,Ls(f,t))}else{if(Es&&ws(e))for(const e of l.mount){const t=Ls(s,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(ti(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)w(e,Ls(f,e));else s={}}o=r.shouldUnregister?t.keepDefaultValues?xs(i):{}:xs(f),d.array.next({values:{...f}}),d.state.next({values:{...f}})}l={mount:t.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!u.isValid||!!t.keepIsValid||!!t.keepDirtyValues,a.watch=!!r.shouldUnregister,d.state.next({submitCount:t.keepSubmitCount?n.submitCount:0,isDirty:!p&&(t.keepDirty?n.isDirty:!(!t.keepDefaultValues||Ks(e,i))),isSubmitted:!!t.keepIsSubmitted&&n.isSubmitted,dirtyFields:p?{}:t.keepDirtyValues?t.keepDefaultValues&&o?ci(i,o):n.dirtyFields:t.keepDefaultValues&&e?ci(i,e):t.keepDirty?n.dirtyFields:{},touchedFields:t.keepTouched?n.touchedFields:{},errors:t.keepErrors?n.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&n.isSubmitSuccessful,isSubmitting:!1,defaultValues:i})},j=(e,t)=>F(ei(e)?e(o):e,t),D=e=>{n={...n,...e}},U={control:{register:R,unregister:I,getFieldState:T,handleSubmit:B,setError:k,_subscribe:C,_runSchema:b,_focusError:H,_getWatch:E,_getDirty:S,_setValid:f,_setFieldArray:(e,t=[],l,c,p=!0,f=!0)=>{if(c&&l&&!r.disabled){if(a.action=!0,f&&Array.isArray(Ls(s,e))){const t=l(Ls(s,e),c.argA,c.argB);p&&Ts(s,e,t)}if(f&&Array.isArray(Ls(n.errors,e))){const t=l(Ls(n.errors,e),c.argA,c.argB);p&&Ts(n.errors,e,t),((e,t)=>{!As(Ls(e,t)).length&&ii(e,t)})(n.errors,e)}if((u.touchedFields||h.touchedFields)&&f&&Array.isArray(Ls(n.touchedFields,e))){const t=l(Ls(n.touchedFields,e),c.argA,c.argB);p&&Ts(n.touchedFields,e,t)}(u.dirtyFields||h.dirtyFields)&&(n.dirtyFields=ci(i,o)),d.state.next({name:e,isDirty:S(e,t),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ts(o,e,t)},_setDisabledField:N,_setErrors:e=>{n.errors=e,d.state.next({errors:n.errors,isValid:!1})},_getFieldArray:e=>As(Ls(a.mount?o:i,e,r.shouldUnregister?Ls(i,e,[]):[])),_reset:F,_resetDefaultValues:()=>ei(r.defaultValues)&&r.defaultValues().then((e=>{j(e,r.resetOptions),d.state.next({isLoading:!1})})),_removeUnmounted:()=>{for(const e of l.unMount){const t=Ls(s,e);t&&(t._f.refs?t._f.refs.every((e=>!si(e))):!si(t._f.ref))&&I(e)}l.unMount=new Set},_disableForm:e=>{Os(e)&&(d.state.next({disabled:e}),xi(s,((t,r)=>{const n=Ls(s,r);n&&(t.disabled=n._f.disabled||e,Array.isArray(n._f.refs)&&n._f.refs.forEach((t=>{t.disabled=n._f.disabled||e})))}),0,!1))},_subjects:d,_proxyFormState:u,get _fields(){return s},get _formValues(){return o},get _state(){return a},set _state(e){a=e},get _defaultValues(){return i},get _names(){return l},set _names(e){l=e},get _formState(){return n},get _options(){return r},set _options(e){r={...r,...e}}},subscribe:e=>(a.mount=!0,h={...h,...e.formState},C({...e,formState:h})),trigger:L,register:R,handleSubmit:B,watch:(e,t)=>ei(e)?d.state.subscribe({next:r=>"values"in r&&e(E(void 0,t),r)}):E(e,t,!0),setValue:w,getValues:O,reset:j,resetField:(e,t={})=>{Ls(s,e)&&(ws(t.defaultValue)?w(e,xs(Ls(i,e))):(w(e,t.defaultValue),Ts(i,e,xs(t.defaultValue))),t.keepTouched||ii(n.touchedFields,e),t.keepDirty||(ii(n.dirtyFields,e),n.isDirty=t.defaultValue?S(e,xs(Ls(i,e))):S()),t.keepError||(ii(n.errors,e),u.isValid&&f()),d.state.next({...n}))},clearErrors:e=>{e&&Js(e).forEach((e=>ii(n.errors,e))),d.state.next({errors:e?n.errors:{}})},unregister:I,setError:k,setFocus:(e,t={})=>{const r=Ls(s,e),n=r&&r._f;if(n){const e=n.refs?n.refs[0]:n.ref;e.focus&&(e.focus(),t.shouldSelect&&ei(e.select)&&e.select())}},getFieldState:T};return{...U,formControl:U}}const Ci=({open:t,onClose:n,colorScheme:i="light",onSendFeedback:o,closeOnSubmit:a=!0,resetFormOnClose:l=!0})=>{const{t:c}=ne("send-feedback",{i18n:rs}),{SUPPORT_FORM_URL:h}=us(),{control:d,handleSubmit:p,reset:f,formState:{isSubmitting:g,isValid:m}}=function(e={}){const t=v.useRef(void 0),r=v.useRef(void 0),[n,s]=v.useState({isDirty:!1,isValidating:!1,isLoading:ei(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:ei(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!ei(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:r,...s}=ki(e);t.current={...s,formState:n}}const i=t.current.control;return i._options=e,Gs((()=>{const e=i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState}),reRenderRoot:!0});return s((e=>({...e,isReady:!0}))),i._formState.isReady=!0,e}),[i]),v.useEffect((()=>i._disableForm(e.disabled)),[i,e.disabled]),v.useEffect((()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)}),[i,e.mode,e.reValidateMode]),v.useEffect((()=>{e.errors&&(i._setErrors(e.errors),i._focusError())}),[i,e.errors]),v.useEffect((()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})}),[i,e.shouldUnregister]),v.useEffect((()=>{if(i._proxyFormState.isDirty){const e=i._getDirty();e!==n.isDirty&&i._subjects.state.next({isDirty:e})}}),[i,n.isDirty]),v.useEffect((()=>{e.values&&!Ks(e.values,r.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),r.current=e.values,s((e=>({...e})))):i._resetDefaultValues()}),[i,e.values]),v.useEffect((()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()})),t.current.formState=Vs(n,i),t.current}({defaultValues:{subject:"",title:"",description:""},mode:"onChange"}),y=v.useMemo((()=>[{label:c("dialog.subjects.leaveFeedback"),value:"leaveFeedback"},{label:c("dialog.subjects.reportBug"),value:"reportBug"},{label:c("dialog.subjects.requestFeature"),value:"requestFeature"},{label:c("dialog.subjects.shareThoughts"),value:"shareThoughts"}]),[c]);v.useEffect((()=>{!t&&l&&f()}),[t,f,l]);const b=()=>{f(),n()};return e.jsx(Rr,{themeInstance:_.ThemeProvider,directionInstance:x,colorScheme:i,children:e.jsxs(k,{onClose:b,open:t,maxWidth:"sm",fullWidth:!0,"data-test":"send-feedback-dialog",children:[e.jsx(B,{logo:!1,onClose:b,children:e.jsx(N,{color:"text.primary",variant:"subtitle1",children:c("dialog.title")})}),e.jsxs(P,{component:"form",onSubmit:p((async e=>{o(e),a&&b()})),children:[e.jsx(C,{sx:{px:3},dividers:!0,children:e.jsxs(r,{gap:2,children:[e.jsx(Xs,{name:"subject",control:d,render:({field:{onChange:t,value:r}})=>e.jsx(F,{multiple:!1,options:y,value:y.find((e=>e.label===r))||null,onChange:(e,r)=>t(r?.label||""),renderInput:t=>e.jsx(H,{"data-test":"subject-send-feedback-input",...t,placeholder:c("dialog.fieldSubjectPlaceholder"),color:"secondary"})})}),e.jsx(Xs,{name:"title",control:d,rules:{required:!0,maxLength:{value:90,message:c("dialog.titleLengthError")}},render:({field:t,fieldState:r})=>e.jsx(R,{fullWidth:!0,children:e.jsx(H,{...t,fullWidth:!0,placeholder:c("dialog.fieldTitlePlaceholder"),"data-test":"title-send-feedback-input",error:!!r.error,helperText:r.error?.message,required:!0,sx:{"& .MuiInputBase-root":{minHeight:56}},color:"secondary"})})}),e.jsx(Xs,{name:"description",control:d,rules:{required:!0,maxLength:{value:1024,message:c("dialog.descriptionLengthError")}},render:({field:t,fieldState:r})=>e.jsx(R,{fullWidth:!0,children:e.jsx(H,{...t,multiline:!0,rows:5,fullWidth:!0,placeholder:c("dialog.fieldDescriptionPlaceholder"),"data-test":"description-send-feedback-input",error:!!r.error,helperText:r.error?.message,required:!0,color:"secondary"})})}),e.jsx(j,{severity:"info",action:e.jsx(D,{href:h,target:"_blank",color:"info",children:c("dialog.alert.button")}),children:c("dialog.alert.title")}),e.jsxs(r,{direction:"row",gap:1,children:[e.jsx(s,{sx:{ml:.5},variant:"body2",color:"text.primary",children:"• "}),e.jsx(s,{variant:"body2",color:"text.primary",children:c("dialog.note")})]})]})}),e.jsxs(I,{sx:{px:3,py:2,gap:1},children:[e.jsx(u,{variant:"text",color:"secondary",onClick:b,"data-test":"cancel-send-feedback-modal",children:c("dialog.cancel")}),e.jsx(Hr,{type:"submit",variant:"contained",color:"primary",isLoading:g,"data-test":"submit-feedback-button",disabled:!m||g,children:c("dialog.submit")})]})]})]})})};exports.ElementorOneAssetsContext=cs,exports.ElementorOneAssetsProvider=({env:t,language:r=Ar.EN,children:n})=>{const s=v.useMemo((()=>(e=>ls[e])(t)),[t]);return v.useEffect((()=>{rs.changeLanguage(r)}),[r]),e.jsx(cs.Provider,{value:s,children:n})},exports.ElementorOneHeader=({appType:c,colorScheme:u="dark",multiDelpoymentSlot:h,containerSx:d={}})=>{const{t:p}=ne("common",{i18n:rs}),f=(e=>{switch(e){case jn.APP_IO:return"https://elementor.com/help/plugins-by-elementor/image-optimizer/";case jn.APP_ACCESS:return"https://elementor.com/help/plugins-by-elementor/web-accessibility/";case jn.PLUGIN:return"https://elementor.com/help/elementor-editor/";case jn.APP_MAILER:return"https://elementor.com/help/plugins-by-elementor/site-mailer/";case jn.APP_AI:return"https://elementor.com/help/elementor-ai/";default:return}})(c),[g,m]=v.useState(!1);return e.jsxs(Rr,{themeInstance:_.ThemeProvider,directionInstance:x,colorScheme:u,children:[e.jsx(t,{sx:{top:0,...d,position:"sticky",zIndex:1100},children:e.jsx(n,{sx:{pl:"30px !important",backgroundColor:"background.paper"},variant:"dense",children:e.jsxs(r,{direction:"row",justifyContent:"space-between",width:"100%",children:[e.jsxs(r,{direction:"row",alignItems:"center",gap:1,flexWrap:"nowrap",children:[e.jsx(M,{}),e.jsx(s,{variant:"button",fontSize:"24px",whiteSpace:"nowrap",children:p("header.title")})]}),e.jsxs(r,{direction:"row",alignItems:"center",gap:1,children:[e.jsx(i,{size:"small",onClick:()=>m(!0),children:e.jsx(o,{})}),e.jsx(ds,{containerSx:{"& .MuiDrawer-paper":{width:320,padding:3,top:80,height:"calc(100vh - 80px)","@media (max-width: 784px)":{top:94,height:"calc(100vh - 94px)"}}}}),f&&e.jsx(i,{size:"small",href:f,target:"_blank",children:e.jsx(a,{})}),h,e.jsx(l,{orientation:"vertical",flexItem:!0,sx:{my:1,mx:1}}),e.jsx(ss,{})]})]})})}),e.jsx(Ci,{open:g,onClose:()=>m(!1),onSendFeedback:e=>console.log("send feedback",e)})]})},exports.SendFeedbackDialog=Ci,exports.WhatsNew=ds;
|
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|