gt-react 10.19.3 → 10.19.4

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.
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{GTProvider as r,useLocaleSelector as n,useRegionSelector as o}from"@generaltranslation/react-core";export{Branch,Currency,DateTime,Derive,Num,Plural,RelativeTime,Static,T,Var,declareStatic,declareVar,decodeMsg,decodeOptions,decodeVars,derive,gtFallback,mFallback,msg,useDefaultLocale,useGT,useGTClass,useLocale,useLocaleDirection,useLocaleProperties,useLocaleSelector,useLocales,useMessages,useRegion,useRegionSelector,useSetLocale,useTranslations,useVersionId}from"@generaltranslation/react-core";import{useState as i,useEffect as a,useRef as s,useMemo as c}from"react";import{resolveAliasLocale as u,determineLocale as l}from"generaltranslation";function h({projectId:e,devApiKey:t}){try{return{projectId:e||import.meta.env.VITE_GT_PROJECT_ID||import.meta.env.REDWOOD_ENV_GT_PROJECT_ID||"",devApiKey:t||import.meta.env.VITE_GT_DEV_API_KEY||import.meta.env.VITE_GT_API_KEY||import.meta.env.REDWOOD_ENV_GT_DEV_API_KEY||import.meta.env.REDWOOD_ENV_GT_API_KEY}}catch(e){}try{return{projectId:e||process.env.GT_PROJECT_ID||process.env.REACT_APP_GT_PROJECT_ID||process.env.NEXT_PUBLIC_GT_PROJECT_ID||process.env.GATSBY_GT_PROJECT_ID||"",devApiKey:t||process.env.GT_DEV_API_KEY||process.env.GT_API_KEY||process.env.REACT_APP_GT_DEV_API_KEY||process.env.REACT_APP_GT_API_KEY||process.env.NEXT_PUBLIC_GT_DEV_API_KEY||process.env.NEXT_PUBLIC_GT_API_KEY||process.env.GATSBY_GT_DEV_API_KEY||process.env.GATSBY_GT_API_KEY}}catch(e){console.error(e)}return{projectId:"",devApiKey:""}}function f({_region:e,regionCookieName:t}){var r;const n="undefined"!=typeof document?null===(r=document.cookie.split("; ").find(e=>e.startsWith(`${t}=`)))||void 0===r?void 0:r.split("=")[1]:void 0,o=e||n;return n&&n!==o&&"undefined"!=typeof document&&(document.cookie=`${t}=${o};path=/`),o}function p({_region:e,ssr:t,regionCookieName:r}){const[n,o]=i(t?void 0:f({_region:e,regionCookieName:r}));return a(()=>{o(f({_region:e,regionCookieName:r}))},[e,r]),{region:n,setRegion:e=>{o(e),"undefined"!=typeof document&&(document.cookie=`${r}=${e||""};path=/`)}}}function _({enableI18n:e,enableI18nCookieName:t,enableI18nLoaded:r,ssr:n}){const o=void 0!==r,c=s(!0),[u,l]=i(function({_enableI18n:e,asyncEnabled:t,enableI18nCookieName:r,ssr:n}){if(!t)return e;if(n)return e;const o=E(r);if(null!==o)return o;return e}({_enableI18n:e,asyncEnabled:o,enableI18nCookieName:t,ssr:n}));return a(()=>{if(n&&o&&c.current){c.current=!1;const e=E(t);return void(null!==e&&e!==u&&l(e))}c.current=!1},[n,o,t,u]),a(()=>{u!==e&&(o?r&&(!function({enableI18n:e,enableI18nCookieName:t}){if("undefined"==typeof document)return;document.cookie=`${t}=${e?"true":"false"};path=/;`}({enableI18n:e,enableI18nCookieName:t}),l(e)):l(e))},[e,u,o,r,t]),{enableI18n:u}}function E(e){var t;if("undefined"==typeof document)return null;const r=null===(t=document.cookie.split("; ").find(t=>t.startsWith(`${e}=`)))||void 0===t?void 0:t.split("=")[1];return"true"===r||"false"!==r&&null}var d=function(e,t){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},d(e,t)};function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var m=function(){return m=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},m.apply(this,arguments)};function b(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function v(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function g(e,t){return function(r,n){t(r,n,e)}}function A(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?n.static?e:e.prototype:null,h=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var _={};for(var E in n)_[E]="access"===E?{}:n[E];for(var E in n.access)_.access[E]=n.access[E];_.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var d=(0,r[p])("accessor"===c?{get:h.get,set:h.set}:h[u],_);if("accessor"===c){if(void 0===d)continue;if(null===d||"object"!=typeof d)throw new TypeError("Object expected");(s=a(d.get))&&(h.get=s),(s=a(d.set))&&(h.set=s),(s=a(d.init))&&o.unshift(s)}else(s=a(d))&&("field"===c?o.unshift(s):h[u]=s)}l&&Object.defineProperty(l,n.name,h),f=!0}function P(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function S(e){return"symbol"==typeof e?e:"".concat(e)}function O(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function L(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function w(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})}function H(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var C=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function N(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||C(t,e,r)}function B(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function R(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function I(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(R(arguments[t]));return e}function M(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function U(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function G(e){return this instanceof G?(this.v=e,this):new G(e)}function D(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function(e){return function(t){return Promise.resolve(t).then(e,u)}}),n[Symbol.asyncIterator]=function(){return this},n;function a(e,t){o[e]&&(n[e]=function(t){return new Promise(function(r,n){i.push([e,t,r,n])>1||s(e,t)})},t&&(n[e]=t(n[e])))}function s(e,t){try{(r=o[e](t)).value instanceof G?Promise.resolve(r.value.v).then(c,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function j(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:G(e[n](t)),done:!1}:o?o(t):t}:o}}function k(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=B(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},V=function(e){return V=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},V(e)};function K(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=V(e),n=0;n<r.length;n++)"default"!==r[n]&&C(t,e,r[n]);return F(t,e),t}function X(e){return e&&e.__esModule?e:{default:e}}function Y(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function $(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function W(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function q(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var Z="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function z(e){function t(t){e.error=e.hasError?new Z(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function o(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(i).then(o,function(e){return t(e),o()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function J(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,r,n,o,i){return r?t?".jsx":".js":!n||o&&i?n+o+"."+i.toLowerCase()+"js":e}):e}var Q,ee,te,re,ne,oe={__extends:y,__assign:m,__rest:b,__decorate:v,__param:g,__esDecorate:A,__runInitializers:P,__propKey:S,__setFunctionName:O,__metadata:L,__awaiter:w,__generator:H,__createBinding:C,__exportStar:N,__values:B,__read:R,__spread:I,__spreadArrays:M,__spreadArray:U,__await:G,__asyncGenerator:D,__asyncDelegator:j,__asyncValues:k,__makeTemplateObject:x,__importStar:K,__importDefault:X,__classPrivateFieldGet:Y,__classPrivateFieldSet:$,__classPrivateFieldIn:W,__addDisposableResource:q,__disposeResources:z,__rewriteRelativeImportExtension:J},ie=Object.freeze({__proto__:null,__addDisposableResource:q,get __assign(){return m},__asyncDelegator:j,__asyncGenerator:D,__asyncValues:k,__await:G,__awaiter:w,__classPrivateFieldGet:Y,__classPrivateFieldIn:W,__classPrivateFieldSet:$,__createBinding:C,__decorate:v,__disposeResources:z,__esDecorate:A,__exportStar:N,__extends:y,__generator:H,__importDefault:X,__importStar:K,__makeTemplateObject:x,__metadata:L,__param:g,__propKey:S,__read:R,__rest:b,__rewriteRelativeImportExtension:J,__runInitializers:P,__setFunctionName:O,__spread:I,__spreadArray:U,__spreadArrays:M,__values:B,default:oe}),ae="DEFAULT_TERMINATOR_KEY";(re=Q||(Q={}))[re.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",re[re.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",re[re.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",re[re.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",re[re.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",re[re.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",re[re.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",re[re.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",re[re.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",re[re.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",re[re.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",re[re.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",re[re.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",re[re.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",re[re.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",re[re.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",re[re.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",re[re.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",re[re.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",re[re.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",re[re.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",re[re.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",re[re.INVALID_TAG=23]="INVALID_TAG",re[re.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",re[re.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",re[re.UNCLOSED_TAG=27]="UNCLOSED_TAG",function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(ee||(ee={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(te||(te={}));try{"a"===(null===(ne=function(e,t){return new RegExp(e,t)}("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===ne?void 0:ne[0])}catch(re){0}var se,ce={};function ue(){return se||(se=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.SKELETON_TYPE=ce.TYPE=void 0,ce.isLiteralElement=function(t){return t.type===e.literal},ce.isArgumentElement=function(t){return t.type===e.argument},ce.isNumberElement=function(t){return t.type===e.number},ce.isDateElement=function(t){return t.type===e.date},ce.isTimeElement=function(t){return t.type===e.time},ce.isSelectElement=function(t){return t.type===e.select},ce.isPluralElement=function(t){return t.type===e.plural},ce.isPoundElement=function(t){return t.type===e.pound},ce.isTagElement=function(t){return t.type===e.tag},ce.isNumberSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.number)},ce.isDateTimeSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.dateTime)},ce.createLiteralElement=function(t){return{type:e.literal,value:t}},ce.createNumberElement=function(t,r){return{type:e.number,value:t,style:r}},function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(e||(ce.TYPE=e={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(t||(ce.SKELETON_TYPE=t={}))),ce;var e,t}ue();var le,he={},fe=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){var r=!1;try{r=this instanceof e}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}(ie);!function(){if(le)return he;le=1,Object.defineProperty(he,"__esModule",{value:!0}),he.printAST=r,he.doPrintAST=n,he.printDateTimeSkeleton=a;var e=fe,t=ue();function r(e){return n(e,!1)}function n(s,c){var u=s.map(function(u,l){return(0,t.isLiteralElement)(u)?function(e,t,r,n){var i=e.value;return r||"'"!==i[0]||(i="''".concat(i.slice(1))),n||"'"!==i[i.length-1]||(i="".concat(i.slice(0,i.length-1),"''")),i=o(i),t?i.replace("#","'#'"):i}(u,c,0===l,l===s.length-1):(0,t.isArgumentElement)(u)?function(e){var t=e.value;return"{".concat(t,"}")}(u):(0,t.isDateElement)(u)||(0,t.isTimeElement)(u)||(0,t.isNumberElement)(u)?function(e){return"{".concat(e.value,", ").concat(t.TYPE[e.type]).concat(e.style?", ".concat("string"==typeof(r=e.style)?o(r):r.type===t.SKELETON_TYPE.dateTime?"::".concat(a(r)):"::".concat(r.tokens.map(i).join(" "))):"","}");var r}(u):(0,t.isPluralElement)(u)?function(t){var r="cardinal"===t.pluralType?"plural":"selectordinal",o=[t.value,r,e.__spreadArray([t.offset?"offset:".concat(t.offset):""],Object.keys(t.options).map(function(e){return"".concat(e,"{").concat(n(t.options[e].value,!0),"}")}),!0).filter(Boolean).join(" ")].join(",");return"{".concat(o,"}")}(u):(0,t.isSelectElement)(u)?function(e){var t=[e.value,"select",Object.keys(e.options).map(function(t){return"".concat(t,"{").concat(n(e.options[t].value,!1),"}")}).join(" ")].join(",");return"{".concat(t,"}")}(u):(0,t.isPoundElement)(u)?"#":(0,t.isTagElement)(u)?function(e){return"<".concat(e.value,">").concat(r(e.children),"</").concat(e.value,">")}(u):void 0});return u.join("")}function o(e){return e.replace(/([{}](?:[\s\S]*[{}])?)/,"'$1'")}function i(e){var t=e.stem,r=e.options;return 0===r.length?t:"".concat(t).concat(r.map(function(e){return"/".concat(e)}).join(""))}function a(e){return e.pattern}}();function pe(e,t,r=""){const n=function(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name&&"BYTES_PER_ELEMENT"in e&&1===e.BYTES_PER_ELEMENT}(e),o=e?.length;if(!n||void 0!==t){const t=(r&&`"${r}" `)+"expected Uint8Array, got "+(n?`length=${o}`:"type="+typeof e);if(!n)throw new TypeError(t);throw new RangeError(t)}return e}function _e(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Ee(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function de(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ye(e,t){return e<<32-t|e>>>t}const me="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,be=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ve(e,t,r){return e&t^~e&r}function ge(e,t,r){return e&t^e&r^t&r}class Te{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,r,n){this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(e),this.view=de(this.buffer)}update(e){_e(this),pe(e);const{view:t,buffer:r,blockLen:n}=this,o=e.length;for(let i=0;i<o;){const a=Math.min(n-this.pos,o-i);if(a===n){const t=de(e);for(;n<=o-i;i+=n)this.process(t,i);continue}r.set(e.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){_e(this),function(e,t){pe(e,void 0,"digestInto() output");const r=t.outputLen;if(e.length<r)throw new RangeError('"digestInto() output" expected to be of length >='+r)}(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:i}=this;t[i++]=128,Ee(this.buffer.subarray(i)),this.padOffset>n-i&&(this.process(r,0),i=0);for(let e=i;e<n;e++)t[e]=0;r.setBigUint64(n-8,BigInt(8*this.length),o),this.process(r,0);const a=de(e),s=this.outputLen;if(s%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=s/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)a.setUint32(4*e,u[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||=new this.constructor,e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:i,pos:a}=this;return e.destroyed=i,e.finished=o,e.length=n,e.pos=a,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}const Ae=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Pe=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Se=new Uint32Array(64);class Oe extends Te{constructor(e){super(64,e,8,!1)}get(){const{A:e,B:t,C:r,D:n,E:o,F:i,G:a,H:s}=this;return[e,t,r,n,o,i,a,s]}set(e,t,r,n,o,i,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|i,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)Se[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=Se[e-15],r=Se[e-2],n=ye(t,7)^ye(t,18)^t>>>3,o=ye(r,17)^ye(r,19)^r>>>10;Se[e]=o+Se[e-7]+n+Se[e-16]|0}let{A:r,B:n,C:o,D:i,E:a,F:s,G:c,H:u}=this;for(let e=0;e<64;e++){const t=u+(ye(a,6)^ye(a,11)^ye(a,25))+ve(a,s,c)+Pe[e]+Se[e]|0,l=(ye(r,2)^ye(r,13)^ye(r,22))+ge(r,n,o)|0;u=c,c=s,s=a,a=i+t|0,i=o,o=n,n=r,r=t+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,i=i+this.D|0,a=a+this.E|0,s=s+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,o,i,a,s,c,u)}roundClean(){Ee(Se)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),Ee(this.buffer)}}class Le extends Oe{A=0|Ae[0];B=0|Ae[1];C=0|Ae[2];D=0|Ae[3];E=0|Ae[4];F=0|Ae[5];G=0|Ae[6];H=0|Ae[7];constructor(){super(32)}}const we=function(e,t={}){const r=(t,r)=>e(r).update(t).digest(),n=e(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.canXOF=n.canXOF,r.create=t=>e(t),Object.assign(r,t),Object.freeze(r)}(()=>new Le,(He=1,{oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,He])}));var He,Ce=function(e,t){return Ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Ce(e,t)};function Ne(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ce(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var Be=function(){return Be=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Be.apply(this,arguments)};function Re(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function Ie(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function Me(e,t){return function(r,n){t(r,n,e)}}function Ue(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?n.static?e:e.prototype:null,h=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var _={};for(var E in n)_[E]="access"===E?{}:n[E];for(var E in n.access)_.access[E]=n.access[E];_.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var d=(0,r[p])("accessor"===c?{get:h.get,set:h.set}:h[u],_);if("accessor"===c){if(void 0===d)continue;if(null===d||"object"!=typeof d)throw new TypeError("Object expected");(s=a(d.get))&&(h.get=s),(s=a(d.set))&&(h.set=s),(s=a(d.init))&&o.unshift(s)}else(s=a(d))&&("field"===c?o.unshift(s):h[u]=s)}l&&Object.defineProperty(l,n.name,h),f=!0}function Ge(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function De(e){return"symbol"==typeof e?e:"".concat(e)}function je(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function ke(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function xe(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})}function Fe(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var Ve=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function Ke(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||Ve(t,e,r)}function Xe(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ye(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function $e(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ye(arguments[t]));return e}function We(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function qe(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function Ze(e){return this instanceof Ze?(this.v=e,this):new Ze(e)}function ze(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function(e){return function(t){return Promise.resolve(t).then(e,u)}}),n[Symbol.asyncIterator]=function(){return this},n;function a(e,t){o[e]&&(n[e]=function(t){return new Promise(function(r,n){i.push([e,t,r,n])>1||s(e,t)})},t&&(n[e]=t(n[e])))}function s(e,t){try{(r=o[e](t)).value instanceof Ze?Promise.resolve(r.value.v).then(c,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function Je(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:Ze(e[n](t)),done:!1}:o?o(t):t}:o}}function Qe(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=Xe(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function et(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var tt=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},rt=function(e){return rt=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},rt(e)};function nt(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=rt(e),n=0;n<r.length;n++)"default"!==r[n]&&Ve(t,e,r[n]);return tt(t,e),t}function ot(e){return e&&e.__esModule?e:{default:e}}function it(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function at(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function st(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function ct(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var ut="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function lt(e){function t(t){e.error=e.hasError?new ut(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function o(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(i).then(o,function(e){return t(e),o()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function ht(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,r,n,o,i){return r?t?".jsx":".js":!n||o&&i?n+o+"."+i.toLowerCase()+"js":e}):e}var ft,pt,_t,Et={__extends:Ne,__assign:Be,__rest:Re,__decorate:Ie,__param:Me,__esDecorate:Ue,__runInitializers:Ge,__propKey:De,__setFunctionName:je,__metadata:ke,__awaiter:xe,__generator:Fe,__createBinding:Ve,__exportStar:Ke,__values:Xe,__read:Ye,__spread:$e,__spreadArrays:We,__spreadArray:qe,__await:Ze,__asyncGenerator:ze,__asyncDelegator:Je,__asyncValues:Qe,__makeTemplateObject:et,__importStar:nt,__importDefault:ot,__classPrivateFieldGet:it,__classPrivateFieldSet:at,__classPrivateFieldIn:st,__addDisposableResource:ct,__disposeResources:lt,__rewriteRelativeImportExtension:ht},dt=Object.freeze({__proto__:null,__addDisposableResource:ct,get __assign(){return Be},__asyncDelegator:Je,__asyncGenerator:ze,__asyncValues:Qe,__await:Ze,__awaiter:xe,__classPrivateFieldGet:it,__classPrivateFieldIn:st,__classPrivateFieldSet:at,__createBinding:Ve,__decorate:Ie,__disposeResources:lt,__esDecorate:Ue,__exportStar:Ke,__extends:Ne,__generator:Fe,__importDefault:ot,__importStar:nt,__makeTemplateObject:et,__metadata:ke,__param:Me,__propKey:De,__read:Ye,__rest:Re,__rewriteRelativeImportExtension:ht,__runInitializers:Ge,__setFunctionName:je,__spread:$e,__spreadArray:qe,__spreadArrays:We,__values:Xe,default:Et}),yt="DEFAULT_TERMINATOR_KEY";!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(ft||(ft={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(pt||(pt={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(_t||(_t={}));var mt=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,bt=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function vt(e){var t={};return e.replace(bt,function(e){var r=e.length;switch(e[0]){case"G":t.era=4===r?"long":5===r?"narrow":"short";break;case"y":t.year=2===r?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===r?"long":5===r?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var gt=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Tt(e){return e.replace(/^(.*?)-/,"")}var At=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Pt=/^(@+)?(\+|#+)?[rs]?$/g,St=/(\*)(0+)|(#+)(0+)|(0+)/g,Ot=/^(0+)$/;function Lt(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(Pt,function(e,r,n){return"string"!=typeof n?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):"+"===n?t.minimumSignificantDigits=r.length:"#"===r[0]?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""}),t}function wt(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Ht(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if("+!"===r?(t.signDisplay="always",e=e.slice(2)):"+?"===r&&(t.signDisplay="exceptZero",e=e.slice(2)),!Ot.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Ct(e){return wt(e)||{}}function Nt(e){for(var t={},r=0,n=e;r<n.length;r++){var o=n[r];switch(o.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=o.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Tt(o.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=Be(Be(Be({},t),{notation:"scientific"}),o.options.reduce(function(e,t){return Be(Be({},e),Ct(t))},{}));continue;case"engineering":t=Be(Be(Be({},t),{notation:"engineering"}),o.options.reduce(function(e,t){return Be(Be({},e),Ct(t))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(o.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(St,function(e,r,n,o,i,a){if(r)t.minimumIntegerDigits=n.length;else{if(o&&i)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Ot.test(o.stem))t.minimumIntegerDigits=o.stem.length;else if(At.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(At,function(e,r,n,o,i,a){return"*"===n?t.minimumFractionDigits=r.length:o&&"#"===o[0]?t.maximumFractionDigits=o.length:i&&a?(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length+a.length):(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length),""});var i=o.options[0];"w"===i?t=Be(Be({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=Be(Be({},t),Lt(i)))}else if(Pt.test(o.stem))t=Be(Be({},t),Lt(o.stem));else{var a=wt(o.stem);a&&(t=Be(Be({},t),a));var s=Ht(o.stem);s&&(t=Be(Be({},t),s))}}return t}var Bt,Rt={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function It(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r,n=e.language;return"root"!==n&&(r=e.maximize().region),(Rt[r||""]||Rt[n||""]||Rt["".concat(n,"-001")]||Rt["001"])[0]}var Mt=new RegExp("^".concat(mt.source,"*")),Ut=new RegExp("".concat(mt.source,"*$"));function Gt(e,t){return{start:e,end:t}}var Dt=!!String.prototype.startsWith&&"_a".startsWith("a",1),jt=!!String.fromCodePoint,kt=!!Object.fromEntries,xt=!!String.prototype.codePointAt,Ft=!!String.prototype.trimStart,Vt=!!String.prototype.trimEnd,Kt=Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Xt=!0;try{Xt="a"===(null===(Bt=Qt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Bt?void 0:Bt[0])}catch(br){Xt=!1}var Yt,$t=Dt?function(e,t,r){return e.startsWith(t,r)}:function(e,t,r){return e.slice(r,r+t.length)===t},Wt=jt?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r,n="",o=e.length,i=0;o>i;){if((r=e[i++])>1114111)throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},qt=kt?Object.fromEntries:function(e){for(var t={},r=0,n=e;r<n.length;r++){var o=n[r],i=o[0],a=o[1];t[i]=a}return t},Zt=xt?function(e,t){return e.codePointAt(t)}:function(e,t){var r=e.length;if(!(t<0||t>=r)){var n,o=e.charCodeAt(t);return o<55296||o>56319||t+1===r||(n=e.charCodeAt(t+1))<56320||n>57343?o:n-56320+(o-55296<<10)+65536}},zt=Ft?function(e){return e.trimStart()}:function(e){return e.replace(Mt,"")},Jt=Vt?function(e){return e.trimEnd()}:function(e){return e.replace(Ut,"")};function Qt(e,t){return new RegExp(e,t)}if(Xt){var er=Qt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Yt=function(e,t){var r;return er.lastIndex=t,null!==(r=er.exec(e)[1])&&void 0!==r?r:""}}else Yt=function(e,t){for(var r=[];;){var n=Zt(e,t);if(void 0===n||or(n)||ir(n))break;r.push(n),t+=n>=65536?2:1}return Wt.apply(void 0,r)};var tr=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,r){for(var n=[];!this.isEOF();){var o=this.char();if(123===o){if((i=this.parseArgument(e,r)).err)return i;n.push(i.val)}else{if(125===o&&e>0)break;if(35!==o||"plural"!==t&&"selectordinal"!==t){if(60===o&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(ft.UNMATCHED_CLOSING_TAG,Gt(this.clonePosition(),this.clonePosition()))}if(60===o&&!this.ignoreTag&&rr(this.peek()||0)){if((i=this.parseTag(e,t)).err)return i;n.push(i.val)}else{var i;if((i=this.parseLiteral(e,t)).err)return i;n.push(i.val)}}else{var a=this.clonePosition();this.bump(),n.push({type:pt.pound,location:Gt(a,this.clonePosition())})}}}return{val:n,err:null}},e.prototype.parseTag=function(e,t){var r=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:pt.literal,value:"<".concat(n,"/>"),location:Gt(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(e+1,t,!0);if(o.err)return o;var i=o.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!rr(this.char()))return this.error(ft.INVALID_TAG,Gt(a,this.clonePosition()));var s=this.clonePosition();return n!==this.parseTagName()?this.error(ft.UNMATCHED_CLOSING_TAG,Gt(s,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:pt.tag,value:n,children:i,location:Gt(r,this.clonePosition())},err:null}:this.error(ft.INVALID_TAG,Gt(a,this.clonePosition())))}return this.error(ft.UNCLOSED_TAG,Gt(r,this.clonePosition()))}return this.error(ft.INVALID_TAG,Gt(r,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&nr(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var r=this.clonePosition(),n="";;){var o=this.tryParseQuote(t);if(o)n+=o;else{var i=this.tryParseUnquoted(e,t);if(i)n+=i;else{var a=this.tryParseLeftAngleBracket();if(!a)break;n+=a}}}var s=Gt(r,this.clonePosition());return{val:{type:pt.literal,value:n,location:s},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(rr(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(39===r){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(r);this.bump()}return Wt.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var r=this.char();return 60===r||123===r||35===r&&("plural"===t||"selectordinal"===t)||125===r&&e>0?null:(this.bump(),Wt(r))},e.prototype.parseArgument=function(e,t){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,Gt(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error(ft.EMPTY_ARGUMENT,Gt(r,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(ft.MALFORMED_ARGUMENT,Gt(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,Gt(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:pt.argument,value:n,location:Gt(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,Gt(r,this.clonePosition())):this.parseArgumentOptions(e,t,n,r);default:return this.error(ft.MALFORMED_ARGUMENT,Gt(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),r=Yt(this.message,t),n=t+r.length;return this.bumpTo(n),{value:r,location:Gt(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,r,n){var o,i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,s=this.clonePosition();switch(a){case"":return this.error(ft.EXPECT_ARGUMENT_TYPE,Gt(i,s));case"number":case"date":case"time":this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition();if((y=this.parseSimpleArgStyleIfPossible()).err)return y;if(0===(p=Jt(y.val)).length)return this.error(ft.EXPECT_ARGUMENT_STYLE,Gt(this.clonePosition(),this.clonePosition()));c={style:p,styleLocation:Gt(u,this.clonePosition())}}if((m=this.tryParseArgumentClose(n)).err)return m;var l=Gt(n,this.clonePosition());if(c&&$t(null==c?void 0:c.style,"::",0)){var h=zt(c.style.slice(2));if("number"===a)return(y=this.parseNumberSkeletonFromString(h,c.styleLocation)).err?y:{val:{type:pt.number,value:r,location:l,style:y.val},err:null};if(0===h.length)return this.error(ft.EXPECT_DATE_TIME_SKELETON,l);var f=h;this.locale&&(f=function(e,t){for(var r="",n=0;n<e.length;n++){var o=e.charAt(n);if("j"===o){for(var i=0;n+1<e.length&&e.charAt(n+1)===o;)i++,n++;var a=1+(1&i),s=i<2?1:3+(i>>1),c=It(t);for("H"!=c&&"k"!=c||(s=0);s-- >0;)r+="a";for(;a-- >0;)r=c+r}else r+="J"===o?"H":o}return r}(h,this.locale));var p={type:_t.dateTime,pattern:f,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?vt(f):{}};return{val:{type:"date"===a?pt.date:pt.time,value:r,location:l,style:p},err:null}}return{val:{type:"number"===a?pt.number:"date"===a?pt.date:pt.time,value:r,location:l,style:null!==(o=null==c?void 0:c.style)&&void 0!==o?o:null},err:null};case"plural":case"selectordinal":case"select":var _=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ft.EXPECT_SELECT_ARGUMENT_OPTIONS,Gt(_,Be({},_)));this.bumpSpace();var E=this.parseIdentifierIfPossible(),d=0;if("select"!==a&&"offset"===E.value){if(!this.bumpIf(":"))return this.error(ft.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Gt(this.clonePosition(),this.clonePosition()));var y;if(this.bumpSpace(),(y=this.tryParseDecimalInteger(ft.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ft.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return y;this.bumpSpace(),E=this.parseIdentifierIfPossible(),d=y.val}var m,b=this.tryParsePluralOrSelectOptions(e,a,t,E);if(b.err)return b;if((m=this.tryParseArgumentClose(n)).err)return m;var v=Gt(n,this.clonePosition());return"select"===a?{val:{type:pt.select,value:r,options:qt(b.val),location:v},err:null}:{val:{type:pt.plural,value:r,options:qt(b.val),offset:d,pluralType:"plural"===a?"cardinal":"ordinal",location:v},err:null};default:return this.error(ft.INVALID_ARGUMENT_TYPE,Gt(i,s))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,Gt(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ft.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Gt(r,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var r=[];try{r=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],r=0,n=e.split(gt).filter(function(e){return e.length>0});r<n.length;r++){var o=n[r].split("/");if(0===o.length)throw new Error("Invalid number skeleton");for(var i=o[0],a=o.slice(1),s=0,c=a;s<c.length;s++)if(0===c[s].length)throw new Error("Invalid number skeleton");t.push({stem:i,options:a})}return t}(e)}catch(e){return this.error(ft.INVALID_NUMBER_SKELETON,t)}return{val:{type:_t.number,tokens:r,location:t,parsedOptions:this.shouldParseSkeletons?Nt(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,r,n){for(var o,i=!1,a=[],s=new Set,c=n.value,u=n.location;;){if(0===c.length){var l=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var h=this.tryParseDecimalInteger(ft.EXPECT_PLURAL_ARGUMENT_SELECTOR,ft.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;u=Gt(l,this.clonePosition()),c=this.message.slice(l.offset,this.offset())}if(s.has(c))return this.error("select"===t?ft.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ft.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);"other"===c&&(i=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?ft.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ft.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Gt(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(e+1,t,r);if(p.err)return p;var _=this.tryParseArgumentClose(f);if(_.err)return _;a.push([c,{value:p.val,location:Gt(f,this.clonePosition())}]),s.add(c),this.bumpSpace(),c=(o=this.parseIdentifierIfPossible()).value,u=o.location}return 0===a.length?this.error("select"===t?ft.EXPECT_SELECT_ARGUMENT_SELECTOR:ft.EXPECT_PLURAL_ARGUMENT_SELECTOR,Gt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(ft.MISSING_OTHER_CLAUSE,Gt(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,i=0;!this.isEOF();){var a=this.char();if(!(a>=48&&a<=57))break;o=!0,i=10*i+(a-48),this.bump()}var s=Gt(n,this.clonePosition());return o?Kt(i*=r)?{val:i,err:null}:this.error(t,s):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=Zt(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if($t(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),r=this.message.indexOf(e,t);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&or(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),r=this.message.charCodeAt(t+(e>=65536?2:1));return null!=r?r:null},e}();function rr(e){return e>=97&&e<=122||e>=65&&e<=90}function nr(e){return 45===e||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function or(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function ir(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function ar(e){e.forEach(function(e){if(delete e.location,function(e){return e.type===pt.select}(e)||function(e){return e.type===pt.plural}(e))for(var t in e.options)delete e.options[t].location,ar(e.options[t].value);else(function(e){return e.type===pt.number})(e)&&function(e){return!(!e||"object"!=typeof e||e.type!==_t.number)}(e.style)||(function(e){return e.type===pt.date}(e)||function(e){return e.type===pt.time}(e))&&function(e){return!(!e||"object"!=typeof e||e.type!==_t.dateTime)}(e.style)?delete e.style.location:function(e){return e.type===pt.tag}(e)&&ar(e.children)})}function sr(e){var t=e.icuString,r=e.shouldVisit,n=e.visitor,o=e.options,i=o.recurseIntoVisited,a=void 0===i||i,s=function(e,t){void 0===t&&(t={}),t=Be({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new tr(e,t).parse();if(r.err){var n=SyntaxError(ft[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return(null==t?void 0:t.captureLocation)||ar(r.val),r.val}(t,Re(o,["recurseIntoVisited"]));return c(s),s;function c(e){e.map(u)}function u(e){var t=!1;r(e)&&(n(e),t=!0),t&&!a||(e.type===pt.select||e.type===pt.plural?Object.values(e.options).map(function(e){return e.value}).map(c):e.type===pt.tag&&c(e.children))}}var cr,ur="_gt_",lr=new RegExp("^".concat(ur,"$")),hr={};function fr(){return cr||(cr=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.SKELETON_TYPE=hr.TYPE=void 0,hr.isLiteralElement=function(t){return t.type===e.literal},hr.isArgumentElement=function(t){return t.type===e.argument},hr.isNumberElement=function(t){return t.type===e.number},hr.isDateElement=function(t){return t.type===e.date},hr.isTimeElement=function(t){return t.type===e.time},hr.isSelectElement=function(t){return t.type===e.select},hr.isPluralElement=function(t){return t.type===e.plural},hr.isPoundElement=function(t){return t.type===e.pound},hr.isTagElement=function(t){return t.type===e.tag},hr.isNumberSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.number)},hr.isDateTimeSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.dateTime)},hr.createLiteralElement=function(t){return{type:e.literal,value:t}},hr.createNumberElement=function(t,r){return{type:e.number,value:t,style:r}},function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(e||(hr.TYPE=e={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(t||(hr.SKELETON_TYPE=t={}))),hr;var e,t}var pr=fr();function _r(e){var t;return e.type===pr.TYPE.select&&lr.test(e.value)&&!!e.options.other&&(0===e.options.other.value.length||e.options.other.value.length>0&&(null===(t=e.options.other.value[0])||void 0===t?void 0:t.type)===pr.TYPE.literal)}function Er(e){if(!e.includes(ur))return e;var t=[];sr({icuString:e,shouldVisit:_r,visitor:function(e){var r,n,o,i,a,s,c,u;t.push({start:null!==(n=null===(r=e.location)||void 0===r?void 0:r.start.offset)&&void 0!==n?n:0,end:null!==(i=null===(o=e.location)||void 0===o?void 0:o.end.offset)&&void 0!==i?i:0,otherStart:null!==(s=null===(a=e.options.other.location)||void 0===a?void 0:a.start.offset)&&void 0!==s?s:0,otherEnd:null!==(u=null===(c=e.options.other.location)||void 0===c?void 0:c.end.offset)&&void 0!==u?u:0})},options:{recurseIntoVisited:!1,captureLocation:!0}});for(var r=[],n=0,o=0;o<t.length;o++){var i=t[o],a=i.start,s=i.end,c=i.otherStart,u=i.otherEnd;r.push(e.slice(n,a)),r.push(e.slice(a,a+4+1)),r.push(String(o+1)),r.push(e.slice(a+4+1,c)),r.push("{}"),r.push(e.slice(u,s)),n=s}return r.push(e.slice(n,e.length)),r.join("")}var dr,yr={},mr=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){var r=!1;try{r=this instanceof e}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}(dt);!function(){if(dr)return yr;dr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.printAST=r,yr.doPrintAST=n,yr.printDateTimeSkeleton=a;var e=mr,t=fr();function r(e){return n(e,!1)}function n(s,c){var u=s.map(function(u,l){return(0,t.isLiteralElement)(u)?function(e,t,r,n){var i=e.value;return r||"'"!==i[0]||(i="''".concat(i.slice(1))),n||"'"!==i[i.length-1]||(i="".concat(i.slice(0,i.length-1),"''")),i=o(i),t?i.replace("#","'#'"):i}(u,c,0===l,l===s.length-1):(0,t.isArgumentElement)(u)?function(e){var t=e.value;return"{".concat(t,"}")}(u):(0,t.isDateElement)(u)||(0,t.isTimeElement)(u)||(0,t.isNumberElement)(u)?function(e){return"{".concat(e.value,", ").concat(t.TYPE[e.type]).concat(e.style?", ".concat("string"==typeof(r=e.style)?o(r):r.type===t.SKELETON_TYPE.dateTime?"::".concat(a(r)):"::".concat(r.tokens.map(i).join(" "))):"","}");var r}(u):(0,t.isPluralElement)(u)?function(t){var r="cardinal"===t.pluralType?"plural":"selectordinal",o=[t.value,r,e.__spreadArray([t.offset?"offset:".concat(t.offset):""],Object.keys(t.options).map(function(e){return"".concat(e,"{").concat(n(t.options[e].value,!0),"}")}),!0).filter(Boolean).join(" ")].join(",");return"{".concat(o,"}")}(u):(0,t.isSelectElement)(u)?function(e){var t=[e.value,"select",Object.keys(e.options).map(function(t){return"".concat(t,"{").concat(n(e.options[t].value,!1),"}")}).join(" ")].join(",");return"{".concat(t,"}")}(u):(0,t.isPoundElement)(u)?"#":(0,t.isTagElement)(u)?function(e){return"<".concat(e.value,">").concat(r(e.children),"</").concat(e.value,">")}(u):void 0});return u.join("")}function o(e){return e.replace(/([{}](?:[\s\S]*[{}])?)/,"'$1'")}function i(e){var t=e.stem,r=e.options;return 0===r.length?t:"".concat(t).concat(r.map(function(e){return"/".concat(e)}).join(""))}function a(e){return e.pattern}}();var br=function(){return br=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},br.apply(this,arguments)};function vr(e){if(void 0!==e){if(null===e)return"null";if("number"==typeof e)return isFinite(e)?""+e:"null";if("object"!=typeof e)return JSON.stringify(e);if(Array.isArray(e)){for(var t="[",r=0;r<e.length;r++)r&&(t+=","),t+=vr(e[r])||"null";return t+"]"}for(var n="",o=0,i=Object.keys(e).sort();o<i.length;o++){var a=i[o],s=vr(e[a]);s&&(n&&(n+=","),n+=JSON.stringify(a)+":"+s)}return"{"+n+"}"}}function gr(e){var t;return null!==(t=vr(e))&&void 0!==t?t:""}function Tr(e){return function(e){if(pe(e),me)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=be[e[r]];return t}(we(function(e){if("string"!=typeof e)throw new TypeError("string expected");return new Uint8Array((new TextEncoder).encode(e))}(e))).slice(0,16)}"function"==typeof SuppressedError&&SuppressedError;var Ar=function(e){if(e&&"object"==typeof e){var t={};if("c"in e&&e.c&&(t.c=Pr(e.c)),"d"in e){var r=null==e?void 0:e.d;(null==r?void 0:r.b)&&(t.b=Object.fromEntries(Object.entries(r.b).map(function(e){return[e[0],Pr(e[1])]}))),(null==r?void 0:r.t)&&(t.t=r.t)}return function(e){var t=e;if(t&&"object"==typeof t&&"string"==typeof t.k){var r=Object.keys(t);if(1===r.length)return!0;if(2===r.length){if("number"==typeof t.i)return!0;if("string"==typeof t.v)return!0}if(3===r.length&&"string"==typeof t.v&&"number"==typeof t.i)return!0}return!1}(e)?br({k:e.k},e.v&&{v:e.v}):t}return e};function Pr(e){return Array.isArray(e)?e.map(Ar):Ar(e)}var Sr=function(e,t){return Sr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Sr(e,t)};function Or(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Sr(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var Lr,wr,Hr,Cr=function(){return Cr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Cr.apply(this,arguments)};function Nr(e,t,r,n){return new(r||(r=Promise))(function(t,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r(function(e){e(n)})).then(i,a)}s((n=n.apply(e,[])).next())})}function Br(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}"function"==typeof SuppressedError&&SuppressedError,(Hr=Lr||(Lr={})).GT_REMOTE="gt-remote",Hr.REMOTE="remote",Hr.CUSTOM="custom",Hr.DISABLED="disabled",function(e){e.GT="gt",e.CUSTOM="custom",e.DISABLED="disabled"}(wr||(wr={})),function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="fallback-storage-adapter",t.storage={},t}Or(t,e),t.prototype.getItem=function(e){return this.storage[e]},t.prototype.setItem=function(e,t){this.storage[e]=t},t.prototype.removeItem=function(e){delete this.storage[e]}}(function(){});var Rr=function(){function e(e,t){this.cache={},this.fallbackPromises={},this.cache=structuredClone(e),this.onHit=null==t?void 0:t.onHit,this.onMiss=null==t?void 0:t.onMiss}return e.prototype.setCache=function(e,t){this.cache[e]=t},e.prototype.getCache=function(e){var t=this.genKey(e);return this.cache[t]},e.prototype.getInternalCache=function(){return this.cache},e.prototype.missCache=function(e){return Nr(this,0,void 0,function(){var t,r,n;return Br(this,function(o){switch(o.label){case 0:return t=this.genKey(e),void 0===this.fallbackPromises[t]?[3,2]:[4,this.fallbackPromises[t]];case 1:return[2,o.sent()];case 2:r=this.fallback(e),this.fallbackPromises[t]=r,o.label=3;case 3:return o.trys.push([3,,5,6]),[4,r];case 4:return n=o.sent(),this.cache[t]=n,[2,n];case 5:return delete this.fallbackPromises[t],[7];case 6:return[2]}})})},e}();function Ir(e,t){return function(e,t){var r,n=e.source,o=e.context,i=e.id,a=e.maxChars,s=e.dataFormat;return void 0===t&&(t=Tr),r="JSX"===s?Pr(n):n,t(gr(br(br(br(br({source:r},i&&{id:i}),o&&{context:o}),null!=a&&{maxChars:Math.abs(a)}),s&&{dataFormat:s})))}(Cr(Cr(Cr(Cr({source:"ICU"===t.$format?Er(e):e},(null==t?void 0:t.$context)&&{context:t.$context}),(null==t?void 0:t.$id)&&{id:t.$id}),"$maxChars"in t&&null!=t.$maxChars&&{$maxChars:Math.abs(t.$maxChars)}),{dataFormat:t.$format}))}var Mr=function(e){function t(t){var r=t.init,n=t.translateMany,o=t.lifecycle,i=e.call(this,r,o)||this;return i._queue=[],i._batchTimer=null,i._activeRequests=0,i._translateMany=n,i}return Or(t,e),t.prototype.get=function(e){var t=this.getCache(e);return null!=t&&this.onHit&&this.onHit({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:t}),t},t.prototype.miss=function(e){return Nr(this,0,void 0,function(){var t;return Br(this,function(r){switch(r.label){case 0:return[4,this.missCache(e)];case 1:return null!=(t=r.sent())&&this.onMiss&&this.onMiss({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:t}),[2,t]}})})},t.prototype.genKey=function(e){return Ir(e.message,e.options)},t.prototype.fallback=function(e){var t=this._enqueueTranslation(e);return this._queue.length>=25?this._flushNow():this._scheduleBatch(),t},t.prototype._flushNow=function(){this._batchTimer&&(clearTimeout(this._batchTimer),this._batchTimer=null),this._drainQueue()},t.prototype._scheduleBatch=function(){var e=this;this._batchTimer||(this._batchTimer=setTimeout(function(){e._batchTimer=null,e._drainQueue()},50))},t.prototype._drainQueue=function(){for(;this._queue.length>0&&this._activeRequests<100;){var e=this._queue.splice(0,25);this._sendBatchRequest(e)}this._queue.length>0&&this._scheduleBatch()},t.prototype._enqueueTranslation=function(e){var t=this,r=this.genKey(e),n=e.options;return new Promise(function(o,i){t._queue.push({key:r,source:e.message,metadata:Cr(Cr(Cr(Cr({},(null==n?void 0:n.$context)&&{context:n.$context}),(null==n?void 0:n.$id)&&{id:n.$id}),"$maxChars"in n&&null!=n.$maxChars&&{$maxChars:Math.abs(n.$maxChars)}),{dataFormat:n.$format}),resolve:function(e){return o(e)},reject:i})})},t.prototype._sendBatchRequest=function(e){return Nr(this,0,void 0,function(){var t,r;return Br(this,function(n){switch(n.label){case 0:return this._activeRequests++,t=function(e){return e.reduce(function(e,t){return e[t.key]={source:t.source,metadata:t.metadata},e},{})}(e),[4,this._sendBatchRequestWithErrorHandling(e,t)];case 1:return(r=n.sent())&&this._handleTranslationResponse(e,r),this._activeRequests--,[2]}})})},t.prototype._sendBatchRequestWithErrorHandling=function(e,t){return Nr(this,0,void 0,function(){var r,n,o;return Br(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this._translateMany(t)];case 1:return[2,i.sent()];case 2:for(r=i.sent(),n=0,o=e;n<o.length;n++)o[n].reject(r);return[2,void 0];case 3:return[2]}})})},t.prototype._handleTranslationResponse=function(e,t){for(var r=0,n=e;r<n.length;r++){var o=n[r],i=o.key,a=t[i];if(a&&a.success){var s=a.translation;this.setCache(i,s),o.resolve(s)}else o.reject(null==a?void 0:a.error)}},t}(Rr);!function(e){function t(t){var r=t.init,n=void 0===r?{}:r,o=t.ttl,i=t.loadTranslations,a=t.createTranslateMany,s=t.lifecycle,c=s.onLocalesCacheHit,u=s.onLocalesCacheMiss,l=s.onTranslationsCacheHit,h=s.onTranslationsCacheMiss,f=e.call(this,n,{onHit:c,onMiss:u})||this;return f.ttl=6e4,f.ttl=null===o?-1:null!=o?o:6e4,f._translationLoader=i,f._createTranslateMany=a,f._onTranslationsCacheHit=l,f._onTranslationsCacheMiss=h,f}Or(t,e),t.prototype.get=function(e){var t=this.getCache(e);if(t&&!(t.expiresAt>0&&t.expiresAt<Date.now())){var r=t.translationsCache;return null!=r&&this.onHit&&this.onHit({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:r}),r}},t.prototype.miss=function(e){return Nr(this,0,void 0,function(){var t,r;return Br(this,function(n){switch(n.label){case 0:return[4,this.missCache(e)];case 1:return t=n.sent(),null!=(r=t.translationsCache)&&this.onMiss&&this.onMiss({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:r}),[2,r]}})})},t.prototype.genKey=function(e){return e},t.prototype.fallback=function(e){return Nr(this,0,void 0,function(){var t,r,n,o;return Br(this,function(i){switch(i.label){case 0:return t=this._translationLoader(e),r=this.ttl<0?this.ttl:Date.now()+this.ttl,n=Mr.bind,o={},[4,t];case 1:return[2,{translationsCache:new(n.apply(Mr,[void 0,(o.init=i.sent(),o.lifecycle=this._createTranslationsCacheLifecycle(e),o.translateMany=this._createTranslateMany(e),o)])),expiresAt:r}]}})})},t.prototype._createTranslationsCacheLifecycle=function(e){var t=this;return{onHit:this._onTranslationsCacheHit?function(r){return t._onTranslationsCacheHit(Cr({locale:e},r))}:void 0,onMiss:this._onTranslationsCacheMiss?function(r){return t._onTranslationsCacheMiss(Cr({locale:e},r))}:void 0}}}(Rr),"function"==typeof SuppressedError&&SuppressedError;const Ur="gt-react";function Gr({locale:e="",defaultLocale:t="en",locales:r=[],localeCookieName:n="generaltranslation.locale",ssr:o=!0,customMapping:s,enableI18n:h,reloadOnLocaleUpdate:f=!1}){const p=c(()=>u(e,s),[e,s]),_=c(()=>r.map(e=>u(e,s)),[r,s]),[E,d]=i(()=>{if(!h)return t;return u(o?p&&l(p,_,s)||"":Dr({_locale:p,locale:p,locales:_,defaultLocale:t,localeCookieName:n,customMapping:s,enableI18n:h}),s)}),[y,m]=function({locale:e,locales:t,defaultLocale:r,localeCookieName:n,_setLocale:o,customMapping:i,enableI18n:a,reloadOnLocaleUpdate:s}){e=u(e,i);const c=n=>{if(!a)return r;if(n===e)return e;const s=u(l(n,t,i)||e||r,i);return s!==n&&console.warn(((e,t,r="@generaltranslation/react-core")=>`${r} Warning: "${t}" is not a supported locale. Update supported locales in your dashboard or gt.config.json. Falling back to "${e}".`)(s,n,Ur)),o(s),s},h=t=>{if(!a)return;t=u(t);const r=c(t);"undefined"!=typeof document&&(document.cookie=`${n}=${r};path=/`),"undefined"!=typeof window&&t!==e&&s&&window.location.reload()};return[h,c]}({locale:E,locales:_,defaultLocale:t,localeCookieName:n,_setLocale:d,customMapping:s,enableI18n:h,reloadOnLocaleUpdate:f});return a(()=>{const e=Dr({_locale:p,locale:E,locales:_,defaultLocale:t,localeCookieName:n,customMapping:s,enableI18n:h});m(e)},[p,E,_,t,n,h]),[E,y]}function Dr({_locale:e,locale:t,locales:r,defaultLocale:n,localeCookieName:o,customMapping:i,enableI18n:a}){var s;if(!a)return n;if(e&&e===t&&l(e,r,i)===t)return u(e,i);let c="undefined"!=typeof document?null===(s=document.cookie.split("; ").find(e=>e.startsWith(`${o}=`)))||void 0===s?void 0:s.split("=")[1]:void 0;c&&(c=u(c,i));let h="undefined"==typeof navigator?[]:(null===navigator||void 0===navigator?void 0:navigator.languages)?navigator.languages:(null===navigator||void 0===navigator?void 0:navigator.language)?[navigator.language]:(null===navigator||void 0===navigator?void 0:navigator.userLanguage)?[null===navigator||void 0===navigator?void 0:navigator.userLanguage]:[];h=h.map(e=>u(e,i));let f=l([...e?[e]:[],...c?[c]:[],...h],r,i)||n;return f&&(f=u(f,i)),c&&c!==f&&"undefined"!=typeof document&&(document.cookie=`${o}=${f};path=/`),f}function jr(t){return e(r,Object.assign({ssr:!("undefined"==typeof process||!process.env.NEXT_RUNTIME)||void 0!==(null===globalThis||void 0===globalThis?void 0:globalThis.__NEXT_DATA__),environment:process.env.NODE_ENV},t,{readAuthFromEnv:h,useDetermineLocale:Gr,useRegionState:p,useEnableI18n:_}))}function kr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function xr(e){if(!e)return;const t={};for(const r in e)t[r]={name:e[r]};return t}function Fr(r){var{locale:n,locales:o,customNames:i,customMapping:a=xr(i),setLocale:s,getLocaleProperties:c}=r,u=kr(r,["locale","locales","customNames","customMapping","setLocale","getLocaleProperties"]);const l=e=>{if(a&&a[e]){if("string"==typeof a[e])return a[e];if(a[e].name)return a[e].name}return(t=c(e).nativeNameWithRegionCode)?t.charAt(0).toUpperCase()+(t.length>1?t.slice(1):""):"";var t};return o&&0!==o.length&&s?t("select",Object.assign({},u,{value:n||"",onChange:e=>s(e.target.value),children:[!n&&e("option",{value:""}),o.map(t=>e("option",{value:t,suppressHydrationWarning:!0,children:l(t)},t))]})):null}function Vr(t){var{locales:r}=t,o=kr(t,["locales"]);const{locale:i,locales:a,setLocale:s,getLocaleProperties:c}=n(r);return e(Fr,Object.assign({locale:i,locales:a,setLocale:s,getLocaleProperties:c},o))}function Kr(r){var{regions:n,placeholder:i,customMapping:a,prioritizeCurrentLocaleRegion:s,sortRegionsAlphabetically:c,asLocaleSelector:u=!1}=r,l=kr(r,["regions","placeholder","customMapping","prioritizeCurrentLocaleRegion","sortRegionsAlphabetically","asLocaleSelector"]);const{region:h,setRegion:f,regions:p,regionData:_,locale:E,setLocale:d}=o({regions:n,customMapping:a,prioritizeCurrentLocaleRegion:s,sortRegionsAlphabetically:c});return t("select",Object.assign({},l,{value:h||"",onChange:e=>(e=>{if(f(e),u){const t=_.get(e).locale;E!==t&&d(t)}})(e.target.value),children:[!h&&e("option",{value:"",disabled:Boolean(h),hidden:Boolean(h),suppressHydrationWarning:!0,children:i||""},"placeholder"),p.map(t=>e("option",{value:t,suppressHydrationWarning:!0,children:_.get(t).name},t))]}))}"function"==typeof SuppressedError&&SuppressedError;export{jr as GTProvider,Vr as LocaleSelector,Kr as RegionSelector};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{GTProvider as n,useLocaleSelector as r,useRegionSelector as o}from"@generaltranslation/react-core";export{Branch,Currency,DateTime,Derive,Num,Plural,RelativeTime,Static,T,Var,declareStatic,declareVar,decodeMsg,decodeOptions,decodeVars,derive,gtFallback,mFallback,msg,useDefaultLocale,useGT,useGTClass,useLocale,useLocaleDirection,useLocaleProperties,useLocaleSelector,useLocales,useMessages,useRegion,useRegionSelector,useSetLocale,useTranslations,useVersionId}from"@generaltranslation/react-core";import{useState as a,useEffect as i,useRef as c,useMemo as u}from"react";import{resolveAliasLocale as s,determineLocale as l}from"generaltranslation";function f({projectId:e,devApiKey:t}){try{return{projectId:e||import.meta.env.VITE_GT_PROJECT_ID||import.meta.env.REDWOOD_ENV_GT_PROJECT_ID||"",devApiKey:t||import.meta.env.VITE_GT_DEV_API_KEY||import.meta.env.VITE_GT_API_KEY||import.meta.env.REDWOOD_ENV_GT_DEV_API_KEY||import.meta.env.REDWOOD_ENV_GT_API_KEY}}catch(e){}try{return{projectId:e||process.env.GT_PROJECT_ID||process.env.REACT_APP_GT_PROJECT_ID||process.env.NEXT_PUBLIC_GT_PROJECT_ID||process.env.GATSBY_GT_PROJECT_ID||"",devApiKey:t||process.env.GT_DEV_API_KEY||process.env.GT_API_KEY||process.env.REACT_APP_GT_DEV_API_KEY||process.env.REACT_APP_GT_API_KEY||process.env.NEXT_PUBLIC_GT_DEV_API_KEY||process.env.NEXT_PUBLIC_GT_API_KEY||process.env.GATSBY_GT_DEV_API_KEY||process.env.GATSBY_GT_API_KEY}}catch(e){console.error(e)}return{projectId:"",devApiKey:""}}function _({_region:e,regionCookieName:t}){var n;const r="undefined"!=typeof document?null===(n=document.cookie.split("; ").find(e=>e.startsWith(`${t}=`)))||void 0===n?void 0:n.split("=")[1]:void 0,o=e||r;return r&&r!==o&&"undefined"!=typeof document&&(document.cookie=`${t}=${o};path=/`),o}function p({_region:e,ssr:t,regionCookieName:n}){const[r,o]=a(t?void 0:_({_region:e,regionCookieName:n}));return i(()=>{o(_({_region:e,regionCookieName:n}))},[e,n]),{region:r,setRegion:e=>{o(e),"undefined"!=typeof document&&(document.cookie=`${n}=${e||""};path=/`)}}}function E({enableI18n:e,enableI18nCookieName:t,enableI18nLoaded:n,ssr:r}){const o=void 0!==n,u=c(!0),[s,l]=a(function({_enableI18n:e,asyncEnabled:t,enableI18nCookieName:n,ssr:r}){if(!t)return e;if(r)return e;const o=d(n);if(null!==o)return o;return e}({_enableI18n:e,asyncEnabled:o,enableI18nCookieName:t,ssr:r}));return i(()=>{if(r&&o&&u.current){u.current=!1;const e=d(t);return void(null!==e&&e!==s&&l(e))}u.current=!1},[r,o,t,s]),i(()=>{s!==e&&(o?n&&(!function({enableI18n:e,enableI18nCookieName:t}){if("undefined"==typeof document)return;document.cookie=`${t}=${e?"true":"false"};path=/;`}({enableI18n:e,enableI18nCookieName:t}),l(e)):l(e))},[e,s,o,n,t]),{enableI18n:s}}function d(e){var t;if("undefined"==typeof document)return null;const n=null===(t=document.cookie.split("; ").find(t=>t.startsWith(`${e}=`)))||void 0===t?void 0:t.split("=")[1];return"true"===n||"false"!==n&&null}var y=function(e,t){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},y(e,t)};function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)};function v(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function b(e,t,n,r){var o,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i}function g(e,t){return function(n,r){t(n,r,e)}}function A(e,t,n,r,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var c,u=r.kind,s="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?r.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),_=!1,p=n.length-1;p>=0;p--){var E={};for(var d in r)E[d]="access"===d?{}:r[d];for(var d in r.access)E.access[d]=r.access[d];E.addInitializer=function(e){if(_)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var y=(0,n[p])("accessor"===u?{get:f.get,set:f.set}:f[s],E);if("accessor"===u){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(c=i(y.get))&&(f.get=c),(c=i(y.set))&&(f.set=c),(c=i(y.init))&&o.unshift(c)}else(c=i(y))&&("field"===u?o.unshift(c):f[s]=c)}l&&Object.defineProperty(l,r.name,f),_=!0}function L(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function O(e){return"symbol"==typeof e?e:"".concat(e)}function P(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function N(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function S(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function c(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,c)}u((r=r.apply(e,t||[])).next())})}function w(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}var R=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function I(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||R(t,e,n)}function C(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function U(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function M(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(U(arguments[t]));return e}function j(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var a=arguments[t],i=0,c=a.length;i<c;i++,o++)r[o]=a[i];return r}function G(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function D(e){return this instanceof D?(this.v=e,this):new D(e)}function k(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),a=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),i("next"),i("throw"),i("return",function(e){return function(t){return Promise.resolve(t).then(e,s)}}),r[Symbol.asyncIterator]=function(){return this},r;function i(e,t){o[e]&&(r[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(r[e]=t(r[e])))}function c(e,t){try{(n=o[e](t)).value instanceof D?Promise.resolve(n.value.v).then(u,s):l(a[0][2],n)}catch(e){l(a[0][3],e)}var n}function u(e){c("next",e)}function s(e){c("throw",e)}function l(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function x(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:D(e[r](t)),done:!1}:o?o(t):t}:o}}function V(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=C(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,o,(t=e[n](t)).done,t.value)})}}}function F(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var X=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},Y=function(e){return Y=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},Y(e)};function K(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=Y(e),r=0;r<n.length;r++)"default"!==n[r]&&R(t,e,n[r]);return X(t,e),t}function B(e){return e&&e.__esModule?e:{default:e}}function $(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function H(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function z(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function W(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var J="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function Q(e){function t(t){e.error=e.hasError?new J(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function o(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var a=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(a).then(o,function(e){return t(e),o()})}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function q(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,n,r,o,a){return n?t?".jsx":".js":!r||o&&a?r+o+"."+a.toLowerCase()+"js":e}):e}var Z,ee,te,ne,re={__extends:m,__assign:h,__rest:v,__decorate:b,__param:g,__esDecorate:A,__runInitializers:L,__propKey:O,__setFunctionName:P,__metadata:N,__awaiter:S,__generator:w,__createBinding:R,__exportStar:I,__values:C,__read:U,__spread:M,__spreadArrays:j,__spreadArray:G,__await:D,__asyncGenerator:k,__asyncDelegator:x,__asyncValues:V,__makeTemplateObject:F,__importStar:K,__importDefault:B,__classPrivateFieldGet:$,__classPrivateFieldSet:H,__classPrivateFieldIn:z,__addDisposableResource:W,__disposeResources:Q,__rewriteRelativeImportExtension:q},oe=Object.freeze({__proto__:null,__addDisposableResource:W,get __assign(){return h},__asyncDelegator:x,__asyncGenerator:k,__asyncValues:V,__await:D,__awaiter:S,__classPrivateFieldGet:$,__classPrivateFieldIn:z,__classPrivateFieldSet:H,__createBinding:R,__decorate:b,__disposeResources:Q,__esDecorate:A,__exportStar:I,__extends:m,__generator:w,__importDefault:B,__importStar:K,__makeTemplateObject:F,__metadata:N,__param:g,__propKey:O,__read:U,__rest:v,__rewriteRelativeImportExtension:q,__runInitializers:L,__setFunctionName:P,__spread:M,__spreadArray:G,__spreadArrays:j,__values:C,default:re});!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(Z||(Z={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(ee||(ee={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(te||(te={}));try{"a"===(null===(ne=new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===ne?void 0:ne[0])}catch(pe){0}function ae(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var ie,ce={};function ue(){if(ie)return ce;var e,t;return ie=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.SKELETON_TYPE=ce.TYPE=void 0,ce.isLiteralElement=function(t){return t.type===e.literal},ce.isArgumentElement=function(t){return t.type===e.argument},ce.isNumberElement=function(t){return t.type===e.number},ce.isDateElement=function(t){return t.type===e.date},ce.isTimeElement=function(t){return t.type===e.time},ce.isSelectElement=function(t){return t.type===e.select},ce.isPluralElement=function(t){return t.type===e.plural},ce.isPoundElement=function(t){return t.type===e.pound},ce.isTagElement=function(t){return t.type===e.tag},ce.isNumberSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.number)},ce.isDateTimeSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.dateTime)},ce.createLiteralElement=function(t){return{type:e.literal,value:t}},ce.createNumberElement=function(t,n){return{type:e.number,value:t,style:n}},function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(e||(ce.TYPE=e={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(t||(ce.SKELETON_TYPE=t={})),ce}ue();var se,le={},fe=ae(oe);!function(){if(se)return le;se=1,Object.defineProperty(le,"__esModule",{value:!0}),le.printAST=n,le.doPrintAST=r,le.printDateTimeSkeleton=i;var e=fe,t=ue();function n(e){return r(e,!1)}function r(c,u){var s=c.map(function(s,l){return(0,t.isLiteralElement)(s)?function(e,t,n,r){var a=e.value,i=a;n||"'"!==i[0]||(i="''".concat(i.slice(1)));r||"'"!==i[i.length-1]||(i="".concat(i.slice(0,i.length-1),"''"));return i=o(i),t?i.replace("#","'#'"):i}(s,u,0===l,l===c.length-1):(0,t.isArgumentElement)(s)?function(e){var t=e.value;return"{".concat(t,"}")}(s):(0,t.isDateElement)(s)||(0,t.isTimeElement)(s)||(0,t.isNumberElement)(s)?function(e){return"{".concat(e.value,", ").concat(t.TYPE[e.type]).concat(e.style?", ".concat((n=e.style,"string"==typeof n?o(n):n.type===t.SKELETON_TYPE.dateTime?"::".concat(i(n)):"::".concat(n.tokens.map(a).join(" ")))):"","}");var n}(s):(0,t.isPluralElement)(s)?function(t){var n="cardinal"===t.pluralType?"plural":"selectordinal",o=[t.value,n,e.__spreadArray([t.offset?"offset:".concat(t.offset):""],Object.keys(t.options).map(function(e){return"".concat(e,"{").concat(r(t.options[e].value,!0),"}")}),!0).filter(Boolean).join(" ")].join(",");return"{".concat(o,"}")}(s):(0,t.isSelectElement)(s)?function(e){var t=[e.value,"select",Object.keys(e.options).map(function(t){return"".concat(t,"{").concat(r(e.options[t].value,!1),"}")}).join(" ")].join(",");return"{".concat(t,"}")}(s):(0,t.isPoundElement)(s)?"#":(0,t.isTagElement)(s)?function(e){return"<".concat(e.value,">").concat(n(e.children),"</").concat(e.value,">")}(s):void 0});return s.join("")}function o(e){return e.replace(/([{}](?:[\s\S]*[{}])?)/,"'$1'")}function a(e){var t=e.stem,n=e.options;return 0===n.length?t:"".concat(t).concat(n.map(function(e){return"/".concat(e)}).join(""))}function i(e){return e.pattern}}();var _e=function(e,t){return _e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},_e(e,t)};function pe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}_e(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ee=function(){return Ee=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ee.apply(this,arguments)};function de(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function ye(e,t,n,r){var o,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i}function Te(e,t){return function(n,r){t(n,r,e)}}function me(e,t,n,r,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var c,u=r.kind,s="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?r.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),_=!1,p=n.length-1;p>=0;p--){var E={};for(var d in r)E[d]="access"===d?{}:r[d];for(var d in r.access)E.access[d]=r.access[d];E.addInitializer=function(e){if(_)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var y=(0,n[p])("accessor"===u?{get:f.get,set:f.set}:f[s],E);if("accessor"===u){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(c=i(y.get))&&(f.get=c),(c=i(y.set))&&(f.set=c),(c=i(y.init))&&o.unshift(c)}else(c=i(y))&&("field"===u?o.unshift(c):f[s]=c)}l&&Object.defineProperty(l,r.name,f),_=!0}function he(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function ve(e){return"symbol"==typeof e?e:"".concat(e)}function be(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function ge(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function Ae(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function c(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,c)}u((r=r.apply(e,t||[])).next())})}function Le(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}var Oe=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function Pe(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||Oe(t,e,n)}function Ne(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Se(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function we(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Se(arguments[t]));return e}function Re(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var a=arguments[t],i=0,c=a.length;i<c;i++,o++)r[o]=a[i];return r}function Ie(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function Ce(e){return this instanceof Ce?(this.v=e,this):new Ce(e)}function Ue(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),a=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),i("next"),i("throw"),i("return",function(e){return function(t){return Promise.resolve(t).then(e,s)}}),r[Symbol.asyncIterator]=function(){return this},r;function i(e,t){o[e]&&(r[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(r[e]=t(r[e])))}function c(e,t){try{(n=o[e](t)).value instanceof Ce?Promise.resolve(n.value.v).then(u,s):l(a[0][2],n)}catch(e){l(a[0][3],e)}var n}function u(e){c("next",e)}function s(e){c("throw",e)}function l(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function Me(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:Ce(e[r](t)),done:!1}:o?o(t):t}:o}}function je(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Ne(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function Ge(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var De=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},ke=function(e){return ke=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},ke(e)};function xe(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=ke(e),r=0;r<n.length;r++)"default"!==n[r]&&Oe(t,e,n[r]);return De(t,e),t}function Ve(e){return e&&e.__esModule?e:{default:e}}function Fe(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function Xe(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function Ye(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function Ke(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var Be="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function $e(e){function t(t){e.error=e.hasError?new Be(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function o(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var a=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(a).then(o,function(e){return t(e),o()})}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function He(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,n,r,o,a){return n?t?".jsx":".js":!r||o&&a?r+o+"."+a.toLowerCase()+"js":e}):e}var ze,We,Je,Qe,qe,Ze={__extends:pe,__assign:Ee,__rest:de,__decorate:ye,__param:Te,__esDecorate:me,__runInitializers:he,__propKey:ve,__setFunctionName:be,__metadata:ge,__awaiter:Ae,__generator:Le,__createBinding:Oe,__exportStar:Pe,__values:Ne,__read:Se,__spread:we,__spreadArrays:Re,__spreadArray:Ie,__await:Ce,__asyncGenerator:Ue,__asyncDelegator:Me,__asyncValues:je,__makeTemplateObject:Ge,__importStar:xe,__importDefault:Ve,__classPrivateFieldGet:Fe,__classPrivateFieldSet:Xe,__classPrivateFieldIn:Ye,__addDisposableResource:Ke,__disposeResources:$e,__rewriteRelativeImportExtension:He},et=Object.freeze({__proto__:null,__addDisposableResource:Ke,get __assign(){return Ee},__asyncDelegator:Me,__asyncGenerator:Ue,__asyncValues:je,__await:Ce,__awaiter:Ae,__classPrivateFieldGet:Fe,__classPrivateFieldIn:Ye,__classPrivateFieldSet:Xe,__createBinding:Oe,__decorate:ye,__disposeResources:$e,__esDecorate:me,__exportStar:Pe,__extends:pe,__generator:Le,__importDefault:Ve,__importStar:xe,__makeTemplateObject:Ge,__metadata:ge,__param:Te,__propKey:ve,__read:Se,__rest:de,__rewriteRelativeImportExtension:He,__runInitializers:he,__setFunctionName:be,__spread:we,__spreadArray:Ie,__spreadArrays:Re,__values:Ne,default:Ze});(Qe=ze||(ze={}))[Qe.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",Qe[Qe.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",Qe[Qe.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",Qe[Qe.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",Qe[Qe.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",Qe[Qe.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",Qe[Qe.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",Qe[Qe.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",Qe[Qe.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",Qe[Qe.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",Qe[Qe.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",Qe[Qe.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",Qe[Qe.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",Qe[Qe.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",Qe[Qe.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",Qe[Qe.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",Qe[Qe.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",Qe[Qe.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",Qe[Qe.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",Qe[Qe.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",Qe[Qe.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",Qe[Qe.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",Qe[Qe.INVALID_TAG=23]="INVALID_TAG",Qe[Qe.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",Qe[Qe.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",Qe[Qe.UNCLOSED_TAG=27]="UNCLOSED_TAG",function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(We||(We={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(Je||(Je={}));try{"a"===(null===(qe=function(e,t){return new RegExp(e,t)}("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===qe?void 0:qe[0])}catch(Qe){0}var tt,nt,rt={};function ot(){return tt||(tt=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.SKELETON_TYPE=rt.TYPE=void 0,rt.isLiteralElement=function(t){return t.type===e.literal},rt.isArgumentElement=function(t){return t.type===e.argument},rt.isNumberElement=function(t){return t.type===e.number},rt.isDateElement=function(t){return t.type===e.date},rt.isTimeElement=function(t){return t.type===e.time},rt.isSelectElement=function(t){return t.type===e.select},rt.isPluralElement=function(t){return t.type===e.plural},rt.isPoundElement=function(t){return t.type===e.pound},rt.isTagElement=function(t){return t.type===e.tag},rt.isNumberSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.number)},rt.isDateTimeSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.dateTime)},rt.createLiteralElement=function(t){return{type:e.literal,value:t}},rt.createNumberElement=function(t,n){return{type:e.number,value:t,style:n}},function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(e||(rt.TYPE=e={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(t||(rt.SKELETON_TYPE=t={}))),rt;var e,t}ot();var at={},it=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(et);function ct(e,t,n=""){const r=(o=e)instanceof Uint8Array||ArrayBuffer.isView(o)&&"Uint8Array"===o.constructor.name&&"BYTES_PER_ELEMENT"in o&&1===o.BYTES_PER_ELEMENT;var o;const a=e?.length;if(!r||void 0!==t){const t=(n&&`"${n}" `)+"expected Uint8Array, got "+(r?`length=${a}`:"type="+typeof e);if(!r)throw new TypeError(t);throw new RangeError(t)}return e}function ut(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function st(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function lt(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ft(e,t){return e<<32-t|e>>>t}!function(){if(nt)return at;nt=1,Object.defineProperty(at,"__esModule",{value:!0}),at.printAST=n,at.doPrintAST=r,at.printDateTimeSkeleton=i;var e=it,t=ot();function n(e){return r(e,!1)}function r(c,u){var s=c.map(function(s,l){return(0,t.isLiteralElement)(s)?function(e,t,n,r){var a=e.value;return n||"'"!==a[0]||(a="''".concat(a.slice(1))),r||"'"!==a[a.length-1]||(a="".concat(a.slice(0,a.length-1),"''")),a=o(a),t?a.replace("#","'#'"):a}(s,u,0===l,l===c.length-1):(0,t.isArgumentElement)(s)?function(e){var t=e.value;return"{".concat(t,"}")}(s):(0,t.isDateElement)(s)||(0,t.isTimeElement)(s)||(0,t.isNumberElement)(s)?function(e){return"{".concat(e.value,", ").concat(t.TYPE[e.type]).concat(e.style?", ".concat("string"==typeof(n=e.style)?o(n):n.type===t.SKELETON_TYPE.dateTime?"::".concat(i(n)):"::".concat(n.tokens.map(a).join(" "))):"","}");var n}(s):(0,t.isPluralElement)(s)?function(t){var n="cardinal"===t.pluralType?"plural":"selectordinal",o=[t.value,n,e.__spreadArray([t.offset?"offset:".concat(t.offset):""],Object.keys(t.options).map(function(e){return"".concat(e,"{").concat(r(t.options[e].value,!0),"}")}),!0).filter(Boolean).join(" ")].join(",");return"{".concat(o,"}")}(s):(0,t.isSelectElement)(s)?function(e){var t=[e.value,"select",Object.keys(e.options).map(function(t){return"".concat(t,"{").concat(r(e.options[t].value,!1),"}")}).join(" ")].join(",");return"{".concat(t,"}")}(s):(0,t.isPoundElement)(s)?"#":(0,t.isTagElement)(s)?function(e){return"<".concat(e.value,">").concat(n(e.children),"</").concat(e.value,">")}(s):void 0});return s.join("")}function o(e){return e.replace(/([{}](?:[\s\S]*[{}])?)/,"'$1'")}function a(e){var t=e.stem,n=e.options;return 0===n.length?t:"".concat(t).concat(n.map(function(e){return"/".concat(e)}).join(""))}function i(e){return e.pattern}}(),"function"==typeof Uint8Array.from([]).toHex&&Uint8Array.fromHex,Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function _t(e,t,n){return e&t^~e&n}function pt(e,t,n){return e&t^e&n^t&n}class Et{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,n,r){this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=lt(this.buffer)}update(e){ut(this),ct(e);const{view:t,buffer:n,blockLen:r}=this,o=e.length;for(let a=0;a<o;){const i=Math.min(r-this.pos,o-a);if(i===r){const t=lt(e);for(;r<=o-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+i),this.pos),this.pos+=i,a+=i,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){ut(this),function(e,t){ct(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length<n)throw new RangeError('"digestInto() output" expected to be of length >='+n)}(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:o}=this;let{pos:a}=this;t[a++]=128,st(this.buffer.subarray(a)),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;n.setBigUint64(r-8,BigInt(8*this.length),o),this.process(n,0);const i=lt(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const u=c/4,s=this.get();if(u>s.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<u;e++)i.setUint32(4*e,s[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:o,destroyed:a,pos:i}=this;return e.destroyed=a,e.finished=o,e.length=r,e.pos=i,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const dt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),yt=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Tt=new Uint32Array(64);class mt extends Et{constructor(e){super(64,e,8,!1)}get(){const{A:e,B:t,C:n,D:r,E:o,F:a,G:i,H:c}=this;return[e,t,n,r,o,a,i,c]}set(e,t,n,r,o,a,i,c){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|a,this.G=0|i,this.H=0|c}process(e,t){for(let n=0;n<16;n++,t+=4)Tt[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=Tt[e-15],n=Tt[e-2],r=ft(t,7)^ft(t,18)^t>>>3,o=ft(n,17)^ft(n,19)^n>>>10;Tt[e]=o+Tt[e-7]+r+Tt[e-16]|0}let{A:n,B:r,C:o,D:a,E:i,F:c,G:u,H:s}=this;for(let e=0;e<64;e++){const t=s+(ft(i,6)^ft(i,11)^ft(i,25))+_t(i,c,u)+yt[e]+Tt[e]|0,l=(ft(n,2)^ft(n,13)^ft(n,22))+pt(n,r,o)|0;s=u,u=c,c=i,i=a+t|0,a=o,o=r,r=n,n=t+l|0}n=n+this.A|0,r=r+this.B|0,o=o+this.C|0,a=a+this.D|0,i=i+this.E|0,c=c+this.F|0,u=u+this.G|0,s=s+this.H|0,this.set(n,r,o,a,i,c,u,s)}roundClean(){st(Tt)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),st(this.buffer)}}class ht extends mt{A=0|dt[0];B=0|dt[1];C=0|dt[2];D=0|dt[3];E=0|dt[4];F=0|dt[5];G=0|dt[6];H=0|dt[7];constructor(){super(32)}}!function(e,t={}){const n=(t,n)=>e(n).update(t).digest(),r=e(void 0);n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=t=>e(t),Object.assign(n,t),Object.freeze(n)}(()=>new ht,(e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])}))(1));const vt="gt-react";function bt({locale:e="",defaultLocale:t="en",locales:n=[],localeCookieName:r="generaltranslation.locale",ssr:o=!0,customMapping:c,enableI18n:f,reloadOnLocaleUpdate:_=!1}){const p=u(()=>s(e,c),[e,c]),E=u(()=>n.map(e=>s(e,c)),[n,c]),[d,y]=a(()=>{if(!f)return t;return s(o?p&&l(p,E,c)||"":gt({_locale:p,locale:p,locales:E,defaultLocale:t,localeCookieName:r,customMapping:c,enableI18n:f}),c)}),[T,m]=function({locale:e,locales:t,defaultLocale:n,localeCookieName:r,_setLocale:o,customMapping:a,enableI18n:i,reloadOnLocaleUpdate:c}){e=s(e,a);const u=r=>{if(!i)return n;if(r===e)return e;const c=s(l(r,t,a)||e||n,a);return c!==r&&console.warn(((e,t,n="@generaltranslation/react-core")=>`${n} Warning: "${t}" is not a supported locale. Update supported locales in your dashboard or gt.config.json. Falling back to "${e}".`)(c,r,vt)),o(c),c},f=t=>{if(!i)return;t=s(t);const n=u(t);"undefined"!=typeof document&&(document.cookie=`${r}=${n};path=/`),"undefined"!=typeof window&&t!==e&&c&&window.location.reload()};return[f,u]}({locale:d,locales:E,defaultLocale:t,localeCookieName:r,_setLocale:y,customMapping:c,enableI18n:f,reloadOnLocaleUpdate:_});return i(()=>{const e=gt({_locale:p,locale:d,locales:E,defaultLocale:t,localeCookieName:r,customMapping:c,enableI18n:f});m(e)},[p,d,E,t,r,f]),[d,T]}function gt({_locale:e,locale:t,locales:n,defaultLocale:r,localeCookieName:o,customMapping:a,enableI18n:i}){var c;if(!i)return r;if(e&&e===t&&l(e,n,a)===t)return s(e,a);let u="undefined"!=typeof document?null===(c=document.cookie.split("; ").find(e=>e.startsWith(`${o}=`)))||void 0===c?void 0:c.split("=")[1]:void 0;u&&(u=s(u,a));let f="undefined"==typeof navigator?[]:(null===navigator||void 0===navigator?void 0:navigator.languages)?navigator.languages:(null===navigator||void 0===navigator?void 0:navigator.language)?[navigator.language]:(null===navigator||void 0===navigator?void 0:navigator.userLanguage)?[null===navigator||void 0===navigator?void 0:navigator.userLanguage]:[];f=f.map(e=>s(e,a));let _=l([...e?[e]:[],...u?[u]:[],...f],n,a)||r;return _&&(_=s(_,a)),u&&u!==_&&"undefined"!=typeof document&&(document.cookie=`${o}=${_};path=/`),_}function At(t){return e(n,Object.assign({ssr:!("undefined"==typeof process||!process.env.NEXT_RUNTIME)||void 0!==(null===globalThis||void 0===globalThis?void 0:globalThis.__NEXT_DATA__),environment:process.env.NODE_ENV},t,{readAuthFromEnv:f,useDetermineLocale:bt,useRegionState:p,useEnableI18n:E}))}function Lt(e){if(!e)return;const t={};for(const n in e)t[n]={name:e[n]};return t}function Ot(n){var{locale:r,locales:o,customNames:a,customMapping:i=Lt(a),setLocale:c,getLocaleProperties:u}=n,s=v(n,["locale","locales","customNames","customMapping","setLocale","getLocaleProperties"]);const l=e=>{if(i&&i[e]){if("string"==typeof i[e])return i[e];if(i[e].name)return i[e].name}return(t=u(e).nativeNameWithRegionCode)?t.charAt(0).toUpperCase()+(t.length>1?t.slice(1):""):"";var t};return o&&0!==o.length&&c?t("select",Object.assign({},s,{value:r||"",onChange:e=>c(e.target.value),children:[!r&&e("option",{value:""}),o.map(t=>e("option",{value:t,suppressHydrationWarning:!0,children:l(t)},t))]})):null}function Pt(t){var{locales:n}=t,o=v(t,["locales"]);const{locale:a,locales:i,setLocale:c,getLocaleProperties:u}=r(n);return e(Ot,Object.assign({locale:a,locales:i,setLocale:c,getLocaleProperties:u},o))}function Nt(n){var{regions:r,placeholder:a,customMapping:i,prioritizeCurrentLocaleRegion:c,sortRegionsAlphabetically:u,asLocaleSelector:s=!1}=n,l=v(n,["regions","placeholder","customMapping","prioritizeCurrentLocaleRegion","sortRegionsAlphabetically","asLocaleSelector"]);const{region:f,setRegion:_,regions:p,regionData:E,locale:d,setLocale:y}=o({regions:r,customMapping:i,prioritizeCurrentLocaleRegion:c,sortRegionsAlphabetically:u});return t("select",Object.assign({},l,{value:f||"",onChange:e=>(e=>{if(_(e),s){const t=E.get(e).locale;d!==t&&y(t)}})(e.target.value),children:[!f&&e("option",{value:"",disabled:Boolean(f),hidden:Boolean(f),suppressHydrationWarning:!0,children:a||""},"placeholder"),p.map(t=>e("option",{value:t,suppressHydrationWarning:!0,children:E.get(t).name},t))]}))}export{At as GTProvider,Pt as LocaleSelector,Nt as RegionSelector};
2
2
  //# sourceMappingURL=index.esm.min.mjs.map