@department-of-veterans-affairs/component-library 54.2.0 → 54.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/Modal.unit.spec.js +1 -0
  2. package/dist/1214.app.bundle.js +1 -0
  3. package/dist/1339.app.bundle.js +2 -0
  4. package/dist/{6850.app.bundle.js → 1351.app.bundle.js} +1 -1
  5. package/dist/{6830.app.bundle.js → 1365.app.bundle.js} +1 -1
  6. package/dist/{7481.app.bundle.js → 1450.app.bundle.js} +1 -1
  7. package/dist/2222.app.bundle.js +2 -0
  8. package/dist/{7734.app.bundle.js → 2387.app.bundle.js} +1 -1
  9. package/dist/{4157.app.bundle.js → 2472.app.bundle.js} +1 -1
  10. package/dist/{3589.app.bundle.js → 2654.app.bundle.js} +2 -2
  11. package/dist/{2923.app.bundle.js → 2664.app.bundle.js} +2 -2
  12. package/dist/{7372.app.bundle.js → 2801.app.bundle.js} +2 -2
  13. package/dist/{3601.app.bundle.js → 2858.app.bundle.js} +2 -2
  14. package/dist/{6832.app.bundle.js → 3071.app.bundle.js} +1 -1
  15. package/dist/{6104.app.bundle.js → 3126.app.bundle.js} +1 -1
  16. package/dist/{4351.app.bundle.js → 3156.app.bundle.js} +1 -1
  17. package/dist/{4534.app.bundle.js → 3238.app.bundle.js} +1 -1
  18. package/dist/{6555.app.bundle.js → 4064.app.bundle.js} +1 -1
  19. package/dist/{6650.app.bundle.js → 4117.app.bundle.js} +2 -2
  20. package/dist/4140.app.bundle.js +1 -0
  21. package/dist/415.app.bundle.js +1 -0
  22. package/dist/{4569.app.bundle.js → 4164.app.bundle.js} +2 -2
  23. package/dist/{5341.app.bundle.js → 4708.app.bundle.js} +2 -2
  24. package/dist/{1822.app.bundle.js → 4715.app.bundle.js} +2 -2
  25. package/dist/{5938.app.bundle.js → 5019.app.bundle.js} +2 -2
  26. package/dist/{6718.app.bundle.js → 5155.app.bundle.js} +1 -1
  27. package/dist/5189.app.bundle.js +2 -0
  28. package/dist/{5845.app.bundle.js → 5306.app.bundle.js} +2 -2
  29. package/dist/{5689.app.bundle.js → 5610.app.bundle.js} +1 -1
  30. package/dist/{5990.app.bundle.js → 5699.app.bundle.js} +2 -2
  31. package/dist/575.app.bundle.js +2 -0
  32. package/dist/{5119.app.bundle.js → 5830.app.bundle.js} +2 -2
  33. package/dist/{7495.app.bundle.js → 6034.app.bundle.js} +2 -2
  34. package/dist/{7307.app.bundle.js → 6246.app.bundle.js} +2 -2
  35. package/dist/{2482.app.bundle.js → 6247.app.bundle.js} +1 -1
  36. package/dist/{7166.app.bundle.js → 6349.app.bundle.js} +2 -2
  37. package/dist/{960.app.bundle.js → 641.app.bundle.js} +1 -1
  38. package/dist/{9186.app.bundle.js → 6527.app.bundle.js} +2 -2
  39. package/dist/{6308.app.bundle.js → 6633.app.bundle.js} +2 -2
  40. package/dist/{1966.app.bundle.js → 6655.app.bundle.js} +2 -2
  41. package/dist/6683.app.bundle.js +2 -0
  42. package/dist/6771.app.bundle.js +1 -0
  43. package/dist/{8915.app.bundle.js → 6824.app.bundle.js} +2 -2
  44. package/dist/712.app.bundle.js +2 -0
  45. package/dist/{4400.app.bundle.js → 7367.app.bundle.js} +2 -2
  46. package/dist/{2986.app.bundle.js → 7531.app.bundle.js} +1 -1
  47. package/dist/{6498.app.bundle.js → 7663.app.bundle.js} +1 -1
  48. package/dist/{3305.app.bundle.js → 7814.app.bundle.js} +2 -2
  49. package/dist/{2236.app.bundle.js → 7821.app.bundle.js} +1 -1
  50. package/dist/8175.app.bundle.js +2 -0
  51. package/dist/82.app.bundle.js +2 -0
  52. package/dist/8206.app.bundle.js +1 -0
  53. package/dist/{4780.app.bundle.js → 8495.app.bundle.js} +2 -2
  54. package/dist/{4996.app.bundle.js → 8735.app.bundle.js} +2 -2
  55. package/dist/8762.app.bundle.js +2 -1
  56. package/dist/{6696.app.bundle.js → 8859.app.bundle.js} +1 -1
  57. package/dist/890.app.bundle.js +2 -0
  58. package/dist/9288.app.bundle.js +1 -0
  59. package/dist/{7084.app.bundle.js → 9409.app.bundle.js} +1 -1
  60. package/dist/9463.app.bundle.js +1 -0
  61. package/dist/{8463.app.bundle.js → 9670.app.bundle.js} +1 -1
  62. package/dist/9724.app.bundle.js +2 -0
  63. package/dist/{5348.app.bundle.js → 9755.app.bundle.js} +2 -2
  64. package/dist/{8255.app.bundle.js → 9794.app.bundle.js} +2 -2
  65. package/dist/{8913.app.bundle.js → 9800.app.bundle.js} +2 -2
  66. package/dist/9915.app.bundle.js +1 -0
  67. package/dist/9966.app.bundle.js +2 -0
  68. package/dist/app.bundle.js +1 -1
  69. package/dist/app.bundle.js.LICENSE.txt +1 -1
  70. package/dist/components/contacts.js +1 -1
  71. package/dist/components/i18next.js +1 -1
  72. package/dist/components/index.js +1 -1
  73. package/dist/components/types/components.d.ts +34 -10
  74. package/dist/components/va-accordion2.js +1 -1
  75. package/dist/components/va-alert2.js +1 -1
  76. package/dist/components/va-banner.js +1 -1
  77. package/dist/components/va-checkbox-group2.js +1 -1
  78. package/dist/components/va-checkbox2.js +1 -1
  79. package/dist/components/va-combo-box2.js +1 -1
  80. package/dist/components/va-crisis-line-modal2.js +1 -1
  81. package/dist/components/va-date.js +1 -1
  82. package/dist/components/va-file-input-multiple.js +1 -1
  83. package/dist/components/va-file-input2.js +1 -1
  84. package/dist/components/va-header-minimal.js +1 -1
  85. package/dist/components/va-icon2.js +1 -1
  86. package/dist/components/va-language-toggle.js +1 -1
  87. package/dist/components/va-link-action.js +1 -1
  88. package/dist/components/va-loading-indicator.js +1 -1
  89. package/dist/components/va-maintenance-banner.js +1 -1
  90. package/dist/components/va-memorable-date.js +1 -1
  91. package/dist/components/va-minimal-footer.js +1 -1
  92. package/dist/components/va-need-help.js +1 -1
  93. package/dist/components/va-official-gov-banner2.js +1 -1
  94. package/dist/components/va-omb-info.js +1 -1
  95. package/dist/components/va-on-this-page.js +1 -1
  96. package/dist/components/va-pagination.js +1 -1
  97. package/dist/components/va-privacy-agreement.js +1 -1
  98. package/dist/components/va-process-list-item.js +1 -1
  99. package/dist/components/va-process-list.js +1 -1
  100. package/dist/components/va-progress-bar2.js +1 -1
  101. package/dist/components/va-radio-option.js +1 -1
  102. package/dist/components/va-radio.js +1 -1
  103. package/dist/components/va-search-input.js +1 -1
  104. package/dist/components/va-segmented-progress-bar.js +1 -1
  105. package/dist/components/va-select2.js +1 -1
  106. package/dist/components/va-sidenav-item.js +1 -1
  107. package/dist/components/va-sidenav-submenu.js +1 -1
  108. package/dist/components/va-statement-of-truth.js +1 -1
  109. package/dist/components/va-summary-box.js +1 -1
  110. package/dist/components/va-tab-item.js +1 -1
  111. package/dist/components/va-tab-panel.js +1 -1
  112. package/dist/components/va-table-inner2.js +1 -1
  113. package/dist/components/va-table-row.js +1 -1
  114. package/dist/components/va-table.js +1 -1
  115. package/dist/components/va-tag-status.js +1 -1
  116. package/dist/components/va-telephone-input.js +1 -1
  117. package/dist/components/va-telephone2.js +1 -1
  118. package/dist/components/va-text-input2.js +1 -1
  119. package/dist/components/va-textarea.js +1 -1
  120. package/dist/main.css +1 -1
  121. package/package.json +15 -15
  122. package/src/i18n/translations/en.mjs +12 -1
  123. package/dist/0.app.bundle.js +0 -2
  124. package/dist/12.app.bundle.js +0 -1
  125. package/dist/141.app.bundle.js +0 -2
  126. package/dist/2205.app.bundle.js +0 -1
  127. package/dist/251.app.bundle.js +0 -1
  128. package/dist/272.app.bundle.js +0 -2
  129. package/dist/323.app.bundle.js +0 -2
  130. package/dist/3397.app.bundle.js +0 -1
  131. package/dist/3600.app.bundle.js +0 -1
  132. package/dist/4432.app.bundle.js +0 -2
  133. package/dist/4475.app.bundle.js +0 -1
  134. package/dist/5663.app.bundle.js +0 -2
  135. package/dist/5705.app.bundle.js +0 -2
  136. package/dist/606.app.bundle.js +0 -1
  137. package/dist/6095.app.bundle.js +0 -2
  138. package/dist/6849.app.bundle.js +0 -2
  139. package/dist/9376.app.bundle.js +0 -2
  140. package/dist/9496.app.bundle.js +0 -2
  141. package/dist/9851.app.bundle.js +0 -2
  142. package/dist/components/i18n-setup.js +0 -1
  143. /package/dist/{0.app.bundle.js.LICENSE.txt → 1339.app.bundle.js.LICENSE.txt} +0 -0
  144. /package/dist/{141.app.bundle.js.LICENSE.txt → 2222.app.bundle.js.LICENSE.txt} +0 -0
  145. /package/dist/{1822.app.bundle.js.LICENSE.txt → 2654.app.bundle.js.LICENSE.txt} +0 -0
  146. /package/dist/{1966.app.bundle.js.LICENSE.txt → 2664.app.bundle.js.LICENSE.txt} +0 -0
  147. /package/dist/{272.app.bundle.js.LICENSE.txt → 2801.app.bundle.js.LICENSE.txt} +0 -0
  148. /package/dist/{2923.app.bundle.js.LICENSE.txt → 2858.app.bundle.js.LICENSE.txt} +0 -0
  149. /package/dist/{323.app.bundle.js.LICENSE.txt → 4117.app.bundle.js.LICENSE.txt} +0 -0
  150. /package/dist/{3305.app.bundle.js.LICENSE.txt → 4164.app.bundle.js.LICENSE.txt} +0 -0
  151. /package/dist/{3589.app.bundle.js.LICENSE.txt → 4708.app.bundle.js.LICENSE.txt} +0 -0
  152. /package/dist/{3601.app.bundle.js.LICENSE.txt → 4715.app.bundle.js.LICENSE.txt} +0 -0
  153. /package/dist/{4400.app.bundle.js.LICENSE.txt → 5019.app.bundle.js.LICENSE.txt} +0 -0
  154. /package/dist/{4432.app.bundle.js.LICENSE.txt → 5189.app.bundle.js.LICENSE.txt} +0 -0
  155. /package/dist/{4569.app.bundle.js.LICENSE.txt → 5306.app.bundle.js.LICENSE.txt} +0 -0
  156. /package/dist/{4780.app.bundle.js.LICENSE.txt → 5699.app.bundle.js.LICENSE.txt} +0 -0
  157. /package/dist/{4996.app.bundle.js.LICENSE.txt → 575.app.bundle.js.LICENSE.txt} +0 -0
  158. /package/dist/{5119.app.bundle.js.LICENSE.txt → 5830.app.bundle.js.LICENSE.txt} +0 -0
  159. /package/dist/{5341.app.bundle.js.LICENSE.txt → 6034.app.bundle.js.LICENSE.txt} +0 -0
  160. /package/dist/{5348.app.bundle.js.LICENSE.txt → 6246.app.bundle.js.LICENSE.txt} +0 -0
  161. /package/dist/{5663.app.bundle.js.LICENSE.txt → 6349.app.bundle.js.LICENSE.txt} +0 -0
  162. /package/dist/{5705.app.bundle.js.LICENSE.txt → 6527.app.bundle.js.LICENSE.txt} +0 -0
  163. /package/dist/{5845.app.bundle.js.LICENSE.txt → 6633.app.bundle.js.LICENSE.txt} +0 -0
  164. /package/dist/{5938.app.bundle.js.LICENSE.txt → 6655.app.bundle.js.LICENSE.txt} +0 -0
  165. /package/dist/{5990.app.bundle.js.LICENSE.txt → 6683.app.bundle.js.LICENSE.txt} +0 -0
  166. /package/dist/{6095.app.bundle.js.LICENSE.txt → 6824.app.bundle.js.LICENSE.txt} +0 -0
  167. /package/dist/{6308.app.bundle.js.LICENSE.txt → 712.app.bundle.js.LICENSE.txt} +0 -0
  168. /package/dist/{6650.app.bundle.js.LICENSE.txt → 7367.app.bundle.js.LICENSE.txt} +0 -0
  169. /package/dist/{6849.app.bundle.js.LICENSE.txt → 7814.app.bundle.js.LICENSE.txt} +0 -0
  170. /package/dist/{7166.app.bundle.js.LICENSE.txt → 8175.app.bundle.js.LICENSE.txt} +0 -0
  171. /package/dist/{7307.app.bundle.js.LICENSE.txt → 82.app.bundle.js.LICENSE.txt} +0 -0
  172. /package/dist/{7372.app.bundle.js.LICENSE.txt → 8495.app.bundle.js.LICENSE.txt} +0 -0
  173. /package/dist/{7495.app.bundle.js.LICENSE.txt → 8735.app.bundle.js.LICENSE.txt} +0 -0
  174. /package/dist/{8255.app.bundle.js.LICENSE.txt → 8762.app.bundle.js.LICENSE.txt} +0 -0
  175. /package/dist/{8913.app.bundle.js.LICENSE.txt → 890.app.bundle.js.LICENSE.txt} +0 -0
  176. /package/dist/{8915.app.bundle.js.LICENSE.txt → 9724.app.bundle.js.LICENSE.txt} +0 -0
  177. /package/dist/{9186.app.bundle.js.LICENSE.txt → 9755.app.bundle.js.LICENSE.txt} +0 -0
  178. /package/dist/{9376.app.bundle.js.LICENSE.txt → 9794.app.bundle.js.LICENSE.txt} +0 -0
  179. /package/dist/{9496.app.bundle.js.LICENSE.txt → 9800.app.bundle.js.LICENSE.txt} +0 -0
  180. /package/dist/{9851.app.bundle.js.LICENSE.txt → 9966.app.bundle.js.LICENSE.txt} +0 -0
@@ -5,7 +5,7 @@ object-assign
5
5
  */
6
6
 
7
7
  /*!
8
- Copyright (c) 2018 Jed Watson.
8
+ Copyright (c) 2017 Jed Watson.
9
9
  Licensed under the MIT License (MIT), see
10
10
  http://jedwatson.github.io/classnames
11
11
  */
@@ -1 +1 @@
1
- const contactsMap=Object.freeze({"222_VETS":{phoneNumber:"8772228387",description:"VA Help Line"},"4AID_VET":{phoneNumber:"8774243838",description:"National Call Center for Homeless Veterans"},711:{phoneNumber:"711",description:"Telecommunications Relay Service"},911:{phoneNumber:"911",description:"911"},CAREGIVER:{phoneNumber:"8552603274",description:"VA National Caregiver Support Line"},CRISIS_LINE:{phoneNumber:"8002738255",description:"Veterans Crisis hotline"},CRISIS_TTY:{phoneNumber:"8002738255",description:"Veterans Crisis hotline TTY"},CRISIS_MODAL_TTY:{phoneNumber:"711",extension:"988",description:"Veterans Crisis hotline TTY"},DMC:{phoneNumber:"8008270648",description:"Debt Management Center"},DMC_OVERSEAS:{phoneNumber:"6127136415",description:"Debt Management Center (Overseas)"},DMDC_DEERS:{phoneNumber:"8663632883",description:"Defense Manpower Data Center (DMDC) | Defense Enrollment Eligibility Reporting System (DEERS) Support Office"},DS_LOGON:{phoneNumber:"8005389552",description:"Defense Manpower Data Center"},DS_LOGON_TTY:{phoneNumber:"8663632883",description:"Defense Manpower Data Center TTY"},FEDERAL_RELAY_SERVICE:{phoneNumber:"8008778339",description:"Federal Relay Service"},GI_BILL:{phoneNumber:"8884424551",description:"Education Call Center (1-888-GI-BILL-1)"},GO_DIRECT:{phoneNumber:"8003331795",description:"Go Direct/Direct Express (Treasury)"},HELP_DESK:{phoneNumber:"8006982411",description:"VA Help desk"},HEALTH_RESOURCE_CENTER:{phoneNumber:"8664001238",description:"Health Resource Center"},HEALTHCARE_ELIGIBILITY_CENTER:{phoneNumber:"8554888440",description:"VA Healthcare Eligibility Center (Eligibility Division)"},HELP_TTY:{phoneNumber:"8008778339",description:"VA Help Desk TTY"},MY_HEALTHEVET:{phoneNumber:"8773270022",description:"My HealtheVet help desk"},NCA:{phoneNumber:"8005351117",description:"National Cemetery Scheduling Office"},SUICIDE_PREVENTION_LIFELINE:{phoneNumber:"8007994889",description:"Suicide Prevention Line"},TESC:{phoneNumber:"8882242950",description:"U.S. Treasury Electronic Payment Solution Center"},TREASURY_DMS:{phoneNumber:"8888263127",description:"U.S. Department of the Treasury (Debt Management Services)"},VA_311:{phoneNumber:"8006982411",description:"VA Help desk (VA411)"},VA_411:{phoneNumber:"8006982411",description:"VA Help desk (VA411)"},VA_BENEFITS:{phoneNumber:"8008271000",description:"Veterans Benefits Assistance"}}),CONTACTS=Object.freeze(Object.entries(contactsMap).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n[0]]:n[1].phoneNumber})),{})),CONTACTS_WITH_EXTENSION=Object.freeze(Object.entries(contactsMap).reduce(((e,[n,r])=>Object.assign(Object.assign({},e),{[n]:r.extension?{phoneNumber:r.phoneNumber,extension:r.extension}:{phoneNumber:r.phoneNumber}})),{}));export{CONTACTS as C,CONTACTS_WITH_EXTENSION as a,contactsMap as c};
1
+ import{i as instance}from"./i18next.js";const{slice:slice,forEach:forEach}=[];function defaults(e){return forEach.call(slice.call(arguments,1),(t=>{if(t)for(const a in t)void 0===e[a]&&(e[a]=t[a])})),e}function hasXSS(e){return"string"==typeof e&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some((t=>t.test(e)))}const fieldContentRegExp=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,serializeCookie=function(e,t){const a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let o=`${e}=${encodeURIComponent(t)}`;if(a.maxAge>0){const e=a.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(e)}`}if(a.domain){if(!fieldContentRegExp.test(a.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${a.domain}`}if(a.path){if(!fieldContentRegExp.test(a.path))throw new TypeError("option path is invalid");o+=`; Path=${a.path}`}if(a.expires){if("function"!=typeof a.expires.toUTCString)throw new TypeError("option expires is invalid");o+=`; Expires=${a.expires.toUTCString()}`}if(a.httpOnly&&(o+="; HttpOnly"),a.secure&&(o+="; Secure"),a.sameSite)switch("string"==typeof a.sameSite?a.sameSite.toLowerCase():a.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a.partitioned&&(o+="; Partitioned"),o},cookie={create(e,t,a,o){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};a&&(n.expires=new Date,n.expires.setTime(n.expires.getTime()+60*a*1e3)),o&&(n.domain=o),document.cookie=serializeCookie(e,t,n)},read(e){const t=`${e}=`,a=document.cookie.split(";");for(let e=0;e<a.length;e++){let o=a[e];for(;" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var cookie$1={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return cookie.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:a,cookieMinutes:o,cookieDomain:n,cookieOptions:i}=t;a&&"undefined"!=typeof document&&cookie.create(a,e,o,n,i)}},querystring={name:"querystring",lookup(e){let t,{lookupQuerystring:a}=e;if("undefined"!=typeof window){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const o=e.substring(1).split("&");for(let e=0;e<o.length;e++){const n=o[e].indexOf("=");n>0&&o[e].substring(0,n)===a&&(t=o[e].substring(n+1))}}return t}},hash={name:"hash",lookup(e){let t,{lookupHash:a,lookupFromHashIndex:o}=e;if("undefined"!=typeof window){const{hash:e}=window.location;if(e&&e.length>2){const n=e.substring(1);if(a){const e=n.split("&");for(let o=0;o<e.length;o++){const n=e[o].indexOf("=");n>0&&e[o].substring(0,n)===a&&(t=e[o].substring(n+1))}}if(t)return t;if(!t&&o>-1){const t=e.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(t))return;const a="number"==typeof o?o:0;return t[a]?.replace("/","")}}}return t}};let hasLocalStorageSupport=null;const localStorageAvailable=()=>{if(null!==hasLocalStorageSupport)return hasLocalStorageSupport;try{if(hasLocalStorageSupport="undefined"!=typeof window&&null!==window.localStorage,!hasLocalStorageSupport)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){hasLocalStorageSupport=!1}return hasLocalStorageSupport};var localStorage={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&localStorageAvailable())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:a}=t;a&&localStorageAvailable()&&window.localStorage.setItem(a,e)}};let hasSessionStorageSupport=null;const sessionStorageAvailable=()=>{if(null!==hasSessionStorageSupport)return hasSessionStorageSupport;try{if(hasSessionStorageSupport="undefined"!=typeof window&&null!==window.sessionStorage,!hasSessionStorageSupport)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){hasSessionStorageSupport=!1}return hasSessionStorageSupport};var sessionStorage={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&sessionStorageAvailable())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:a}=t;a&&sessionStorageAvailable()&&window.sessionStorage.setItem(a,e)}},navigator$1={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:a,language:o}=navigator;if(e)for(let a=0;a<e.length;a++)t.push(e[a]);a&&t.push(a),o&&t.push(o)}return t.length>0?t:void 0}},htmlTag={name:"htmlTag",lookup(e){let t,{htmlTag:a}=e;const o=a||("undefined"!=typeof document?document.documentElement:null);return o&&"function"==typeof o.getAttribute&&(t=o.getAttribute("lang")),t}},path={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const a=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(a))return;const o="number"==typeof t?t:0;return a[o]?.replace("/","")}},subdomain={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const a="number"==typeof t?t+1:1,o="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(o)return o[a]}};let canCookies=!1;try{canCookies=!0}catch(e){}const order=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];canCookies||order.splice(1,1);const getDefaults=()=>({order:order,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Browser{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=defaults(t,this.options||{},getDefaults()),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=a,this.addDetector(cookie$1),this.addDetector(querystring),this.addDetector(localStorage),this.addDetector(sessionStorage),this.addDetector(navigator$1),this.addDetector(htmlTag),this.addDetector(path),this.addDetector(subdomain),this.addDetector(hash)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach((e=>{if(this.detectors[e]){let a=this.detectors[e].lookup(this.options);a&&"string"==typeof a&&(a=[a]),a&&(t=t.concat(a))}})),t=t.filter((e=>null!=e&&!hasXSS(e))).map((e=>this.options.convertDetectedLanguage(e))),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)})))}}Browser.type="languageDetector";const mainTag={name:"mainTag",lookup(e){const t=document.querySelector("main");return t?.getAttribute("lang")}},enTranslation={error:"Error",required:"(*Required)",select:"- Select -","max-chars":"(Max. {{length}} characters)","min-chars":"(Min. {{length}} characters)","date-of-birth":"Date of birth",month:"Month",day:"Day",year:"Year","month-select":"Please select a month","month-range":"Please enter a month between {{start}} and {{end}}","day-range":"Please enter a day between {{start}} and {{end}}","year-range":"Please enter a year between {{start}} and {{end}}","expand-all":"Expand all","collapse-all":"Collapse all","expand-all-aria-label":"Expand all accordions","collapse-all-aria-label":"Collapse all accordions",january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December","on-this-page":"On this page","date-hint":"Enter 1 or 2 digits for the month and day and 4 digits for the year.","date-hint-with-select":"Select a month. Enter 1 or 2 digits for the day and 4 digits for the year.","date-hint-month":"Enter 1 or 2 digits for the month.","date-hint-month-select":"Select a month.","date-hint-day":"Enter 1 or 2 digits for the day.","date-hint-year":"Enter 4 digits for the year.","date-error":"Please enter a complete date","number-error":"Please enter a valid number","gov-site-label":"Official website of the United States government","gov-site-button":"Here's how you know","gov-site-website":"Official websites use .{{tld}}","gov-site-explanation":"A .{{tld}} website belongs to an official government organization in the United States.","gov-site-https":"Secure .{{tld}} websites use HTTPS","gov-site-lock":"A lock {{image}} or https:// means you've safely connected to the .{{tld}} website. Share sensitive information only on official, secure websites.",next:"Next",previous:"Previous","crisis-line-trigger-text":"Talk to the <strong>Veterans Crisis Line</strong> now","crisis-line-modal-title":"We’re here anytime, day or night – 24/7","crisis-line-intro":"If you are a Veteran in crisis or concerned about one, connect with our caring, qualified responders for confidential help. Many of them are Veterans themselves.","crisis-line-phone-label":"Call","crisis-line-phone-extension-label":"and select","crisis-line-text-label":"Text","crisis-line-chat-label":"Start a confidential chat","crisis-line-tty-label":"For TTY, call","crisis-line-tty-extension-label":"then","crisis-line-resources-link-label":"Get more resources at","crisis-line-resources-link-text":"VeteransCrisisLine.net"},esTranslation={error:"Error",required:"(*Requerido)",select:"- Seleccione -","max-chars":"(Número máximo de caracteres: {{length}})","min-chars":"(Número mínimo de caracteres: {{length}})","date-of-birth":"Fecha de nacimiento",month:"Mes",day:"Día",year:"Año","month-range":"Ingrese un mes entre {{start}} y {{end}}","day-range":"Ingrese un día entre {{start}} y {{end}}","year-range":"Ingrese un año entre {{start}} y {{end}}","expand-all":"Expandir todo","collapse-all":"Contraer todo","expand-all-aria-label":"Expandir todos los acordeones","collapse-all-aria-label":"Contraer todos los acordeones",january:"Enero",february:"Febrero",march:"Marzo",april:"Abril",may:"Mayo",june:"Junio",july:"Julio",august:"Agosto",september:"Septiembre",october:"Octubre",november:"Noviembre",december:"Diciembre","on-this-page":"En esta página","date-hint":"Ingrese 1 o 2 dígitos para el mes y el día y 4 dígitos para el año.","date-hint-with-select":"Seleccione un mes. Ingrese 1 o 2 dígitos para el día y 4 dígitos para el año.","date-hint-month":"Ingrese 1 o 2 dígitos para el mes.","date-hint-month-select":"Seleccione un mes.","date-hint-day":"Ingrese 1 o 2 dígitos para el día.","date-hint-year":"Ingrese 4 dígitos para el año.","date-error":"Ingrese una fecha completa","gov-site-label":"Un sitio oficial del Gobierno de Estados Unidos","gov-site-button":"Así es como usted puede verificarlo","gov-site-website":"Los sitios web oficiales usan .{{tld}}","gov-site-explanation":"Un sitio web .{{tld}} pertenece a una organización oficial del Gobierno de Estados Unidos.","gov-site-https":"Los sitios web seguros .{{tld}} usan HTTPS","gov-site-lock":"Un candado {{image}} o https:// significa que usted se conectó de forma segura a un sitio web .{{tld}}. Comparta información sensible sólo en sitios web oficiales y seguros.",next:"Siguiente",previous:"Anterior"},tlTranslation={error:"Error",required:"(*Kailangan)","max-chars":"(Pinakamarami ang {{length}} karakter)","min-chars":"(Pinakamababa ang {{length}} karakter)","date-of-birth":"Petsa ng Kapanganakan",month:"Buwan",day:"Araw",year:"Taon","month-range":"Mangyaring ilagay ang buwan sa pagitan ng {{start}} at {{end}}","day-range":"Mangyaring ilagay ang araw sa pagitan ng {{start}} at {{end}}","year-range":"Mangyaring ilagay ang taon sa pagitan ng {{start}} at {{end}}","expand-all":"I-expand lahat","collapse-all":"I-collapse ang lahat","expand-all-aria-label":"I-expand ang lahat ng accordion","collapse-all-aria-label":"I-collapse ang lahat ng accordion","on-this-page":"Sa pahinang ito","date-hint":"Maglagay ng 1 o 2 numero para sa buwan at araw, at 4 na numero para sa taon.","date-hint-with-select":"Pumili ng buwan. Maglagay ng 1 o 2 numero para sa araw, at 4 na numero para sa taon.","date-hint-month":"Maglagay ng 1 o 2 numero para sa buwan.","date-hint-month-select":"Pumili ng buwan.","date-hint-day":"Maglagay ng 1 o 2 numero para sa araw.","date-hint-year":"Maglagay ng 4 na numero para sa taon.","date-error":"Mangyaring maglagay ng kumpletong petsa"},languageDetector=new Browser;languageDetector.addDetector(mainTag),instance.use(languageDetector).init({fallbackLng:"en",detection:{order:["mainTag","htmlTag"]},resources:{en:{translation:enTranslation},es:{translation:esTranslation},tl:{translation:tlTranslation}}}),window.addEventListener("load",(e=>{console.log("DOM fully loaded and parsed");const t=document.querySelector("main");if(t){const e=t.getAttribute("lang");e&&instance.changeLanguage(e),new MutationObserver((e=>{e.forEach((e=>{"attributes"===e.type&&"lang"===e.attributeName&&instance.changeLanguage(t.getAttribute("lang"))}))})).observe(t,{attributes:!0})}}));const contactsMap=Object.freeze({"222_VETS":{phoneNumber:"8772228387",description:"VA Help Line"},"4AID_VET":{phoneNumber:"8774243838",description:"National Call Center for Homeless Veterans"},711:{phoneNumber:"711",description:"Telecommunications Relay Service"},911:{phoneNumber:"911",description:"911"},CAREGIVER:{phoneNumber:"8552603274",description:"VA National Caregiver Support Line"},CRISIS_LINE:{phoneNumber:"8002738255",description:"Veterans Crisis hotline"},CRISIS_TTY:{phoneNumber:"8002738255",description:"Veterans Crisis hotline TTY"},CRISIS_MODAL_TTY:{phoneNumber:"711",extension:"988",description:"Veterans Crisis hotline TTY"},DMC:{phoneNumber:"8008270648",description:"Debt Management Center"},DMC_OVERSEAS:{phoneNumber:"6127136415",description:"Debt Management Center (Overseas)"},DMDC_DEERS:{phoneNumber:"8663632883",description:"Defense Manpower Data Center (DMDC) | Defense Enrollment Eligibility Reporting System (DEERS) Support Office"},DS_LOGON:{phoneNumber:"8005389552",description:"Defense Manpower Data Center"},DS_LOGON_TTY:{phoneNumber:"8663632883",description:"Defense Manpower Data Center TTY"},FEDERAL_RELAY_SERVICE:{phoneNumber:"8008778339",description:"Federal Relay Service"},GI_BILL:{phoneNumber:"8884424551",description:"Education Call Center (1-888-GI-BILL-1)"},GO_DIRECT:{phoneNumber:"8003331795",description:"Go Direct/Direct Express (Treasury)"},HELP_DESK:{phoneNumber:"8006982411",description:"VA Help desk"},HEALTH_RESOURCE_CENTER:{phoneNumber:"8664001238",description:"Health Resource Center"},HEALTHCARE_ELIGIBILITY_CENTER:{phoneNumber:"8554888440",description:"VA Healthcare Eligibility Center (Eligibility Division)"},HELP_TTY:{phoneNumber:"8008778339",description:"VA Help Desk TTY"},MY_HEALTHEVET:{phoneNumber:"8773270022",description:"My HealtheVet help desk"},NCA:{phoneNumber:"8005351117",description:"National Cemetery Scheduling Office"},SUICIDE_PREVENTION_LIFELINE:{phoneNumber:"8007994889",description:"Suicide Prevention Line"},TESC:{phoneNumber:"8882242950",description:"U.S. Treasury Electronic Payment Solution Center"},TREASURY_DMS:{phoneNumber:"8888263127",description:"U.S. Department of the Treasury (Debt Management Services)"},VA_311:{phoneNumber:"8006982411",description:"VA Help desk (VA411)"},VA_411:{phoneNumber:"8006982411",description:"VA Help desk (VA411)"},VA_BENEFITS:{phoneNumber:"8008271000",description:"Veterans Benefits Assistance"}}),CONTACTS=Object.freeze(Object.entries(contactsMap).reduce(((e,t)=>Object.assign(Object.assign({},e),{[t[0]]:t[1].phoneNumber})),{})),CONTACTS_WITH_EXTENSION=Object.freeze(Object.entries(contactsMap).reduce(((e,[t,a])=>Object.assign(Object.assign({},e),{[t]:a.extension?{phoneNumber:a.phoneNumber,extension:a.extension}:{phoneNumber:a.phoneNumber}})),{}));export{CONTACTS as C,CONTACTS_WITH_EXTENSION as a,contactsMap as c};
@@ -1 +1 @@
1
- function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function toPropertyKey(e){var t=toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,toPropertyKey(r.key),r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _defineProperty(e,t,n){return(t=toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toArray(e){return _arrayWithHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableRest()}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var consoleLogger={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},Logger=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,e),this.init(t,n)}return _createClass(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||consoleLogger,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,_objectSpread(_objectSpread({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}}]),e}(),baseLogger=new Logger,EventEmitter=function(){function e(){_classCallCheck(this,e),this.observers={}}return _createClass(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function defer(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function makeString(e){return null==e?"":""+e}function copy(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function getLastOfPath(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function setPath(e,t,n){var r=getLastOfPath(e,t,Object);r.obj[r.k]=n}function pushPath(e,t,n,r){var o=getLastOfPath(e,t,Object),i=o.obj,a=o.k;i[a]=i[a]||[],r&&(i[a]=i[a].concat(n)),r||i[a].push(n)}function getPath(e,t){var n=getLastOfPath(e,t),r=n.obj,o=n.k;if(r)return r[o]}function getPathWithDefaults(e,t,n){var r=getPath(e,n);return void 0!==r?r:getPath(t,n)}function deepExtend(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):deepExtend(e[r],t[r],n):e[r]=t[r]);return e}function regexEscape(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var _entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function escape(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return _entityMap[e]})):e}var isIE10="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,chars=[" ",",","?","!",";"];function looksLikeObjectPath(e,t,n){t=t||"",n=n||"";var r=chars.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var o=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}function ownKeys$1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread$1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$1(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$1(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var n,r=_getPrototypeOf(e);if(t){var o=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function deepFind(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,i=0;i<r.length;++i){if(!o)return;if("string"==typeof o[r[i]]&&i+1<r.length)return;if(void 0===o[r[i]]){for(var a=2,s=r.slice(i,i+a).join(n),c=o[s];void 0===c&&r.length>i+a;)a++,c=o[s=r.slice(i,i+a).join(n)];if(void 0===c)return;if(t.endsWith(s)){if("string"==typeof c)return c;if(s&&"string"==typeof c[s])return c[s]}var u=r.slice(i+a).join(n);return u?deepFind(c,u,n):void 0}o=o[r[i]]}return o}}var ResourceStore=function(){_inherits(t,EventEmitter);var e=_createSuper(t);function t(n){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return _classCallCheck(this,t),r=e.call(this),isIE10&&EventEmitter.call(_assertThisInitialized(r)),r.data=n||{},r.options=o,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return _createClass(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));var s=getPath(this.data,a);return s||!i||"string"!=typeof n?s:deepFind(this.data&&this.data[e]&&this.data[e][t],n,o)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),setPath(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=getPath(this.data,a)||{};r?deepExtend(s,n,o):s=_objectSpread$1(_objectSpread$1({},s),n),setPath(this.data,a,s),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?_objectSpread$1(_objectSpread$1({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),t}(),postProcessor={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}};function ownKeys$2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread$2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$2(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$2(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _createSuper$1(e){var t=_isNativeReflectConstruct$1();return function(){var n,r=_getPrototypeOf(e);if(t){var o=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$1(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var checkedLoadedFor={},Translator=function(){_inherits(t,EventEmitter);var e=_createSuper$1(t);function t(n){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _classCallCheck(this,t),r=e.call(this),isIE10&&EventEmitter.call(_assertThisInitialized(r)),copy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,_assertThisInitialized(r)),r.options=o,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=baseLogger.create("translator"),r}return _createClass(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||looksLikeObjectPath(e,n,r));if(i&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var c=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),e=c.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,r){var o=this;if("object"!==_typeof(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],n),s=a.key,c=a.namespaces,u=c[c.length-1],l=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(p){var f=n.nsSeparator||this.options.nsSeparator;return u+f+s}return s}var g=this.resolve(e,n),h=g&&g.res,d=g&&g.usedKey||s,y=g&&g.exactUsedKey||s,v=Object.prototype.toString.apply(h),b=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&h&&"string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h&&["[object Number]","[object Function]","[object RegExp]"].indexOf(v)<0&&("string"!=typeof b||"[object Array]"!==v)){if(!n.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,h,_objectSpread$2(_objectSpread$2({},n),{},{ns:c})):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(i){var O="[object Array]"===v,k=O?[]:{},S=O?y:d;for(var j in h)if(Object.prototype.hasOwnProperty.call(h,j)){var w="".concat(S).concat(i).concat(j);k[j]=this.translate(w,_objectSpread$2(_objectSpread$2({},n),{joinArrays:!1,ns:c})),k[j]===w&&(k[j]=h[j])}h=k}}else if(m&&"string"==typeof b&&"[object Array]"===v)(h=h.join(b))&&(h=this.extendTranslation(h,e,n,r));else{var P=!1,x=!1,_=void 0!==n.count&&"string"!=typeof n.count,L=t.hasDefaultValue(n),C=_?this.pluralResolver.getSuffix(l,n.count,n):"",R=n["defaultValue".concat(C)]||n.defaultValue;!this.isValidLookup(h)&&L&&(P=!0,h=R),this.isValidLookup(h)||(x=!0,h=s);var E=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&x?void 0:h,N=L&&R!==h&&this.options.updateMissing;if(x||P||N){if(this.logger.log(N?"updateKey":"missingKey",l,u,s,N?R:h),i){var $=this.resolve(s,_objectSpread$2(_objectSpread$2({},n),{},{keySeparator:!1}));$&&$.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var I=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var D=0;D<F.length;D++)I.push(F[D]);else"all"===this.options.saveMissingTo?I=this.languageUtils.toResolveHierarchy(n.lng||this.language):I.push(n.lng||this.language);var T=function(e,t,r){var i=L&&r!==h?r:E;o.options.missingKeyHandler?o.options.missingKeyHandler(e,u,t,i,N,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,u,t,i,N,n),o.emit("missingKey",e,u,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?I.forEach((function(e){o.pluralResolver.getSuffixes(e,n).forEach((function(t){T([e],s+t,n["defaultValue".concat(t)]||R)}))})):T(I,s,R))}h=this.extendTranslation(h,e,n,g,r),x&&h===s&&this.options.appendNamespaceToMissingKey&&(h="".concat(u,":").concat(s)),(x||P)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(s,P?h:void 0):this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(_objectSpread$2(_objectSpread$2({},n),{interpolation:_objectSpread$2(_objectSpread$2({},this.options.interpolation),n.interpolation)}));var a,s="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var c=e.match(this.interpolator.nestingRegexp);a=c&&c.length}var u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u=_objectSpread$2(_objectSpread$2({},this.options.interpolation.defaultVariables),u)),e=this.interpolator.interpolate(e,u,n.lng||this.language,n),s){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var p=n.postProcess||this.options.postProcess,f="string"==typeof p?[p]:p;return null!=e&&f&&f.length&&!1!==n.applyPostProcessor&&(e=postProcessor.handle(f,e,t,this.options&&this.options.postProcessPassResolved?_objectSpread$2({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var c=a.extractFromKey(e,s),u=c.key;n=u;var l=c.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var p=void 0!==s.count&&"string"!=typeof s.count,f=p&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),g=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,h=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!checkedLoadedFor["".concat(h[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(checkedLoadedFor["".concat(h[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(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!!!")),h.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,c=[u];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(c,u,n,e,s);else{var l;p&&(l=a.pluralResolver.getSuffix(n,s.count,s));var h="_zero";if(p&&(c.push(u+l),f&&c.push(u+h)),g){var d="".concat(u).concat(a.options.contextSeparator).concat(s.context);c.push(d),p&&(c.push(d+l),f&&c.push(d+h))}}for(;i=c.pop();)a.isValidLookup(t)||(r=i,t=a.getResource(n,e,i,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}]),t}();function capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}var LanguageUtil=function(){function e(t){_classCallCheck(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=baseLogger.create("languageUtils")}return _createClass(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=capitalize(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=capitalize(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=capitalize(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),sets=[{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}],_rulesPluralsTypes={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},deprecatedJsonVersions=["v1","v2","v3"],suffixesOrder={zero:0,one:1,two:2,few:3,many:4,other:5};function createRules(){var e={};return sets.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:_rulesPluralsTypes[t.fc]}}))})),e}var PluralResolver=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,e),this.languageUtils=t,this.options=n,this.logger=baseLogger.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==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=createRules()}return _createClass(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return suffixesOrder[e]-suffixesOrder[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!deprecatedJsonVersions.includes(this.options.compatibilityJSON)}}]),e}();function ownKeys$3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread$3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$3(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Interpolator=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,e),this.logger=baseLogger.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return _createClass(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:escape,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?regexEscape(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?regexEscape(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?regexEscape(t.nestingPrefix):t.nestingPrefixEscaped||regexEscape("$t("),this.nestingSuffix=t.nestingSuffix?regexEscape(t.nestingSuffix):t.nestingSuffixEscaped||regexEscape(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(s.formatSeparator)<0){var o=getPathWithDefaults(t,c,e);return s.alwaysFormat?s.format(o,void 0,n,_objectSpread$3(_objectSpread$3(_objectSpread$3({},r),t),{},{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),u=i.join(s.formatSeparator).trim();return s.format(getPathWithDefaults(t,c,a),u,n,_objectSpread$3(_objectSpread$3(_objectSpread$3({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var p=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?u(s.escape(e)):u(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){var n=o[1].trim();if(void 0===(i=l(n)))if("function"==typeof p){var c=p(e,o,r);i="string"==typeof c?c:""}else if(r&&r.hasOwnProperty(n))i="";else{if(f){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=makeString(i));var u=t.safeValue(i);if(e=e.replace(o[0],u),f?(t.regex.lastIndex+=u.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=_objectSpread$3({},i);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,a)).replace(/'/g,'"');try{a=JSON.parse(o),t&&(a=_objectSpread$3(_objectSpread$3({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=l.shift(),c=l,u=!0}if((r=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=makeString(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),u&&(r=c.reduce((function(e,t){return o.format(e,t,i.lng,_objectSpread$3(_objectSpread$3({},i),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function ownKeys$4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread$4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$4(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$4(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function parseFormatStr(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((function(e){if(e){var t=_toArray(e.split(":")),r=t[0],o=t.slice(1).join(":");n[r.trim()]||(n[r.trim()]=o.trim()),"false"===o.trim()&&(n[r.trim()]=!1),"true"===o.trim()&&(n[r.trim()]=!0),isNaN(o.trim())||(n[r.trim()]=parseInt(o.trim(),10))}}))}return{formatName:t,formatOptions:n}}var Formatter=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,e),this.logger=baseLogger.create("formatter"),this.options=t,this.formats={number:function(e,t,n){return new Intl.NumberFormat(t,n).format(e)},currency:function(e,t,n){return new Intl.NumberFormat(t,_objectSpread$4(_objectSpread$4({},n),{},{style:"currency"})).format(e)},datetime:function(e,t,n){return new Intl.DateTimeFormat(t,_objectSpread$4({},n)).format(e)},relativetime:function(e,t,n){return new Intl.RelativeTimeFormat(t,_objectSpread$4({},n)).format(e,n.range||"day")},list:function(e,t,n){return new Intl.ListFormat(t,_objectSpread$4({},n)).format(e)}},this.init(t)}return _createClass(e,[{key:"init",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"format",value:function(e,t,n,r){var o=this;return t.split(this.formatSeparator).reduce((function(e,t){var i=parseFormatStr(t),a=i.formatName,s=i.formatOptions;if(o.formats[a]){var c=e;try{var u=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},l=u.locale||u.lng||r.locale||r.lng||n;c=o.formats[a](e,l,_objectSpread$4(_objectSpread$4(_objectSpread$4({},s),r),u))}catch(e){o.logger.warn(e)}return c}return o.logger.warn("there was no format function for ".concat(a)),e}),e)}}]),e}();function ownKeys$5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread$5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$5(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _createSuper$2(e){var t=_isNativeReflectConstruct$2();return function(){var n,r=_getPrototypeOf(e);if(t){var o=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$2(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function remove(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}var Connector=function(){_inherits(t,EventEmitter);var e=_createSuper$2(t);function t(n,r,o){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return _classCallCheck(this,t),i=e.call(this),isIE10&&EventEmitter.call(_assertThisInitialized(i)),i.backend=n,i.store=r,i.services=o,i.languageUtils=o.languageUtils,i.options=a,i.logger=baseLogger.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(o,a.backend,a),i}return _createClass(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],s=[],c=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),c.indexOf(t)<0&&c.push(t)))})),r||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:c}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){pushPath(n.loaded,[o],i),remove(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,c){s&&c&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,c)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(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!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,_objectSpread$5(_objectSpread$5({},i),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}();function get(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var 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])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function transformOptions(e){return"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&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function ownKeys$6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread$6(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$6(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$6(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _createSuper$3(e){var t=_isNativeReflectConstruct$3();return function(){var n,r=_getPrototypeOf(e);if(t){var o=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$3(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function noop(){}function bindMemberFunctions(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}))}var I18n=function(){_inherits(t,EventEmitter);var e=_createSuper$3(t);function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(_classCallCheck(this,t),n=e.call(this),isIE10&&EventEmitter.call(_assertThisInitialized(n)),n.options=transformOptions(r),n.services={},n.logger=baseLogger,n.modules={external:[]},bindMemberFunctions(_assertThisInitialized(n)),o&&!n.isInitialized&&!r.isClone){if(!n.options.initImmediate)return n.init(r,o),_possibleConstructorReturn(n,_assertThisInitialized(n));setTimeout((function(){n.init(r,o)}),0)}return n}return _createClass(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r=get();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=_objectSpread$6(_objectSpread$6(_objectSpread$6({},r),this.options),transformOptions(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=_objectSpread$6(_objectSpread$6({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var i;this.modules.logger?baseLogger.init(o(this.modules.logger),this.options):baseLogger.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"undefined"!=typeof Intl&&(i=Formatter);var a=new LanguageUtil(this.options);this.store=new ResourceStore(this.options.resources,this.options);var s=this.services;s.logger=baseLogger,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new PluralResolver(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!i||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(s.formatter=o(i),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new Interpolator(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new Connector(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new Translator(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,n||(n=noop),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&"dev"!==c[0]&&(this.options.lng=c[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var u=defer(),l=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),u}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:noop,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var o=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};r?i(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)})),this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)}))}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=defer();return e||(e=this.languages),t||(t=this.options.ns),n||(n=noop),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"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&&postProcessor.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=defer();this.emit("languageChanging",e);var o=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},i=function(i){e||i||!n.services.languageDetector||(i=[]);var a="string"==typeof i?i:n.services.languageUtils.getBestMatchFromCodes(i);a&&(n.language||o(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,(function(e){!function(e,i){i?(o(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,o=function e(t,o){var i;if("object"!==_typeof(o)){for(var a=arguments.length,s=new Array(a>2?a-2:0),c=2;c<a;c++)s[c-2]=arguments[c];i=r.options.overloadTranslationOptionHandler([t,o].concat(s))}else i=_objectSpread$6({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns;var u=r.options.keySeparator||".",l=n?"".concat(n).concat(u).concat(t):t;return r.t(l,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=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;var r=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=defer();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=defer();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e?["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(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:noop,o=_objectSpread$6(_objectSpread$6(_objectSpread$6({},this.options),n),{isClone:!0}),i=new t(o);return["store","services","language"].forEach((function(t){i[t]=e[t]})),i.services=_objectSpread$6({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new Translator(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit.apply(i,[e].concat(n))})),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),t}();_defineProperty(I18n,"createInstance",(function(){return new I18n(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}));var instance=I18n.createInstance();instance.createInstance=I18n.createInstance;export{_createClass as _,_classCallCheck as a,instance as i};
1
+ const isString=e=>"string"==typeof e,defer=()=>{let e,t;const s=new Promise(((s,i)=>{e=s,t=i}));return s.resolve=e,s.reject=t,s},makeString=e=>null==e?"":""+e,copy=(e,t,s)=>{e.forEach((e=>{t[e]&&(s[e]=t[e])}))},lastOfPathSeparatorRegExp=/###/g,cleanKey=e=>e&&e.indexOf("###")>-1?e.replace(lastOfPathSeparatorRegExp,"."):e,canNotTraverseDeeper=e=>!e||isString(e),getLastOfPath=(e,t,s)=>{const i=isString(t)?t.split("."):t;let o=0;for(;o<i.length-1;){if(canNotTraverseDeeper(e))return{};const t=cleanKey(i[o]);!e[t]&&s&&(e[t]=new s),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return canNotTraverseDeeper(e)?{}:{obj:e,k:cleanKey(i[o])}},setPath=(e,t,s)=>{const{obj:i,k:o}=getLastOfPath(e,t,Object);if(void 0!==i||1===t.length)return void(i[o]=s);let r=t[t.length-1],n=t.slice(0,t.length-1),a=getLastOfPath(e,n,Object);for(;void 0===a.obj&&n.length;)r=`${n[n.length-1]}.${r}`,n=n.slice(0,n.length-1),a=getLastOfPath(e,n,Object),a?.obj&&void 0!==a.obj[`${a.k}.${r}`]&&(a.obj=void 0);a.obj[`${a.k}.${r}`]=s},pushPath=(e,t,s,i)=>{const{obj:o,k:r}=getLastOfPath(e,t,Object);o[r]=o[r]||[],o[r].push(s)},getPath=(e,t)=>{const{obj:s,k:i}=getLastOfPath(e,t);if(s&&Object.prototype.hasOwnProperty.call(s,i))return s[i]},getPathWithDefaults=(e,t,s)=>{const i=getPath(e,s);return void 0!==i?i:getPath(t,s)},deepExtend=(e,t,s)=>{for(const i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?isString(e[i])||e[i]instanceof String||isString(t[i])||t[i]instanceof String?s&&(e[i]=t[i]):deepExtend(e[i],t[i],s):e[i]=t[i]);return e},regexEscape=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const escape=e=>isString(e)?e.replace(/[&<>"'\/]/g,(e=>_entityMap[e])):e;class RegExpCache{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const chars=[" ",",","?","!",";"],looksLikeObjectPathRegExpCache=new RegExpCache(20),looksLikeObjectPath=(e,t,s)=>{t=t||"",s=s||"";const i=chars.filter((e=>t.indexOf(e)<0&&s.indexOf(e)<0));if(0===i.length)return!0;const o=looksLikeObjectPathRegExpCache.getRegExp(`(${i.map((e=>"?"===e?"\\?":e)).join("|")})`);let r=!o.test(e);if(!r){const t=e.indexOf(s);t>0&&!o.test(e.substring(0,t))&&(r=!0)}return r},deepFind=(e,t,s=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const i=t.split(s);let o=e;for(let e=0;e<i.length;){if(!o||"object"!=typeof o)return;let t,r="";for(let n=e;n<i.length;++n)if(n!==e&&(r+=s),r+=i[n],t=o[r],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&n<i.length-1)continue;e+=n-e+1;break}o=t}return o},getCleanedCode=e=>e?.replace("_","-"),consoleLogger={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Logger{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||consoleLogger,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,i){return i&&!this.debug?null:(isString(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Logger(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Logger(this.logger,e)}}var baseLogger=new Logger;class EventEmitter{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const s=this.observers[e].get(t)||0;this.observers[e].set(t,s+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach((([e,s])=>{for(let i=0;i<s;i++)e(...t)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((([s,i])=>{for(let o=0;o<i;o++)s.apply(s,[e,...t])}))}}class ResourceStore extends EventEmitter{constructor(e,t={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)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s,i={}){const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,r=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let n;e.indexOf(".")>-1?n=e.split("."):(n=[e,t],s&&(Array.isArray(s)?n.push(...s):isString(s)&&o?n.push(...s.split(o)):n.push(s)));const a=getPath(this.data,n);return!a&&!t&&!s&&e.indexOf(".")>-1&&(e=n[0],t=n[1],s=n.slice(2).join(".")),!a&&r&&isString(s)?deepFind(this.data?.[e]?.[t],s,o):a}addResource(e,t,s,i,o={silent:!1}){const r=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let n=[e,t];s&&(n=n.concat(r?s.split(r):s)),e.indexOf(".")>-1&&(n=e.split("."),i=t,t=n[1]),this.addNamespaces(t),setPath(this.data,n,i),o.silent||this.emit("added",e,t,s,i)}addResources(e,t,s,i={silent:!1}){for(const i in s)(isString(s[i])||Array.isArray(s[i]))&&this.addResource(e,t,i,s[i],{silent:!0});i.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,o,r={silent:!1,skipCopy:!1}){let n=[e,t];e.indexOf(".")>-1&&(n=e.split("."),i=s,s=t,t=n[1]),this.addNamespaces(t);let a=getPath(this.data,n)||{};r.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?deepExtend(a,s,o):a={...a,...s},setPath(this.data,n,a),r.silent||this.emit("added",e,t,s)}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),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}}var postProcessor={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,i,o){return e.forEach((e=>{t=this.processors[e]?.process(t,s,i,o)??t})),t}};const PATH_KEY=Symbol("i18next/PATH_KEY");function createProxy(){const e=[],t=Object.create(null);let s;return t.get=(i,o)=>(s?.revoke?.(),o===PATH_KEY?e:(e.push(o),s=Proxy.revocable(i,t),s.proxy)),Proxy.revocable(Object.create(null),t).proxy}function keysFromSelector(e,t){const{[PATH_KEY]:s}=e(createProxy());return s.join(t?.keySeparator??".")}const checkedLoadedFor={},shouldHandleAsObject=e=>!isString(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Translator extends EventEmitter{constructor(e,t={}){super(),copy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=baseLogger.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const s={...t};if(null==e)return!1;const i=this.resolve(e,s);if(void 0===i?.res)return!1;const o=shouldHandleAsObject(i.res);return!1!==s.returnObjects||!o}extractFromKey(e,t){let s=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===s&&(s=":");const i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const r=s&&e.indexOf(s)>-1,n=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||looksLikeObjectPath(e,s,i));if(r&&!n){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:isString(o)?[o]:o};const r=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(r[0])>-1)&&(o=r.shift()),e=r.join(i)}return{key:e,namespaces:isString(o)?[o]:o}}translate(e,t,s){let i="object"==typeof t?{...t}:t;if("object"!=typeof i&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof i&&(i={...i}),i||(i={}),null==e)return"";"function"==typeof e&&(e=keysFromSelector(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]);const o=void 0!==i.returnDetails?i.returnDetails:this.options.returnDetails,r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,{key:n,namespaces:a}=this.extractFromKey(e[e.length-1],i),l=a[a.length-1];let h=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===h&&(h=":");const c=i.lng||this.language,g=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===c?.toLowerCase())return g?o?{res:`${l}${h}${n}`,usedKey:n,exactUsedKey:n,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${h}${n}`:o?{res:n,usedKey:n,exactUsedKey:n,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:n;const p=this.resolve(e,i);let u=p?.res;const d=p?.usedKey||n,f=p?.exactUsedKey||n,m=void 0!==i.joinArrays?i.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,x=void 0!==i.count&&!isString(i.count),S=Translator.hasDefaultValue(i),b=x?this.pluralResolver.getSuffix(c,i.count,i):"",v=i.ordinal&&x?this.pluralResolver.getSuffix(c,i.count,{ordinal:!1}):"",k=x&&!i.ordinal&&0===i.count,L=k&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${b}`]||i[`defaultValue${v}`]||i.defaultValue;let O=u;y&&!u&&S&&(O=L);const P=shouldHandleAsObject(O),C=Object.prototype.toString.apply(O);if(!(y&&O&&P&&["[object Number]","[object Function]","[object RegExp]"].indexOf(C)<0)||isString(m)&&Array.isArray(O))if(y&&isString(m)&&Array.isArray(u))u=u.join(m),u&&(u=this.extendTranslation(u,e,i,s));else{let t=!1,o=!1;!this.isValidLookup(u)&&S&&(t=!0,u=L),this.isValidLookup(u)||(o=!0,u=n);const a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:u,g=S&&L!==u&&this.options.updateMissing;if(o||t||g){if(this.logger.log(g?"updateKey":"missingKey",c,l,n,g?L:u),r){const e=this.resolve(n,{...i,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 t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let s=0;s<t.length;s++)e.push(t[s]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);const s=(e,t,s)=>{const o=S&&s!==u?s:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,g,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,o,g,i),this.emit("missingKey",e,l,t,u)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?e.forEach((e=>{const t=this.pluralResolver.getSuffixes(e,i);k&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach((t=>{s([e],n+t,i[`defaultValue${t}`]||L)}))})):s(e,n,L))}u=this.extendTranslation(u,e,i,p,s),o&&u===n&&this.options.appendNamespaceToMissingKey&&(u=`${l}${h}${n}`),(o||t)&&this.options.parseMissingKeyHandler&&(u=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${h}${n}`:n,t?u:void 0,i))}else{if(!i.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,O,{...i,ns:a}):`key '${n} (${this.language})' returned an object instead of string.`;return o?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(r){const e=Array.isArray(O),t=e?[]:{},s=e?f:d;for(const e in O)if(Object.prototype.hasOwnProperty.call(O,e)){const o=`${s}${r}${e}`;t[e]=S&&!u?this.translate(o,{...i,defaultValue:shouldHandleAsObject(L)?L[e]:void 0,joinArrays:!1,ns:a}):this.translate(o,{...i,joinArrays:!1,ns:a}),t[e]===o&&(t[e]=O[e])}u=t}}return o?(p.res=u,p.usedParams=this.getUsedParamsDetails(i),p):u}extendTranslation(e,t,s,i,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const r=isString(e)&&(void 0!==s?.interpolation?.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let n;if(r){const t=e.match(this.interpolator.nestingRegexp);n=t&&t.length}let a=s.replace&&!isString(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),e=this.interpolator.interpolate(e,a,s.lng||this.language||i.usedLng,s),r){const t=e.match(this.interpolator.nestingRegexp);n<(t&&t.length)&&(s.nest=!1)}!s.lng&&i&&i.res&&(s.lng=this.language||i.usedLng),!1!==s.nest&&(e=this.interpolator.nest(e,((...e)=>o?.[0]!==e[0]||s.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null)),s)),s.interpolation&&this.interpolator.reset()}const r=s.postProcess||this.options.postProcess,n=isString(r)?[r]:r;return null!=e&&n?.length&&!1!==s.applyPostProcessor&&(e=postProcessor.handle(n,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,t={}){let s,i,o,r,n;return isString(e)&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(s))return;const a=this.extractFromKey(e,t),l=a.key;i=l;let h=a.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const c=void 0!==t.count&&!isString(t.count),g=c&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(isString(t.context)||"number"==typeof t.context)&&""!==t.context,u=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);h.forEach((e=>{this.isValidLookup(s)||(n=e,checkedLoadedFor[`${u[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(n)||(checkedLoadedFor[`${u[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${u.join(", ")}" won't get resolved as namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),u.forEach((i=>{if(this.isValidLookup(s))return;r=i;const n=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(n,l,i,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(i,t.count,t));const s=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(o)&&n.push(l+e.replace(o,this.options.pluralSeparator)),n.push(l+e),g&&n.push(l+s)),p){const i=`${l}${this.options.contextSeparator||"_"}${t.context}`;n.push(i),c&&(t.ordinal&&0===e.indexOf(o)&&n.push(i+e.replace(o,this.options.pluralSeparator)),n.push(i+e),g&&n.push(i+s))}}let a;for(;a=n.pop();)this.isValidLookup(s)||(o=a,s=this.getResource(i,e,a,t))})))}))})),{res:s,usedKey:i,exactUsedKey:o,usedLng:r,usedNS:n}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,s,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,i)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!isString(e.replace);let i=s?e.replace:e;if(s&&void 0!==e.count&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!s){i={...i};for(const e of t)delete i[e]}return i}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}}class LanguageUtil{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=baseLogger.create("languageUtils")}getScriptPartFromCode(e){if(!(e=getCleanedCode(e))||e.indexOf("-")<0)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=getCleanedCode(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(isString(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("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 s=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(s)||(t=s)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const s=this.getScriptPartFromCode(e);if(this.isSupportedCode(s))return t=s;const i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find((e=>e===i?e:e.indexOf("-")<0&&i.indexOf("-")<0?void 0:e.indexOf("-")>0&&i.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===i||0===e.indexOf(i)&&i.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)),isString(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),i=[],o=e=>{e&&(this.isSupportedCode(e)?i.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return isString(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):isString(e)&&o(this.formatLanguageCode(e)),s.forEach((e=>{i.indexOf(e)<0&&o(this.formatLanguageCode(e))})),i}}const suffixesOrder={zero:0,one:1,two:2,few:3,many:4,other:5},dummyRule={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class PluralResolver{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=baseLogger.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const s=getCleanedCode("dev"===e?"en":e),i=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:s,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let r;try{r=new Intl.PluralRules(s,{type:i})}catch(s){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),dummyRule;if(!e.match(/-|_/))return dummyRule;const i=this.languageUtils.getLanguagePartFromCode(e);r=this.getRule(i,t)}return this.pluralRulesCache[o]=r,r}needsPlural(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,s={}){return this.getSuffixes(e,s).map((e=>`${t}${e}`))}getSuffixes(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?s.resolvedOptions().pluralCategories.sort(((e,t)=>suffixesOrder[e]-suffixesOrder[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):[]}getSuffix(e,t,s={}){const i=this.getRule(e,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}}const deepFindWithDefaults=(e,t,s,i=".",o=!0)=>{let r=getPathWithDefaults(e,t,s);return!r&&o&&isString(s)&&(r=deepFind(e,s,i),void 0===r&&(r=deepFind(t,s,i))),r},regexSafe=e=>e.replace(/\$/g,"$$$$");class Interpolator{constructor(e={}){this.logger=baseLogger.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:i,prefix:o,prefixEscaped:r,suffix:n,suffixEscaped:a,formatSeparator:l,unescapeSuffix:h,unescapePrefix:c,nestingPrefix:g,nestingPrefixEscaped:p,nestingSuffix:u,nestingSuffixEscaped:d,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:escape,this.escapeValue=void 0===s||s,this.useRawValueToEscape=void 0!==i&&i,this.prefix=o?regexEscape(o):r||"{{",this.suffix=n?regexEscape(n):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=h?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=g?regexEscape(g):p||regexEscape("$t("),this.nestingSuffix=u?regexEscape(u):d||regexEscape(")"),this.nestingOptionsSeparator=f||",",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?.source===t?(e.lastIndex=0,e):new 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,s,i){let o,r,n;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=deepFindWithDefaults(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,s,{...i,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),r=o.shift().trim(),n=o.join(this.formatSeparator).trim();return this.format(deepFindWithDefaults(t,a,r,this.options.keySeparator,this.options.ignoreJSONStructure),n,s,{...i,...t,interpolationkey:r})};this.resetRegExp();const h=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=void 0!==i?.interpolation?.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>regexSafe(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?regexSafe(this.escape(e)):regexSafe(e)}].forEach((t=>{for(n=0;o=t.regex.exec(e);){const s=o[1].trim();if(r=l(s),void 0===r)if("function"==typeof h){const t=h(e,o,i);r=isString(t)?t:""}else if(i&&Object.prototype.hasOwnProperty.call(i,s))r="";else{if(c){r=o[0];continue}this.logger.warn(`missed to pass in variable ${s} for interpolating ${e}`),r=""}else isString(r)||this.useRawValueToEscape||(r=makeString(r));const a=t.safeValue(r);if(e=e.replace(o[0],a),c?(t.regex.lastIndex+=r.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,n++,n>=this.maxReplaces)break}})),e}nest(e,t,s={}){let i,o,r;const n=(e,t)=>{const s=this.nestingOptionsSeparator;if(e.indexOf(s)<0)return e;const i=e.split(new RegExp(`${s}[ ]*{`));let o=`{${i[1]}`;e=i[0],o=this.interpolate(o,r);const n=o.match(/'/g),a=o.match(/"/g);((n?.length??0)%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{r=JSON.parse(o),t&&(r={...t,...r})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${s}${o}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,e};for(;i=this.nestingRegexp.exec(e);){let a=[];r={...s},r=r.replace&&!isString(r.replace)?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;const l=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(-1!==l&&(a=i[1].slice(l).split(this.formatSeparator).map((e=>e.trim())).filter(Boolean),i[1]=i[1].slice(0,l)),o=t(n.call(this,i[1].trim(),r),r),o&&i[0]===e&&!isString(o))return o;isString(o)||(o=makeString(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),o=""),a.length&&(o=a.reduce(((e,t)=>this.format(e,t,s.lng,{...s,interpolationkey:i[1].trim()})),o.trim())),e=e.replace(i[0],o),this.regexp.lastIndex=0}return e}}const parseFormatStr=e=>{let t=e.toLowerCase().trim();const s={};if(e.indexOf("(")>-1){const i=e.split("(");t=i[0].toLowerCase().trim();const o=i[1].substring(0,i[1].length-1);"currency"===t&&o.indexOf(":")<0?s.currency||(s.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?s.range||(s.range=o.trim()):o.split(";").forEach((e=>{if(e){const[t,...i]=e.split(":"),o=i.join(":").trim().replace(/^'+|'+$/g,""),r=t.trim();s[r]||(s[r]=o),"false"===o&&(s[r]=!1),"true"===o&&(s[r]=!0),isNaN(o)||(s[r]=parseInt(o,10))}}))}return{formatName:t,formatOptions:s}},createCachedFormatter=e=>{const t={};return(s,i,o)=>{let r=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(r={...r,[o.interpolationkey]:void 0});const n=i+JSON.stringify(r);let a=t[n];return a||(a=e(getCleanedCode(i),o),t[n]=a),a(s)}},createNonCachedFormatter=e=>(t,s,i)=>e(getCleanedCode(s),i)(t);class Formatter{constructor(e={}){this.logger=baseLogger.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const s=t.cacheInBuiltFormats?createCachedFormatter:createNonCachedFormatter;this.formats={number:s(((e,t)=>{const s=new Intl.NumberFormat(e,{...t});return e=>s.format(e)})),currency:s(((e,t)=>{const s=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>s.format(e)})),datetime:s(((e,t)=>{const s=new Intl.DateTimeFormat(e,{...t});return e=>s.format(e)})),relativetime:s(((e,t)=>{const s=new Intl.RelativeTimeFormat(e,{...t});return e=>s.format(e,t.range||"day")})),list:s(((e,t)=>{const s=new Intl.ListFormat(e,{...t});return e=>s.format(e)}))}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=createCachedFormatter(t)}format(e,t,s,i={}){const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((e=>e.indexOf(")")>-1))){const e=o.findIndex((e=>e.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce(((e,t)=>{const{formatName:o,formatOptions:r}=parseFormatStr(t);if(this.formats[o]){let t=e;try{const n=i?.formatParams?.[i.interpolationkey]||{},a=n.locale||n.lng||i.locale||i.lng||s;t=this.formats[o](e,a,{...r,...i,...n})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e)}}const removePending=(e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)};class Connector extends EventEmitter{constructor(e,t,s,i={}){super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=baseLogger.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,i.backend,i)}queueLoad(e,t,s,i){const o={},r={},n={},a={};return e.forEach((e=>{let i=!0;t.forEach((t=>{const n=`${e}|${t}`;!s.reload&&this.store.hasResourceBundle(e,t)?this.state[n]=2:this.state[n]<0||(1===this.state[n]?void 0===r[n]&&(r[n]=!0):(this.state[n]=1,i=!1,void 0===r[n]&&(r[n]=!0),void 0===o[n]&&(o[n]=!0),void 0===a[t]&&(a[t]=!0)))})),i||(n[e]=!0)})),(Object.keys(o).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(r),toLoadLanguages:Object.keys(n),toLoadNamespaces:Object.keys(a)}}loaded(e,t,s){const i=e.split("|"),o=i[0],r=i[1];t&&this.emit("failedLoading",o,r,t),!t&&s&&this.store.addResourceBundle(o,r,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const n={};this.queue.forEach((s=>{pushPath(s.loaded,[o],r),removePending(s,e),t&&s.errors.push(t),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach((e=>{n[e]||(n[e]={});const t=s.loaded[e];t.length&&t.forEach((t=>{void 0===n[e][t]&&(n[e][t]=!0)}))})),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())})),this.emit("loaded",n),this.queue=this.queue.filter((e=>!e.done))}read(e,t,s,i=0,o=this.retryTimeout,r){if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:o,callback:r});this.readingCalls++;const n=(n,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)}n&&a&&i<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,s,i+1,2*o,r)}),o):r(n,a)},a=this.backend[s].bind(this.backend);if(2!==a.length)return a(e,t,n);try{const s=a(e,t);s&&"function"==typeof s.then?s.then((e=>n(null,e))).catch(n):n(null,s)}catch(e){n(e)}}prepareLoading(e,t,s={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();isString(e)&&(e=this.languageUtils.toResolveHierarchy(e)),isString(t)&&(t=[t]);const o=this.queueLoad(e,t,s,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e,t=""){const s=e.split("|"),i=s[0],o=s[1];this.read(i,o,"read",void 0,void 0,((s,r)=>{s&&this.logger.warn(`${t}loading namespace ${o} for language ${i} failed`,s),!s&&r&&this.logger.log(`${t}loaded namespace ${o} for language ${i}`,r),this.loaded(e,s,r)}))}saveMissing(e,t,s,i,o,r={},n=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=s&&""!==s){if(this.backend?.create){const a={...r,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,s,i,a):l(e,t,s,i),o&&"function"==typeof o.then?o.then((e=>n(null,e))).catch(n):n(null,o)}catch(e){n(e)}else l(e,t,s,i,n,a)}e&&e[0]&&this.store.addResource(e[0],t,s,i)}}else this.logger.warn(`did not save key "${s}" 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!!!")}}const get=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),isString(e[1])&&(t.defaultValue=e[1]),isString(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const s=e[3]||e[2];Object.keys(s).forEach((e=>{t[e]=s[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),transformOptions=e=>(isString(e.ns)&&(e.ns=[e.ns]),isString(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),isString(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),noop=()=>{},bindMemberFunctions=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))}))};class I18n extends EventEmitter{constructor(e={},t){if(super(),this.options=transformOptions(e),this.services={},this.logger=baseLogger,this.modules={external:[]},bindMemberFunctions(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(isString(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const s=get();this.options={...s,...this.options,...transformOptions(e)},this.options.interpolation={...s.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const i=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?baseLogger.init(i(this.modules.logger),this.options):baseLogger.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Formatter;const t=new LanguageUtil(this.options);this.store=new ResourceStore(this.options.resources,this.options);const o=this.services;o.logger=baseLogger,o.resourceStore=this.store,o.languageUtils=t,o.pluralResolver=new PluralResolver(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format||(o.formatter=i(e),o.formatter.init&&o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new Interpolator(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new Connector(i(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",((e,...t)=>{this.emit(e,...t)})),this.modules.languageDetector&&(o.languageDetector=i(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=i(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new Translator(this.services,this.options),this.translator.on("*",((e,...t)=>{this.emit(e,...t)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,t||(t=noop),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((e=>{this[e]=(...t)=>this.store[e](...t)})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((e=>{this[e]=(...t)=>(this.store[e](...t),this)}));const o=defer(),r=()=>{const e=(e,s)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(s),t(e,s)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?r():setTimeout(r,0),o}loadResources(e,t=noop){let s=t;const i=isString(e)?e:this.language;if("function"==typeof e&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===i?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return s();const e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};i?t(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>t(e))),this.options.preload?.forEach?.((e=>t(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),s(e)}))}else s(null)}reloadResources(e,t,s){const i=defer();return"function"==typeof e&&(s=e,e=void 0),"function"==typeof t&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=noop),this.services.backendConnector.reload(e,t,(e=>{i.resolve(),s(e)})),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"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&&postProcessor.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const s=defer();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,r)=>{r?this.isLanguageChangingTo===e&&(i(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):this.isLanguageChangingTo=void 0,s.resolve(((...e)=>this.t(...e))),t&&t(o,((...e)=>this.t(...e)))},r=t=>{e||t||!this.services.languageDetector||(t=[]);const s=isString(t)?t:t&&t[0],r=this.store.hasLanguageSomeTranslations(s)?s:this.services.languageUtils.getBestMatchFromCodes(isString(t)?[t]:t);r&&(this.language||i(r),this.translator.language||this.translator.changeLanguage(r),this.services.languageDetector?.cacheUserLanguage?.(r)),this.loadResources(r,(e=>{o(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(r):this.services.languageDetector.detect(r):r(e):r(this.services.languageDetector.detect()),s}getFixedT(e,t,s){const i=(e,t,...o)=>{let r;r="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t},r.lng=r.lng||i.lng,r.lngs=r.lngs||i.lngs,r.ns=r.ns||i.ns,""!==r.keyPrefix&&(r.keyPrefix=r.keyPrefix||s||i.keyPrefix);const n=this.options.keySeparator||".";let a;return r.keyPrefix&&Array.isArray(e)?a=e.map((e=>("function"==typeof e&&(e=keysFromSelector(e,{...this.options,...t})),`${r.keyPrefix}${n}${e}`))):("function"==typeof e&&(e=keysFromSelector(e,{...this.options,...t})),a=r.keyPrefix?`${r.keyPrefix}${n}${e}`:e),this.t(a,r)};return isString(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=s,i}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;const r=(e,t)=>{const s=this.services.backendConnector.state[`${e}|${t}`];return-1===s||0===s||2===s};if(t.precheck){const e=t.precheck(this,r);if(void 0!==e)return e}return!(!this.hasResourceBundle(s,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!r(s,e)||i&&!r(o,e)))}loadNamespaces(e,t){const s=defer();return this.options.ns?(isString(e)&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{s.resolve(),t&&t(e)})),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=defer();isString(e)&&(e=[e]);const i=this.options.preload||[],o=e.filter((e=>i.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return o.length?(this.options.preload=i.concat(o),this.loadResources((e=>{s.resolve(),t&&t(e)})),s):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new LanguageUtil(get());return e.toLowerCase().indexOf("-latn")>1?"ltr":["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(e={},t){return new I18n(e,t)}cloneInstance(e={},t=noop){const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},o=new I18n(i);if(void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e)),["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},s){const e=Object.keys(this.store.data).reduce(((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce(((s,i)=>(s[i]={...e[t][i]},s)),e[t]),e)),{});o.store=new ResourceStore(e,i),o.services.resourceStore=o.store}return o.translator=new Translator(o.services,i),o.translator.on("*",((e,...t)=>{o.emit(e,...t)})),o.init(i,t),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const instance=I18n.createInstance();instance.createInstance=I18n.createInstance;export{instance as i};
@@ -1 +1 @@
1
- export{getAssetPath,setAssetPath,setNonce,setPlatformOptions}from"@stencil/core/internal/client";import"./i18n-setup.js";export{C as CONTACTS,c as contactsMap}from"./contacts.js";export{i as initIconSpriteLocation}from"./va-icon2.js";export{VaAccordion,defineCustomElement as defineCustomElementVaAccordion}from"./va-accordion.js";export{VaAccordionItem,defineCustomElement as defineCustomElementVaAccordionItem}from"./va-accordion-item.js";export{VaAdditionalInfo,defineCustomElement as defineCustomElementVaAdditionalInfo}from"./va-additional-info.js";export{VaAlert,defineCustomElement as defineCustomElementVaAlert}from"./va-alert.js";export{VaAlertExpandable,defineCustomElement as defineCustomElementVaAlertExpandable}from"./va-alert-expandable.js";export{VaAlertSignIn,defineCustomElement as defineCustomElementVaAlertSignIn}from"./va-alert-sign-in.js";export{VaBackToTop,defineCustomElement as defineCustomElementVaBackToTop}from"./va-back-to-top.js";export{VaBanner,defineCustomElement as defineCustomElementVaBanner}from"./va-banner.js";export{VaBreadcrumbs,defineCustomElement as defineCustomElementVaBreadcrumbs}from"./va-breadcrumbs.js";export{VaButton,defineCustomElement as defineCustomElementVaButton}from"./va-button.js";export{VaButtonIcon,defineCustomElement as defineCustomElementVaButtonIcon}from"./va-button-icon.js";export{VaButtonPair,defineCustomElement as defineCustomElementVaButtonPair}from"./va-button-pair.js";export{VaButtonSegmented,defineCustomElement as defineCustomElementVaButtonSegmented}from"./va-button-segmented.js";export{VaCard,defineCustomElement as defineCustomElementVaCard}from"./va-card.js";export{VaCheckbox,defineCustomElement as defineCustomElementVaCheckbox}from"./va-checkbox.js";export{VaCheckboxGroup,defineCustomElement as defineCustomElementVaCheckboxGroup}from"./va-checkbox-group.js";export{VaComboBox,defineCustomElement as defineCustomElementVaComboBox}from"./va-combo-box.js";export{VaCrisisLineModal,defineCustomElement as defineCustomElementVaCrisisLineModal}from"./va-crisis-line-modal.js";export{VaCriticalAction,defineCustomElement as defineCustomElementVaCriticalAction}from"./va-critical-action.js";export{VaDate,defineCustomElement as defineCustomElementVaDate}from"./va-date.js";export{VaFileInput,defineCustomElement as defineCustomElementVaFileInput}from"./va-file-input.js";export{VaFileInputMultiple,defineCustomElement as defineCustomElementVaFileInputMultiple}from"./va-file-input-multiple.js";export{VaHeaderMinimal,defineCustomElement as defineCustomElementVaHeaderMinimal}from"./va-header-minimal.js";export{VaIcon,defineCustomElement as defineCustomElementVaIcon}from"./va-icon.js";export{VaLanguageToggle,defineCustomElement as defineCustomElementVaLanguageToggle}from"./va-language-toggle.js";export{VaLink,defineCustomElement as defineCustomElementVaLink}from"./va-link.js";export{VaLinkAction,defineCustomElement as defineCustomElementVaLinkAction}from"./va-link-action.js";export{VaLoadingIndicator,defineCustomElement as defineCustomElementVaLoadingIndicator}from"./va-loading-indicator.js";export{VaMaintenanceBanner,defineCustomElement as defineCustomElementVaMaintenanceBanner}from"./va-maintenance-banner.js";export{VaMemorableDate,defineCustomElement as defineCustomElementVaMemorableDate}from"./va-memorable-date.js";export{VaMinimalFooter,defineCustomElement as defineCustomElementVaMinimalFooter}from"./va-minimal-footer.js";export{VaModal,defineCustomElement as defineCustomElementVaModal}from"./va-modal.js";export{VaNeedHelp,defineCustomElement as defineCustomElementVaNeedHelp}from"./va-need-help.js";export{VaNotification,defineCustomElement as defineCustomElementVaNotification}from"./va-notification.js";export{VaOfficialGovBanner,defineCustomElement as defineCustomElementVaOfficialGovBanner}from"./va-official-gov-banner.js";export{VaOmbInfo,defineCustomElement as defineCustomElementVaOmbInfo}from"./va-omb-info.js";export{VaOnThisPage,defineCustomElement as defineCustomElementVaOnThisPage}from"./va-on-this-page.js";export{VaPagination,defineCustomElement as defineCustomElementVaPagination}from"./va-pagination.js";export{VaPrivacyAgreement,defineCustomElement as defineCustomElementVaPrivacyAgreement}from"./va-privacy-agreement.js";export{VaProcessList,defineCustomElement as defineCustomElementVaProcessList}from"./va-process-list.js";export{VaProcessListItem,defineCustomElement as defineCustomElementVaProcessListItem}from"./va-process-list-item.js";export{VaProgressBar,defineCustomElement as defineCustomElementVaProgressBar}from"./va-progress-bar.js";export{VaPromoBanner,defineCustomElement as defineCustomElementVaPromoBanner}from"./va-promo-banner.js";export{VaRadio,defineCustomElement as defineCustomElementVaRadio}from"./va-radio.js";export{VaRadioOption,defineCustomElement as defineCustomElementVaRadioOption}from"./va-radio-option.js";export{VaSearchFilter,defineCustomElement as defineCustomElementVaSearchFilter}from"./va-search-filter.js";export{VaSearchInput,defineCustomElement as defineCustomElementVaSearchInput}from"./va-search-input.js";export{VaSegmentedProgressBar,defineCustomElement as defineCustomElementVaSegmentedProgressBar}from"./va-segmented-progress-bar.js";export{VaSelect,defineCustomElement as defineCustomElementVaSelect}from"./va-select.js";export{VaServiceListItem,defineCustomElement as defineCustomElementVaServiceListItem}from"./va-service-list-item.js";export{VaSidenav,defineCustomElement as defineCustomElementVaSidenav}from"./va-sidenav.js";export{VaSidenavItem,defineCustomElement as defineCustomElementVaSidenavItem}from"./va-sidenav-item.js";export{VaSidenavSubmenu,defineCustomElement as defineCustomElementVaSidenavSubmenu}from"./va-sidenav-submenu.js";export{VaStatementOfTruth,defineCustomElement as defineCustomElementVaStatementOfTruth}from"./va-statement-of-truth.js";export{VaSummaryBox,defineCustomElement as defineCustomElementVaSummaryBox}from"./va-summary-box.js";export{VaTabItem,defineCustomElement as defineCustomElementVaTabItem}from"./va-tab-item.js";export{VaTabPanel,defineCustomElement as defineCustomElementVaTabPanel}from"./va-tab-panel.js";export{VaTable,defineCustomElement as defineCustomElementVaTable}from"./va-table.js";export{VaTableInner,defineCustomElement as defineCustomElementVaTableInner}from"./va-table-inner.js";export{VaTableRow,defineCustomElement as defineCustomElementVaTableRow}from"./va-table-row.js";export{VaTabs,defineCustomElement as defineCustomElementVaTabs}from"./va-tabs.js";export{VaTagStatus,defineCustomElement as defineCustomElementVaTagStatus}from"./va-tag-status.js";export{VaTelephone,defineCustomElement as defineCustomElementVaTelephone}from"./va-telephone.js";export{VaTelephoneInput,defineCustomElement as defineCustomElementVaTelephoneInput}from"./va-telephone-input.js";export{VaTextInput,defineCustomElement as defineCustomElementVaTextInput}from"./va-text-input.js";export{VaTextarea,defineCustomElement as defineCustomElementVaTextarea}from"./va-textarea.js";export{i as i18next}from"./i18next.js";
1
+ export{getAssetPath,setAssetPath,setNonce,setPlatformOptions}from"@stencil/core/internal/client";export{C as CONTACTS,c as contactsMap}from"./contacts.js";export{i as initIconSpriteLocation}from"./va-icon2.js";export{VaAccordion,defineCustomElement as defineCustomElementVaAccordion}from"./va-accordion.js";export{VaAccordionItem,defineCustomElement as defineCustomElementVaAccordionItem}from"./va-accordion-item.js";export{VaAdditionalInfo,defineCustomElement as defineCustomElementVaAdditionalInfo}from"./va-additional-info.js";export{VaAlert,defineCustomElement as defineCustomElementVaAlert}from"./va-alert.js";export{VaAlertExpandable,defineCustomElement as defineCustomElementVaAlertExpandable}from"./va-alert-expandable.js";export{VaAlertSignIn,defineCustomElement as defineCustomElementVaAlertSignIn}from"./va-alert-sign-in.js";export{VaBackToTop,defineCustomElement as defineCustomElementVaBackToTop}from"./va-back-to-top.js";export{VaBanner,defineCustomElement as defineCustomElementVaBanner}from"./va-banner.js";export{VaBreadcrumbs,defineCustomElement as defineCustomElementVaBreadcrumbs}from"./va-breadcrumbs.js";export{VaButton,defineCustomElement as defineCustomElementVaButton}from"./va-button.js";export{VaButtonIcon,defineCustomElement as defineCustomElementVaButtonIcon}from"./va-button-icon.js";export{VaButtonPair,defineCustomElement as defineCustomElementVaButtonPair}from"./va-button-pair.js";export{VaButtonSegmented,defineCustomElement as defineCustomElementVaButtonSegmented}from"./va-button-segmented.js";export{VaCard,defineCustomElement as defineCustomElementVaCard}from"./va-card.js";export{VaCheckbox,defineCustomElement as defineCustomElementVaCheckbox}from"./va-checkbox.js";export{VaCheckboxGroup,defineCustomElement as defineCustomElementVaCheckboxGroup}from"./va-checkbox-group.js";export{VaComboBox,defineCustomElement as defineCustomElementVaComboBox}from"./va-combo-box.js";export{VaCrisisLineModal,defineCustomElement as defineCustomElementVaCrisisLineModal}from"./va-crisis-line-modal.js";export{VaCriticalAction,defineCustomElement as defineCustomElementVaCriticalAction}from"./va-critical-action.js";export{VaDate,defineCustomElement as defineCustomElementVaDate}from"./va-date.js";export{VaFileInput,defineCustomElement as defineCustomElementVaFileInput}from"./va-file-input.js";export{VaFileInputMultiple,defineCustomElement as defineCustomElementVaFileInputMultiple}from"./va-file-input-multiple.js";export{VaHeaderMinimal,defineCustomElement as defineCustomElementVaHeaderMinimal}from"./va-header-minimal.js";export{VaIcon,defineCustomElement as defineCustomElementVaIcon}from"./va-icon.js";export{VaLanguageToggle,defineCustomElement as defineCustomElementVaLanguageToggle}from"./va-language-toggle.js";export{VaLink,defineCustomElement as defineCustomElementVaLink}from"./va-link.js";export{VaLinkAction,defineCustomElement as defineCustomElementVaLinkAction}from"./va-link-action.js";export{VaLoadingIndicator,defineCustomElement as defineCustomElementVaLoadingIndicator}from"./va-loading-indicator.js";export{VaMaintenanceBanner,defineCustomElement as defineCustomElementVaMaintenanceBanner}from"./va-maintenance-banner.js";export{VaMemorableDate,defineCustomElement as defineCustomElementVaMemorableDate}from"./va-memorable-date.js";export{VaMinimalFooter,defineCustomElement as defineCustomElementVaMinimalFooter}from"./va-minimal-footer.js";export{VaModal,defineCustomElement as defineCustomElementVaModal}from"./va-modal.js";export{VaNeedHelp,defineCustomElement as defineCustomElementVaNeedHelp}from"./va-need-help.js";export{VaNotification,defineCustomElement as defineCustomElementVaNotification}from"./va-notification.js";export{VaOfficialGovBanner,defineCustomElement as defineCustomElementVaOfficialGovBanner}from"./va-official-gov-banner.js";export{VaOmbInfo,defineCustomElement as defineCustomElementVaOmbInfo}from"./va-omb-info.js";export{VaOnThisPage,defineCustomElement as defineCustomElementVaOnThisPage}from"./va-on-this-page.js";export{VaPagination,defineCustomElement as defineCustomElementVaPagination}from"./va-pagination.js";export{VaPrivacyAgreement,defineCustomElement as defineCustomElementVaPrivacyAgreement}from"./va-privacy-agreement.js";export{VaProcessList,defineCustomElement as defineCustomElementVaProcessList}from"./va-process-list.js";export{VaProcessListItem,defineCustomElement as defineCustomElementVaProcessListItem}from"./va-process-list-item.js";export{VaProgressBar,defineCustomElement as defineCustomElementVaProgressBar}from"./va-progress-bar.js";export{VaPromoBanner,defineCustomElement as defineCustomElementVaPromoBanner}from"./va-promo-banner.js";export{VaRadio,defineCustomElement as defineCustomElementVaRadio}from"./va-radio.js";export{VaRadioOption,defineCustomElement as defineCustomElementVaRadioOption}from"./va-radio-option.js";export{VaSearchFilter,defineCustomElement as defineCustomElementVaSearchFilter}from"./va-search-filter.js";export{VaSearchInput,defineCustomElement as defineCustomElementVaSearchInput}from"./va-search-input.js";export{VaSegmentedProgressBar,defineCustomElement as defineCustomElementVaSegmentedProgressBar}from"./va-segmented-progress-bar.js";export{VaSelect,defineCustomElement as defineCustomElementVaSelect}from"./va-select.js";export{VaServiceListItem,defineCustomElement as defineCustomElementVaServiceListItem}from"./va-service-list-item.js";export{VaSidenav,defineCustomElement as defineCustomElementVaSidenav}from"./va-sidenav.js";export{VaSidenavItem,defineCustomElement as defineCustomElementVaSidenavItem}from"./va-sidenav-item.js";export{VaSidenavSubmenu,defineCustomElement as defineCustomElementVaSidenavSubmenu}from"./va-sidenav-submenu.js";export{VaStatementOfTruth,defineCustomElement as defineCustomElementVaStatementOfTruth}from"./va-statement-of-truth.js";export{VaSummaryBox,defineCustomElement as defineCustomElementVaSummaryBox}from"./va-summary-box.js";export{VaTabItem,defineCustomElement as defineCustomElementVaTabItem}from"./va-tab-item.js";export{VaTabPanel,defineCustomElement as defineCustomElementVaTabPanel}from"./va-tab-panel.js";export{VaTable,defineCustomElement as defineCustomElementVaTable}from"./va-table.js";export{VaTableInner,defineCustomElement as defineCustomElementVaTableInner}from"./va-table-inner.js";export{VaTableRow,defineCustomElement as defineCustomElementVaTableRow}from"./va-table-row.js";export{VaTabs,defineCustomElement as defineCustomElementVaTabs}from"./va-tabs.js";export{VaTagStatus,defineCustomElement as defineCustomElementVaTagStatus}from"./va-tag-status.js";export{VaTelephone,defineCustomElement as defineCustomElementVaTelephone}from"./va-telephone.js";export{VaTelephoneInput,defineCustomElement as defineCustomElementVaTelephoneInput}from"./va-telephone-input.js";export{VaTextInput,defineCustomElement as defineCustomElementVaTextInput}from"./va-text-input.js";export{VaTextarea,defineCustomElement as defineCustomElementVaTextarea}from"./va-textarea.js";export{i as i18next}from"./i18next.js";
@@ -594,6 +594,10 @@ export namespace Components {
594
594
  * URL for the chat service. Defaults to Veterans Crisis Line chat.
595
595
  */
596
596
  "chatUrl"?: string;
597
+ /**
598
+ * Determines what to render: - `'trigger'`: Renders only the trigger button (no modal in DOM). Use the document event to open a separate modal instance. - `'modal'`: Renders only the modal (no trigger button). Dispatch the custom event `vaCrisisLineModalOpen` on `document` to open it. - `null` or `undefined`: Renders both trigger and modal (default behavior).
599
+ */
600
+ "mode"?: 'trigger' | 'modal';
597
601
  /**
598
602
  * Phone extension for the crisis line. Defaults to 1.
599
603
  */
@@ -606,10 +610,6 @@ export namespace Components {
606
610
  * Text number for the crisis line. Defaults to 838255.
607
611
  */
608
612
  "textNumber"?: string;
609
- /**
610
- * Selector for an external button that should trigger the modal. When provided, the internal trigger button will not be rendered. Accepts ID (#myButton), class (.my-button), or attribute selector.
611
- */
612
- "triggerRef"?: string;
613
613
  /**
614
614
  * TTY extension for the crisis line. Defaults to 988.
615
615
  */
@@ -1080,6 +1080,10 @@ export namespace Components {
1080
1080
  * The title of the banner shown during active maintenance.
1081
1081
  */
1082
1082
  "maintenanceTitle": string;
1083
+ /**
1084
+ * The level of the header for the maintenance title. Default is h2.
1085
+ */
1086
+ "maintenanceTitleHeaderLevel": number;
1083
1087
  /**
1084
1088
  * The Date/Time of when to be begin warning users of upcoming site maintenance.
1085
1089
  */
@@ -1331,12 +1335,16 @@ export namespace Components {
1331
1335
  * The form number to display in the Privacy Act Statement button text. When provided, the button reads "Privacy Act Statement for VA Form {formId}". This improves accessibility when multiple instances exist on the same page.
1332
1336
  */
1333
1337
  "formId"?: string;
1338
+ /**
1339
+ * If `true`, clicking outside the modal will close it.
1340
+ */
1341
+ "modalClickToClose"?: boolean;
1334
1342
  /**
1335
1343
  * The OMB control number
1336
1344
  */
1337
1345
  "ombNumber"?: string;
1338
1346
  /**
1339
- * Displays the Respondent Burden section in the Privacy Act Statement modal and how many minutes the form is expected to take.
1347
+ * The Respondent Burden section in the Privacy Act Statement modal and how many minutes the form is expected to take. Note that the displayed text will convert minutes to hours and minutes when the value is over 60.
1340
1348
  */
1341
1349
  "resBurden"?: number;
1342
1350
  }
@@ -2046,6 +2054,10 @@ export namespace Components {
2046
2054
  * @maturityLevel candidate
2047
2055
  */
2048
2056
  interface VaTagStatus {
2057
+ /**
2058
+ * Screen reader text to provide context about the status tag. Defaults to `Status {status}:`.
2059
+ */
2060
+ "screenReaderText": string;
2049
2061
  /**
2050
2062
  * The status variant of the tag. Determines the background color and icon.
2051
2063
  */
@@ -4577,6 +4589,10 @@ declare namespace LocalJSX {
4577
4589
  * URL for the chat service. Defaults to Veterans Crisis Line chat.
4578
4590
  */
4579
4591
  "chatUrl"?: string;
4592
+ /**
4593
+ * Determines what to render: - `'trigger'`: Renders only the trigger button (no modal in DOM). Use the document event to open a separate modal instance. - `'modal'`: Renders only the modal (no trigger button). Dispatch the custom event `vaCrisisLineModalOpen` on `document` to open it. - `null` or `undefined`: Renders both trigger and modal (default behavior).
4594
+ */
4595
+ "mode"?: 'trigger' | 'modal';
4580
4596
  /**
4581
4597
  * Phone extension for the crisis line. Defaults to 1.
4582
4598
  */
@@ -4589,10 +4605,6 @@ declare namespace LocalJSX {
4589
4605
  * Text number for the crisis line. Defaults to 838255.
4590
4606
  */
4591
4607
  "textNumber"?: string;
4592
- /**
4593
- * Selector for an external button that should trigger the modal. When provided, the internal trigger button will not be rendered. Accepts ID (#myButton), class (.my-button), or attribute selector.
4594
- */
4595
- "triggerRef"?: string;
4596
4608
  /**
4597
4609
  * TTY extension for the crisis line. Defaults to 988.
4598
4610
  */
@@ -5115,6 +5127,10 @@ declare namespace LocalJSX {
5115
5127
  * The title of the banner shown during active maintenance.
5116
5128
  */
5117
5129
  "maintenanceTitle"?: string;
5130
+ /**
5131
+ * The level of the header for the maintenance title. Default is h2.
5132
+ */
5133
+ "maintenanceTitleHeaderLevel"?: number;
5118
5134
  /**
5119
5135
  * Fires when the component is closed by clicking on the close icon.
5120
5136
  */
@@ -5414,12 +5430,16 @@ declare namespace LocalJSX {
5414
5430
  * The form number to display in the Privacy Act Statement button text. When provided, the button reads "Privacy Act Statement for VA Form {formId}". This improves accessibility when multiple instances exist on the same page.
5415
5431
  */
5416
5432
  "formId"?: string;
5433
+ /**
5434
+ * If `true`, clicking outside the modal will close it.
5435
+ */
5436
+ "modalClickToClose"?: boolean;
5417
5437
  /**
5418
5438
  * The OMB control number
5419
5439
  */
5420
5440
  "ombNumber"?: string;
5421
5441
  /**
5422
- * Displays the Respondent Burden section in the Privacy Act Statement modal and how many minutes the form is expected to take.
5442
+ * The Respondent Burden section in the Privacy Act Statement modal and how many minutes the form is expected to take. Note that the displayed text will convert minutes to hours and minutes when the value is over 60.
5423
5443
  */
5424
5444
  "resBurden"?: number;
5425
5445
  }
@@ -6241,6 +6261,10 @@ declare namespace LocalJSX {
6241
6261
  * @maturityLevel candidate
6242
6262
  */
6243
6263
  interface VaTagStatus {
6264
+ /**
6265
+ * Screen reader text to provide context about the status tag. Defaults to `Status {status}:`.
6266
+ */
6267
+ "screenReaderText"?: string;
6244
6268
  /**
6245
6269
  * The status variant of the tag. Determines the background color and icon.
6246
6270
  */
@@ -1 +1 @@
1
- import{Build,proxyCustomElement,HTMLElement,createEvent,forceUpdate,h,Host}from"@stencil/core/internal/client";import{a as getSlottedNodes}from"./utils.js";import"./i18n-setup.js";import"./contacts.js";import{c as classnames}from"./index2.js";import{i as instance}from"./i18next.js";const vaAccordionCss='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}.usa-accordion{margin-bottom:0;margin-top:0;list-style-type:none;padding-left:0;color:#1b1b1b;margin:0;padding:0;width:100%;font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.5}.usa-accordion>li{margin-bottom:0;max-width:unset}.usa-accordion>ul li ul{list-style:disc}.usa-accordion>ul li ul>li>ul{list-style:circle}.usa-accordion>ul li ul>li>ul>li>ul{list-style:square}.usa-accordion+.usa-accordion,.usa-accordion+.usa-accordion--bordered{margin-top:0.5rem}.usa-accordion--bordered .usa-accordion__content{border-bottom:0.25rem solid #f0f0f0;border-left:0.25rem solid #f0f0f0;border-right:0.25rem solid #f0f0f0;padding-bottom:1rem}.usa-accordion--bordered .usa-accordion__heading{margin-bottom:0}.usa-accordion__heading,.usa-prose .usa-accordion__heading{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:0.9;margin:0}.usa-accordion__heading:not(:first-child),.usa-prose .usa-accordion__heading:not(:first-child){margin-top:0.5rem}.usa-accordion__content{color:#1b1b1b;background-color:white;margin-top:0;overflow:auto;padding:1rem 1.25rem calc(1rem - 0.25rem) 1.25rem}.usa-accordion__content>*:first-child{margin-top:0}.usa-accordion__content>*:last-child{margin-bottom:0}.usa-accordion__button{color:#005ea2;text-decoration:underline;background-color:transparent;border:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none;font-weight:normal;-ms-flex-pack:normal;justify-content:normal;text-align:left;margin:0;padding:0;width:auto;color:#1b1b1b;background-color:#f0f0f0;background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;background-position:right 1.25rem center;background-size:1.5rem;cursor:pointer;display:inline-block;font-weight:700;margin:0;padding:1rem 3.5rem 1rem 1.25rem;text-decoration:none;width:100%}.usa-accordion__button:visited{color:#54278f}.usa-accordion__button:hover{color:#1a4480}.usa-accordion__button:active{color:#162e51}.usa-accordion__button:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-accordion__button:hover,.usa-accordion__button.usa-button--hover,.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button:disabled.usa-button--hover,.usa-accordion__button[aria-disabled=true].usa-button--hover,.usa-accordion__button:active,.usa-accordion__button.usa-button--active,.usa-accordion__button:disabled:active,.usa-accordion__button[aria-disabled=true]:active,.usa-accordion__button:disabled.usa-button--active,.usa-accordion__button[aria-disabled=true].usa-button--active,.usa-accordion__button:disabled:focus,.usa-accordion__button[aria-disabled=true]:focus,.usa-accordion__button:disabled.usa-focus,.usa-accordion__button[aria-disabled=true].usa-focus,.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-accordion__button.usa-button--hover{color:#1a4480}.usa-accordion__button.usa-button--active{color:#162e51}.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button[aria-disabled=true]:focus{color:GrayText}}.usa-accordion__button:hover{color:#1b1b1b;background-color:#dfe1e2;background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;text-decoration:none}@media (forced-colors: active){.usa-accordion__button{border:2px solid transparent;position:relative}.usa-accordion__button::before{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1.5rem 1.5rem;display:inline-block;height:1.5rem;width:1.5rem;height:100%;position:absolute;right:1.25rem;top:0;content:""}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-accordion__button::before{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1.5rem 1.5rem;mask-size:1.5rem 1.5rem}}}.usa-accordion__button[aria-expanded=false]{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;background-size:1.5rem}.usa-accordion__button[aria-expanded=false]:hover{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat}@media (forced-colors: active){.usa-accordion__button[aria-expanded=false]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1.5rem 1.5rem;display:inline-block;height:1.5rem;width:1.5rem;height:100%;position:absolute;right:1.25rem;top:0}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-accordion__button[aria-expanded=false]::before{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1.5rem 1.5rem;mask-size:1.5rem 1.5rem}}}.expand-collapse-list{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;list-style:none;margin:0;padding:0}.expand-collapse-list li:first-child::after{content:"|"/"";font-size:0.875rem}button.va-accordion__button{border:none;color:var(--vads-color-link);background:transparent;padding:0.625rem;cursor:pointer;font-family:inherit;font-weight:bold}@media print{button.va-accordion__button{display:none}}',VaAccordionStyle0=vaAccordionCss;Build.isTesting&&instance.init({lng:"cimode"});const VaAccordion=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.accordionExpandCollapseAll=createEvent(this,"accordionExpandCollapseAll",7),this.expandCollapseAll=e=>{this.expanded=e,this.collapsed=!e;const t=e?"allOpen":"allClosed";this.accordionExpandCollapseAll.emit({status:t}),getSlottedNodes(this.el,"va-accordion-item").forEach((t=>{t.setAttribute("open",`${e}`)}))},this.expanded=!1,this.collapsed=!0,this.openSingle=!1,this.disableAnalytics=!1,this.sectionHeading=null}itemToggledHandler(e){var t;const a=e.target.closest("va-accordion-item");if(this.el!==a.parentElement)return;const o=a.querySelector('[slot="headline"]');let n,i;o?(n=null==o?void 0:o.innerHTML,i=parseInt(null===(t=null==o?void 0:o.tagName)||void 0===t?void 0:t.toLowerCase().split("")[1])):(n=a.header,i=a.level),this.openSingle&&getSlottedNodes(this.el,"va-accordion-item").filter((e=>e!==a)).forEach((e=>e.setAttribute("open","false")));const r="false"!==a.getAttribute("open")&&a.hasAttribute("open");if(!this.disableAnalytics){const e={componentName:"va-accordion",action:r?"collapse":"expand",details:{header:n||a.header,subheader:a.subheader,level:i||a.level,sectionHeading:this.sectionHeading}};this.componentLibraryAnalytics.emit(e)}a.setAttribute("open",r?"false":"true"),this.isScrolledIntoView(a)||a.scrollIntoView(),this.accordionsOpened()}accordionsOpened(e="every"){const t=[...this.el.children].filter((e=>"va-accordion-item"===e.tagName.toLowerCase())).map((e=>e.open));return t[e]((e=>!0===e))?this.expanded=!0:t[e]((e=>!1===e))?(this.expanded=!1,this.collapsed=!0):(this.expanded=!1,this.collapsed=!1)}isScrolledIntoView(e){const t=null==e?void 0:e.getBoundingClientRect().top;return!(!t&&0!==t)&&t>=0&&t<=window.innerHeight}connectedCallback(){instance.on("languageChanged",(()=>{forceUpdate(this.el)}))}disconnectedCallback(){instance.off("languageChanged")}componentWillLoad(){this.accordionsOpened("some"),this.expanded=!1,this.collapsed=!1}render(){const{openSingle:e}=this,t=this.el.classList.contains("va-search-filter__accordion"),a=classnames({"usa-accordion":!0});return h(Host,{key:"1baf987fde91ff624b1fb194108e52cbda711119"},h("div",{key:"174296e1a88b7ee61ee186e7a32ded09088be787",class:a,ref:e=>this.accordionContainer=e},e||t?null:h("ul",{class:"expand-collapse-list"},h("li",null,h("button",{class:"va-accordion__button","data-testid":"expand-all-accordions",ref:e=>this.expandCollapseBtn=e,onClick:()=>this.expandCollapseAll(!0),"aria-pressed":this.expanded?"true":"false","aria-label":instance.t("expand-all-aria-label")},instance.t("expand-all"))),h("li",null,h("button",{class:"va-accordion__button","data-testid":"collapse-all-accordions",ref:e=>this.expandCollapseBtn=e,onClick:()=>this.expandCollapseAll(!1),"aria-pressed":this.collapsed?"true":"false","aria-label":instance.t("collapse-all-aria-label")},instance.t("collapse-all")))),h("slot",{key:"a88261eb6202092df0ae4382cf1bf68928e29e2e"})))}get el(){return this}static get style(){return VaAccordionStyle0}},[1,"va-accordion",{openSingle:[4,"open-single"],disableAnalytics:[4,"disable-analytics"],sectionHeading:[1,"section-heading"],expanded:[32],collapsed:[32]},[[0,"accordionItemToggled","itemToggledHandler"]]]);function defineCustomElement(){"undefined"!=typeof customElements&&["va-accordion"].forEach((e=>{"va-accordion"===e&&(customElements.get(e)||customElements.define(e,VaAccordion))}))}export{VaAccordion as V,defineCustomElement as d};
1
+ import{Build,proxyCustomElement,HTMLElement,createEvent,forceUpdate,h,Host}from"@stencil/core/internal/client";import{a as getSlottedNodes}from"./utils.js";import"./contacts.js";import{c as classnames}from"./index2.js";import{i as instance}from"./i18next.js";const vaAccordionCss='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}.usa-accordion{margin-bottom:0;margin-top:0;list-style-type:none;padding-left:0;color:#1b1b1b;margin:0;padding:0;width:100%;font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.5}.usa-accordion>li{margin-bottom:0;max-width:unset}.usa-accordion>ul li ul{list-style:disc}.usa-accordion>ul li ul>li>ul{list-style:circle}.usa-accordion>ul li ul>li>ul>li>ul{list-style:square}.usa-accordion+.usa-accordion,.usa-accordion+.usa-accordion--bordered{margin-top:0.5rem}.usa-accordion--bordered .usa-accordion__content{border-bottom:0.25rem solid #f0f0f0;border-left:0.25rem solid #f0f0f0;border-right:0.25rem solid #f0f0f0;padding-bottom:1rem}.usa-accordion--bordered .usa-accordion__heading{margin-bottom:0}.usa-accordion__heading,.usa-prose .usa-accordion__heading{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:0.9;margin:0}.usa-accordion__heading:not(:first-child),.usa-prose .usa-accordion__heading:not(:first-child){margin-top:0.5rem}.usa-accordion__content{color:#1b1b1b;background-color:white;margin-top:0;overflow:auto;padding:1rem 1.25rem calc(1rem - 0.25rem) 1.25rem}.usa-accordion__content>*:first-child{margin-top:0}.usa-accordion__content>*:last-child{margin-bottom:0}.usa-accordion__button{color:#005ea2;text-decoration:underline;background-color:transparent;border:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none;font-weight:normal;-ms-flex-pack:normal;justify-content:normal;text-align:left;margin:0;padding:0;width:auto;color:#1b1b1b;background-color:#f0f0f0;background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;background-position:right 1.25rem center;background-size:1.5rem;cursor:pointer;display:inline-block;font-weight:700;margin:0;padding:1rem 3.5rem 1rem 1.25rem;text-decoration:none;width:100%}.usa-accordion__button:visited{color:#54278f}.usa-accordion__button:hover{color:#1a4480}.usa-accordion__button:active{color:#162e51}.usa-accordion__button:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-accordion__button:hover,.usa-accordion__button.usa-button--hover,.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button:disabled.usa-button--hover,.usa-accordion__button[aria-disabled=true].usa-button--hover,.usa-accordion__button:active,.usa-accordion__button.usa-button--active,.usa-accordion__button:disabled:active,.usa-accordion__button[aria-disabled=true]:active,.usa-accordion__button:disabled.usa-button--active,.usa-accordion__button[aria-disabled=true].usa-button--active,.usa-accordion__button:disabled:focus,.usa-accordion__button[aria-disabled=true]:focus,.usa-accordion__button:disabled.usa-focus,.usa-accordion__button[aria-disabled=true].usa-focus,.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-accordion__button.usa-button--hover{color:#1a4480}.usa-accordion__button.usa-button--active{color:#162e51}.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button[aria-disabled=true]:focus{color:GrayText}}.usa-accordion__button:hover{color:#1b1b1b;background-color:#dfe1e2;background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;text-decoration:none}@media (forced-colors: active){.usa-accordion__button{border:2px solid transparent;position:relative}.usa-accordion__button::before{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1.5rem 1.5rem;display:inline-block;height:1.5rem;width:1.5rem;height:100%;position:absolute;right:1.25rem;top:0;content:""}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-accordion__button::before{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1.5rem 1.5rem;mask-size:1.5rem 1.5rem}}}.usa-accordion__button[aria-expanded=false]{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;background-size:1.5rem}.usa-accordion__button[aria-expanded=false]:hover{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat}@media (forced-colors: active){.usa-accordion__button[aria-expanded=false]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1.5rem 1.5rem;display:inline-block;height:1.5rem;width:1.5rem;height:100%;position:absolute;right:1.25rem;top:0}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-accordion__button[aria-expanded=false]::before{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1.5rem 1.5rem;mask-size:1.5rem 1.5rem}}}.expand-collapse-list{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;list-style:none;margin:0;padding:0}.expand-collapse-list li:first-child::after{content:"|"/"";font-size:0.875rem}button.va-accordion__button{border:none;color:var(--vads-color-link);background:transparent;padding:0.625rem;cursor:pointer;font-family:inherit;font-weight:bold}@media print{button.va-accordion__button{display:none}}',VaAccordionStyle0=vaAccordionCss;Build.isTesting&&instance.init({lng:"cimode"});const VaAccordion=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.accordionExpandCollapseAll=createEvent(this,"accordionExpandCollapseAll",7),this.expandCollapseAll=e=>{this.expanded=e,this.collapsed=!e;const t=e?"allOpen":"allClosed";this.accordionExpandCollapseAll.emit({status:t}),getSlottedNodes(this.el,"va-accordion-item").forEach((t=>{t.setAttribute("open",`${e}`)}))},this.expanded=!1,this.collapsed=!0,this.openSingle=!1,this.disableAnalytics=!1,this.sectionHeading=null}itemToggledHandler(e){var t;const a=e.target.closest("va-accordion-item");if(this.el!==a.parentElement)return;const o=a.querySelector('[slot="headline"]');let n,i;o?(n=null==o?void 0:o.innerHTML,i=parseInt(null===(t=null==o?void 0:o.tagName)||void 0===t?void 0:t.toLowerCase().split("")[1])):(n=a.header,i=a.level),this.openSingle&&getSlottedNodes(this.el,"va-accordion-item").filter((e=>e!==a)).forEach((e=>e.setAttribute("open","false")));const r="false"!==a.getAttribute("open")&&a.hasAttribute("open");if(!this.disableAnalytics){const e={componentName:"va-accordion",action:r?"collapse":"expand",details:{header:n||a.header,subheader:a.subheader,level:i||a.level,sectionHeading:this.sectionHeading}};this.componentLibraryAnalytics.emit(e)}a.setAttribute("open",r?"false":"true"),this.isScrolledIntoView(a)||a.scrollIntoView(),this.accordionsOpened()}accordionsOpened(e="every"){const t=[...this.el.children].filter((e=>"va-accordion-item"===e.tagName.toLowerCase())).map((e=>e.open));return t[e]((e=>!0===e))?this.expanded=!0:t[e]((e=>!1===e))?(this.expanded=!1,this.collapsed=!0):(this.expanded=!1,this.collapsed=!1)}isScrolledIntoView(e){const t=null==e?void 0:e.getBoundingClientRect().top;return!(!t&&0!==t)&&t>=0&&t<=window.innerHeight}connectedCallback(){instance.on("languageChanged",(()=>{forceUpdate(this.el)}))}disconnectedCallback(){instance.off("languageChanged")}componentWillLoad(){this.accordionsOpened("some"),this.expanded=!1,this.collapsed=!1}render(){const{openSingle:e}=this,t=this.el.classList.contains("va-search-filter__accordion"),a=classnames({"usa-accordion":!0});return h(Host,{key:"1baf987fde91ff624b1fb194108e52cbda711119"},h("div",{key:"174296e1a88b7ee61ee186e7a32ded09088be787",class:a,ref:e=>this.accordionContainer=e},e||t?null:h("ul",{class:"expand-collapse-list"},h("li",null,h("button",{class:"va-accordion__button","data-testid":"expand-all-accordions",ref:e=>this.expandCollapseBtn=e,onClick:()=>this.expandCollapseAll(!0),"aria-pressed":this.expanded?"true":"false","aria-label":instance.t("expand-all-aria-label")},instance.t("expand-all"))),h("li",null,h("button",{class:"va-accordion__button","data-testid":"collapse-all-accordions",ref:e=>this.expandCollapseBtn=e,onClick:()=>this.expandCollapseAll(!1),"aria-pressed":this.collapsed?"true":"false","aria-label":instance.t("collapse-all-aria-label")},instance.t("collapse-all")))),h("slot",{key:"a88261eb6202092df0ae4382cf1bf68928e29e2e"})))}get el(){return this}static get style(){return VaAccordionStyle0}},[1,"va-accordion",{openSingle:[4,"open-single"],disableAnalytics:[4,"disable-analytics"],sectionHeading:[1,"section-heading"],expanded:[32],collapsed:[32]},[[0,"accordionItemToggled","itemToggledHandler"]]]);function defineCustomElement(){"undefined"!=typeof customElements&&["va-accordion"].forEach((e=>{"va-accordion"===e&&(customElements.get(e)||customElements.define(e,VaAccordion))}))}export{VaAccordion as V,defineCustomElement as d};