gt-react 10.19.13 → 10.19.15

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{formatCutoff as e,formatMessage as t,LocaleConfig as n,standardizeLocale as r,isValidLocale as o,resolveCanonicalLocale as i}from"generaltranslation/core";import{GT as a,requiresTranslation as s}from"generaltranslation";import c,{Children as l,isValidElement as u,cloneElement as h,Suspense as f,useMemo as p,useCallback as d,use as g}from"react";import{jsx as m,jsxs as y}from"react/jsx-runtime";const _="gt-react",b=`${_}/browser Error: The ${_}/browser module requires a browser environment`,E=`${_} Error: You are trying to import a browser-only module into a non-browser environment.`,v=`${_} Error: BrowserI18nManager not initialized. Invoke initializeGT() to initialize.`,T=e=>`${_} Warning: Invalid locale: "${e}".`;var L=function(e,t){return L=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])},L(e,t)};function C(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}L(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var w=function(){return w=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},w.apply(this,arguments)};function A(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 S(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function O(e,t){return function(n,r){t(n,r,e)}}function P(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=r.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?r.static?e:e.prototype:null,h=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var d={};for(var g in r)d[g]="access"===g?{}:r[g];for(var g in r.access)d.access[g]=r.access[g];d.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var m=(0,n[p])("accessor"===c?{get:h.get,set:h.set}:h[l],d);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(s=a(m.get))&&(h.get=s),(s=a(m.set))&&(h.set=s),(s=a(m.init))&&o.unshift(s)}else(s=a(m))&&("field"===c?o.unshift(s):h[l]=s)}u&&Object.defineProperty(u,r.name,h),f=!0}function H(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 I(e){return"symbol"==typeof e?e:"".concat(e)}function M(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 B(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function R(e,t){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=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++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.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],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var j=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 D(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||j(t,e,n)}function U(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 G(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function k(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(G(arguments[t]));return e}function x(){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 i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function F(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;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 $(e){return this instanceof $?(this.v=e,this):new $(e)}function V(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r=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,l)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||s(e,t)})},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=o[e](t)).value instanceof $?Promise.resolve(n.value.v).then(c,l):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function K(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:$(e[r](t)),done:!1}:o?o(t):t}:o}}function X(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=U(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 Y(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var q=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},z=function(e){return z=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},z(e)};function W(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=z(e),r=0;r<n.length;r++)"default"!==n[r]&&j(t,e,n[r]);return q(t,e),t}function J(e){return e&&e.__esModule?e:{default:e}}function Z(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 Q(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 ee(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 te(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 ne="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 re(e){function t(t){e.error=e.hasError?new ne(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 i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).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 oe(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,n,r,o,i){return n?t?".jsx":".js":!r||o&&i?r+o+"."+i.toLowerCase()+"js":e}):e}var ie={__extends:C,__assign:w,__rest:A,__decorate:S,__param:O,__esDecorate:P,__runInitializers:H,__propKey:I,__setFunctionName:M,__metadata:N,__awaiter:B,__generator:R,__createBinding:j,__exportStar:D,__values:U,__read:G,__spread:k,__spreadArrays:x,__spreadArray:F,__await:$,__asyncGenerator:V,__asyncDelegator:K,__asyncValues:X,__makeTemplateObject:Y,__importStar:W,__importDefault:J,__classPrivateFieldGet:Z,__classPrivateFieldSet:Q,__classPrivateFieldIn:ee,__addDisposableResource:te,__disposeResources:re,__rewriteRelativeImportExtension:oe},ae=Object.freeze({__proto__:null,__addDisposableResource:te,get __assign(){return w},__asyncDelegator:K,__asyncGenerator:V,__asyncValues:X,__await:$,__awaiter:B,__classPrivateFieldGet:Z,__classPrivateFieldIn:ee,__classPrivateFieldSet:Q,__createBinding:j,__decorate:S,__disposeResources:re,__esDecorate:P,__exportStar:D,__extends:C,__generator:R,__importDefault:J,__importStar:W,__makeTemplateObject:Y,__metadata:N,__param:O,__propKey:I,__read:G,__rest:A,__rewriteRelativeImportExtension:oe,__runInitializers:H,__setFunctionName:M,__spread:k,__spreadArray:F,__spreadArrays:x,__values:U,default:ie});const se="en",ce="https://cdn.gtx.dev";function le(e){if(void 0===e)return;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)){let t="[";for(let n=0;n<e.length;n++)n&&(t+=","),t+=le(e[n])||"null";return t+"]"}const t=Object.keys(e).sort();let n="";for(const r of t){const t=le(e[r]);t&&(n&&(n+=","),n+=JSON.stringify(r)+":"+t)}return"{"+n+"}"}function ue(e){return le(e)??""}function he(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 i=e?.length;if(!r||void 0!==t){const t=(n&&`"${n}" `)+"expected Uint8Array"+""+", got "+(r?`length=${i}`:"type="+typeof e);if(!r)throw new TypeError(t);throw new RangeError(t)}return e}function fe(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 pe(...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 ge(e,t){return e<<32-t|e>>>t}const me=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),ye=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function _e(e,t={}){const n=(t,n)=>e(n).update(t).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=t=>e(t),Object.assign(n,t),Object.freeze(n)}const be=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function Ee(e,t,n){return e&t^~e&n}function ve(e,t,n){return e&t^e&n^t&n}class Te{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=de(this.buffer)}update(e){fe(this),he(e);const{view:t,buffer:n,blockLen:r}=this,o=e.length;for(let i=0;i<o;){const a=Math.min(r-this.pos,o-i);if(a===r){const t=de(e);for(;r<=o-i;i+=r)this.process(t,i);continue}n.set(e.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){fe(this),function(e,t){he(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:i}=this;t[i++]=128,pe(this.buffer.subarray(i)),this.padOffset>r-i&&(this.process(n,0),i=0);for(let e=i;e<r;e++)t[e]=0;n.setBigUint64(r-8,BigInt(8*this.length),o),this.process(n,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,l=this.get();if(c>l.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)a.setUint32(4*e,l[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:i,pos:a}=this;return e.destroyed=i,e.finished=o,e.length=r,e.pos=a,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const Le=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ce=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]),we=new Uint32Array(64);class Ae extends Te{constructor(e){super(64,e,8,!1)}get(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:a,H:s}=this;return[e,t,n,r,o,i,a,s]}set(e,t,n,r,o,i,a,s){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|i,this.G=0|a,this.H=0|s}process(e,t){for(let n=0;n<16;n++,t+=4)we[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=we[e-15],n=we[e-2],r=ge(t,7)^ge(t,18)^t>>>3,o=ge(n,17)^ge(n,19)^n>>>10;we[e]=o+we[e-7]+r+we[e-16]|0}let{A:n,B:r,C:o,D:i,E:a,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){const t=l+(ge(a,6)^ge(a,11)^ge(a,25))+Ee(a,s,c)+Ce[e]+we[e]|0,u=(ge(n,2)^ge(n,13)^ge(n,22))+ve(n,r,o)|0;l=c,c=s,s=a,a=i+t|0,i=o,o=r,r=n,n=t+u|0}n=n+this.A|0,r=r+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,l=l+this.H|0,this.set(n,r,o,i,a,s,c,l)}roundClean(){pe(we)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),pe(this.buffer)}}class Se extends Ae{A=0|Le[0];B=0|Le[1];C=0|Le[2];D=0|Le[3];E=0|Le[4];F=0|Le[5];G=0|Le[6];H=0|Le[7];constructor(){super(32)}}const Oe=_e(()=>new Se,be(1));var Pe,He,Ie;!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"}(Pe||(Pe={})),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"}(He||(He={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(Ie||(Ie={}));var Me=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ne=/(?:[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 Be(e){var t={};return e.replace(Ne,function(e){var n=e.length;switch(e[0]){case"G":t.era=4===n?"long":5===n?"narrow":"short";break;case"y":t.year=2===n?"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"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-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===n?"long":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-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"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-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"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<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 Re=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function je(e){return e.replace(/^(.*?)-/,"")}var De=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Ue=/^(@+)?(\+|#+)?[rs]?$/g,Ge=/(\*)(0+)|(#+)(0+)|(0+)/g,ke=/^(0+)$/;function xe(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(Ue,function(e,n,r){return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""}),t}function Fe(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 $e(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 n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!ke.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Ve(e){var t=Fe(e);return t||{}}function Ke(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];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=je(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=w(w(w({},t),{notation:"scientific"}),o.options.reduce(function(e,t){return w(w({},e),Ve(t))},{}));continue;case"engineering":t=w(w(w({},t),{notation:"engineering"}),o.options.reduce(function(e,t){return w(w({},e),Ve(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(Ge,function(e,n,r,o,i,a){if(n)t.minimumIntegerDigits=r.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(ke.test(o.stem))t.minimumIntegerDigits=o.stem.length;else if(De.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(De,function(e,n,r,o,i,a){return"*"===r?t.minimumFractionDigits=n.length:o&&"#"===o[0]?t.maximumFractionDigits=o.length:i&&a?(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length+a.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""});var i=o.options[0];"w"===i?t=w(w({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=w(w({},t),xe(i)))}else if(Ue.test(o.stem))t=w(w({},t),xe(o.stem));else{var a=Fe(o.stem);a&&(t=w(w({},t),a));var s=$e(o.stem);s&&(t=w(w({},t),s))}}return t}var Xe,Ye={"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 qe(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 n,r=e.language;return"root"!==r&&(n=e.maximize().region),(Ye[n||""]||Ye[r||""]||Ye["".concat(r,"-001")]||Ye["001"])[0]}var ze=new RegExp("^".concat(Me.source,"*")),We=new RegExp("".concat(Me.source,"*$"));function Je(e,t){return{start:e,end:t}}var Ze=!!String.prototype.startsWith&&"_a".startsWith("a",1),Qe=!!String.fromCodePoint,et=!!Object.fromEntries,tt=!!String.prototype.codePointAt,nt=!!String.prototype.trimStart,rt=!!String.prototype.trimEnd,ot=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},it=!0;try{it="a"===(null===(Xe=pt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Xe?void 0:Xe[0])}catch(xn){it=!1}var at,st=Ze?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},ct=Qe?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,r="",o=e.length,i=0;o>i;){if((n=e[i++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},lt=et?Object.fromEntries:function(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n],i=o[0],a=o[1];t[i]=a}return t},ut=tt?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var r,o=e.charCodeAt(t);return o<55296||o>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?o:r-56320+(o-55296<<10)+65536}},ht=nt?function(e){return e.trimStart()}:function(e){return e.replace(ze,"")},ft=rt?function(e){return e.trimEnd()}:function(e){return e.replace(We,"")};function pt(e,t){return new RegExp(e,t)}if(it){var dt=pt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");at=function(e,t){var n;return dt.lastIndex=t,null!==(n=dt.exec(e)[1])&&void 0!==n?n:""}}else at=function(e,t){for(var n=[];;){var r=ut(e,t);if(void 0===r||_t(r)||bt(r))break;n.push(r),t+=r>=65536?2:1}return ct.apply(void 0,n)};var gt=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,n){for(var r=[];!this.isEOF();){var o=this.char();if(123===o){if((i=this.parseArgument(e,n)).err)return i;r.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(n)break;return this.error(Pe.UNMATCHED_CLOSING_TAG,Je(this.clonePosition(),this.clonePosition()))}if(60===o&&!this.ignoreTag&&mt(this.peek()||0)){if((i=this.parseTag(e,t)).err)return i;r.push(i.val)}else{var i;if((i=this.parseLiteral(e,t)).err)return i;r.push(i.val)}}else{var a=this.clonePosition();this.bump(),r.push({type:He.pound,location:Je(a,this.clonePosition())})}}}return{val:r,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:He.literal,value:"<".concat(r,"/>"),location:Je(n,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()||!mt(this.char()))return this.error(Pe.INVALID_TAG,Je(a,this.clonePosition()));var s=this.clonePosition();return r!==this.parseTagName()?this.error(Pe.UNMATCHED_CLOSING_TAG,Je(s,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:He.tag,value:r,children:i,location:Je(n,this.clonePosition())},err:null}:this.error(Pe.INVALID_TAG,Je(a,this.clonePosition())))}return this.error(Pe.UNCLOSED_TAG,Je(n,this.clonePosition()))}return this.error(Pe.INVALID_TAG,Je(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&yt(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var o=this.tryParseQuote(t);if(o)r+=o;else{var i=this.tryParseUnquoted(e,t);if(i)r+=i;else{var a=this.tryParseLeftAngleBracket();if(!a)break;r+=a}}}var s=Je(n,this.clonePosition());return{val:{type:He.literal,value:r,location:s},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(mt(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 n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(n);this.bump()}return ct.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),ct(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Pe.EXPECT_ARGUMENT_CLOSING_BRACE,Je(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(Pe.EMPTY_ARGUMENT,Je(n,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(Pe.MALFORMED_ARGUMENT,Je(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Pe.EXPECT_ARGUMENT_CLOSING_BRACE,Je(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:He.argument,value:r,location:Je(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Pe.EXPECT_ARGUMENT_CLOSING_BRACE,Je(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(Pe.MALFORMED_ARGUMENT,Je(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=at(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:Je(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var o,i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,s=this.clonePosition();switch(a){case"":return this.error(Pe.EXPECT_ARGUMENT_TYPE,Je(i,s));case"number":case"date":case"time":this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var l=this.clonePosition();if((y=this.parseSimpleArgStyleIfPossible()).err)return y;if(0===(p=ft(y.val)).length)return this.error(Pe.EXPECT_ARGUMENT_STYLE,Je(this.clonePosition(),this.clonePosition()));c={style:p,styleLocation:Je(l,this.clonePosition())}}if((_=this.tryParseArgumentClose(r)).err)return _;var u=Je(r,this.clonePosition());if(c&&st(null==c?void 0:c.style,"::",0)){var h=ht(c.style.slice(2));if("number"===a)return(y=this.parseNumberSkeletonFromString(h,c.styleLocation)).err?y:{val:{type:He.number,value:n,location:u,style:y.val},err:null};if(0===h.length)return this.error(Pe.EXPECT_DATE_TIME_SKELETON,u);var f=h;this.locale&&(f=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);if("j"===o){for(var i=0;r+1<e.length&&e.charAt(r+1)===o;)i++,r++;var a=1+(1&i),s=i<2?1:3+(i>>1),c=qe(t);for("H"!=c&&"k"!=c||(s=0);s-- >0;)n+="a";for(;a-- >0;)n=c+n}else n+="J"===o?"H":o}return n}(h,this.locale));var p={type:Ie.dateTime,pattern:f,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?Be(f):{}};return{val:{type:"date"===a?He.date:He.time,value:n,location:u,style:p},err:null}}return{val:{type:"number"===a?He.number:"date"===a?He.date:He.time,value:n,location:u,style:null!==(o=null==c?void 0:c.style)&&void 0!==o?o:null},err:null};case"plural":case"selectordinal":case"select":var d=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Pe.EXPECT_SELECT_ARGUMENT_OPTIONS,Je(d,w({},d)));this.bumpSpace();var g=this.parseIdentifierIfPossible(),m=0;if("select"!==a&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(Pe.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Je(this.clonePosition(),this.clonePosition()));var y;if(this.bumpSpace(),(y=this.tryParseDecimalInteger(Pe.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Pe.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return y;this.bumpSpace(),g=this.parseIdentifierIfPossible(),m=y.val}var _,b=this.tryParsePluralOrSelectOptions(e,a,t,g);if(b.err)return b;if((_=this.tryParseArgumentClose(r)).err)return _;var E=Je(r,this.clonePosition());return"select"===a?{val:{type:He.select,value:n,options:lt(b.val),location:E},err:null}:{val:{type:He.plural,value:n,options:lt(b.val),offset:m,pluralType:"plural"===a?"cardinal":"ordinal",location:E},err:null};default:return this.error(Pe.INVALID_ARGUMENT_TYPE,Je(i,s))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(Pe.EXPECT_ARGUMENT_CLOSING_BRACE,Je(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 n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Pe.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Je(n,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 n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Re).filter(function(e){return e.length>0}),n=[],r=0,o=t;r<o.length;r++){var i=o[r].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var a=i[0],s=i.slice(1),c=0,l=s;c<l.length;c++)if(0===l[c].length)throw new Error("Invalid number skeleton");n.push({stem:a,options:s})}return n}(e)}catch(e){return this.error(Pe.INVALID_NUMBER_SKELETON,t)}return{val:{type:Ie.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?Ke(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,r){for(var o,i=!1,a=[],s=new Set,c=r.value,l=r.location;;){if(0===c.length){var u=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var h=this.tryParseDecimalInteger(Pe.EXPECT_PLURAL_ARGUMENT_SELECTOR,Pe.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;l=Je(u,this.clonePosition()),c=this.message.slice(u.offset,this.offset())}if(s.has(c))return this.error("select"===t?Pe.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Pe.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===c&&(i=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?Pe.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Pe.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Je(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(e+1,t,n);if(p.err)return p;var d=this.tryParseArgumentClose(f);if(d.err)return d;a.push([c,{value:p.val,location:Je(f,this.clonePosition())}]),s.add(c),this.bumpSpace(),c=(o=this.parseIdentifierIfPossible()).value,l=o.location}return 0===a.length?this.error("select"===t?Pe.EXPECT_SELECT_ARGUMENT_SELECTOR:Pe.EXPECT_PLURAL_ARGUMENT_SELECTOR,Je(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(Pe.MISSING_OTHER_CLAUSE,Je(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-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=Je(r,this.clonePosition());return o?ot(i*=n)?{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=ut(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(st(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(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!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()&&_t(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function mt(e){return e>=97&&e<=122||e>=65&&e<=90}function yt(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 _t(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function bt(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 Et(e){e.forEach(function(e){if(delete e.location,function(e){return e.type===He.select}(e)||function(e){return e.type===He.plural}(e))for(var t in e.options)delete e.options[t].location,Et(e.options[t].value);else(function(e){return e.type===He.number})(e)&&function(e){return!(!e||"object"!=typeof e||e.type!==Ie.number)}(e.style)?delete e.style.location:!function(e){return e.type===He.date}(e)&&!function(e){return e.type===He.time}(e)||!function(e){return!(!e||"object"!=typeof e||e.type!==Ie.dateTime)}(e.style)?function(e){return e.type===He.tag}(e)&&Et(e.children):delete e.style.location})}function vt(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 Tt,Lt={};function Ct(){if(Tt)return Lt;var e,t;return Tt=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.SKELETON_TYPE=Lt.TYPE=void 0,Lt.isLiteralElement=function(t){return t.type===e.literal},Lt.isArgumentElement=function(t){return t.type===e.argument},Lt.isNumberElement=function(t){return t.type===e.number},Lt.isDateElement=function(t){return t.type===e.date},Lt.isTimeElement=function(t){return t.type===e.time},Lt.isSelectElement=function(t){return t.type===e.select},Lt.isPluralElement=function(t){return t.type===e.plural},Lt.isPoundElement=function(t){return t.type===e.pound},Lt.isTagElement=function(t){return t.type===e.tag},Lt.isNumberSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.number)},Lt.isDateTimeSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.dateTime)},Lt.createLiteralElement=function(t){return{type:e.literal,value:t}},Lt.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||(Lt.TYPE=e={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(t||(Lt.SKELETON_TYPE=t={})),Lt}var wt,At=Ct(),St={},Ot=vt(ae);var Pt=function(){if(wt)return St;wt=1,Object.defineProperty(St,"__esModule",{value:!0}),St.printAST=n,St.doPrintAST=r,St.printDateTimeSkeleton=a;var e=Ot,t=Ct();function n(e){return r(e,!1)}function r(s,c){var l=s.map(function(l,u){return(0,t.isLiteralElement)(l)?function(e,t,n,r){var i=e.value,a=i;n||"'"!==a[0]||(a="''".concat(a.slice(1)));r||"'"!==a[a.length-1]||(a="".concat(a.slice(0,a.length-1),"''"));return a=o(a),t?a.replace("#","'#'"):a}(l,c,0===u,u===s.length-1):(0,t.isArgumentElement)(l)?function(e){var t=e.value;return"{".concat(t,"}")}(l):(0,t.isDateElement)(l)||(0,t.isTimeElement)(l)||(0,t.isNumberElement)(l)?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(a(n)):"::".concat(n.tokens.map(i).join(" ")))):"","}");var n}(l):(0,t.isPluralElement)(l)?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,"}")}(l):(0,t.isSelectElement)(l)?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,"}")}(l):(0,t.isPoundElement)(l)?"#":(0,t.isTagElement)(l)?function(e){return"<".concat(e.value,">").concat(n(e.children),"</").concat(e.value,">")}(l):void 0});return l.join("")}function o(e){return e.replace(/([{}](?:[\s\S]*[{}])?)/,"'$1'")}function i(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 a(e){return e.pattern}return St}();function Ht({icuString:e,shouldVisit:t,visitor:n,options:{recurseIntoVisited:r=!0,...o}}){const i=function(e,t){void 0===t&&(t={}),t=w({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new gt(e,t).parse();if(n.err){var r=SyntaxError(Pe[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||Et(n.val),n.val}(e,o);return a(i),i;function a(e){e.map(s)}function s(e){let o=!1;t(e)&&(n(e),o=!0),o&&!r||(e.type===He.select||e.type===He.plural?Object.values(e.options).map(e=>e.value).map(a):e.type===He.tag&&a(e.children))}}const It="_gt_",Mt=new RegExp(`^${It}\\d+$`),Nt=new RegExp(`^${It}$`);function Bt(e){return e.type===At.TYPE.select&&Mt.test(e.value)&&!!e.options.other&&(0===e.options.other.value.length||e.options.other.value.length>0&&e.options.other.value[0]?.type===At.TYPE.literal)}function Rt(e){return e.type===At.TYPE.select&&Nt.test(e.value)&&!!e.options.other&&(0===e.options.other.value.length||e.options.other.value.length>0&&e.options.other.value[0]?.type===At.TYPE.literal)}function jt(e){if(!e.includes("_gt_"))return e;const t=[];Ht({icuString:e,shouldVisit:Rt,visitor:function(e){t.push({start:e.location?.start.offset??0,end:e.location?.end.offset??0,otherStart:e.options.other.location?.start.offset??0,otherEnd:e.options.other.location?.end.offset??0})},options:{recurseIntoVisited:!1,captureLocation:!0}});const n=[];let r=0;for(let o=0;o<t.length;o++){const{start:i,end:a,otherStart:s,otherEnd:c}=t[o];n.push(e.slice(r,i)),n.push(e.slice(i,i+4+1)),n.push(String(o+1)),n.push(e.slice(i+4+1,s)),n.push("{}"),n.push(e.slice(c,a)),r=a}return n.push(e.slice(r,e.length)),n.join("")}var Dt={warn(e){console.warn(e)},error(e){console.error(e)},info(e){console.info(e)},debug(e){console.debug(e)}};const Ut=e=>`String interpolation failed for message: "${e}".`;function Gt(n,r){if(!n)return n;const o=r.$_fallback,i=function(e){return Object.fromEntries(Object.entries(e).filter(([e])=>"$id"!==e&&"$context"!==e&&"$maxChars"!==e&&"$hash"!==e&&"$_hash"!==e&&"$_source"!==e&&"$_fallback"!==e&&"$format"!==e&&"$_locales"!==e&&"$locale"!==e))}(r);try{const s=function(e){if(!e.includes("_gt_"))return{};let t=1;const n={};return Ht({icuString:e,shouldVisit:Rt,visitor:function(e){n[e.value+t]=e.options.other.value.length?e.options.other.value[0]?.value:"",t+=1},options:{recurseIntoVisited:!1}}),n}(o||"");return e(function(e,n,r,o){try{return t(e,{variables:n,locales:r,dataFormat:o})}catch{return Dt.warn(Ut(e)),e}}(Object.keys(s).length?(a=n).includes("_gt_")?Pt.printAST(Ht({icuString:a,shouldVisit:Bt,visitor:function(e){e.type=At.TYPE.argument,delete e.options},options:{recurseIntoVisited:!1}})):a:n,{...i,...s,[It]:"other"},r.$locale??r.$_locales,r.$format),{maxChars:r.$maxChars})}catch{return Dt.warn(Ut(n)),null!=r.$_fallback?Gt(r.$_fallback,{...r,$_fallback:void 0}):e(n,{maxChars:r.$maxChars})}var a}function kt(e){return function(e){if(he(e),me)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=ye[e[n]];return t}(Oe(function(e){if("string"!=typeof e)throw new TypeError("string expected");return new Uint8Array((new TextEncoder).encode(e))}(e))).slice(0,16)}const xt=e=>{if(e&&"object"==typeof e){const t={};if("c"in e&&e.c&&(t.c=Ft(e.c)),"d"in e){const n=e?.d;n?.b&&(t.b=Object.fromEntries(Object.entries(n.b).map(([e,t])=>[e,Ft(t)]))),n?.t&&(t.t=n.t)}return function(e){const t=e;if(t&&"object"==typeof t&&"string"==typeof t.k){const e=Object.keys(t);if(1===e.length)return!0;if(2===e.length){if("number"==typeof t.i)return!0;if("string"==typeof t.v)return!0}if(3===e.length&&"string"==typeof t.v&&"number"==typeof t.i)return!0}return!1}(e)?{k:e.k,...e.v&&{v:e.v}}:t}return e};function Ft(e){return Array.isArray(e)?e.map(xt):xt(e)}function $t(e){return e.loadTranslations?"custom":e.cacheUrl?"remote":void 0!==e.cacheUrl&&e.cacheUrl!==ce||!e.projectId?"disabled":"gt-remote"}function Vt(e){return void 0!==e.runtimeUrl&&"https://runtime2.gtx.dev"!==e.runtimeUrl||!e.projectId||!e.devApiKey&&!e.apiKey?e.runtimeUrl?"custom":"disabled":"gt"}function Kt(e){return"gt-remote"===$t(e)||"gt"===Vt(e)}function Xt(e){const t=[];return t.push(...function(e){const t=[],{projectId:n,loadTranslations:r}=e;switch($t(e)){case"remote":case"gt-remote":n||t.push({type:"warning",message:"projectId is required when loading translations from a remote store"});break;case"custom":r||t.push({type:"error",message:"loadTranslations is required when loading translations from a custom loader"})}return t}(e)),t.push(...function(e){const t=[];switch(Vt(e)){case"custom":case"gt":e.projectId||t.push({type:"warning",message:"projectId is required"}),e.devApiKey||e.apiKey||t.push({type:"warning",message:"devApiKey or apiKey is required"})}return t}(e)),t.push(...function(e){const t=[];if(!Kt(e))return t;const{defaultLocale:n,locales:r,customMapping:i}=e;return new Set([...n?[n]:[],...r||[]]).forEach(e=>{o(e,i)||t.push({type:"error",message:`Invalid locale: ${e}`})}),t}(e)),t.push(...function(e){const t=[];return e.loadDictionary&&!e.dictionary&&t.push({type:"error",message:"dictionary is required when loadDictionary is provided"}),t}(e)),t}function Yt(e){const t=function(e){const{cacheUrl:t=ce,projectId:n,_versionId:r,_branchId:o}=e;return`${t}/${n}/[locale]`+(r?`/${r}`:"")+(o?`?branchId=${o}`:"")}(e);return async n=>{n=i(n,e.customMapping);const r=t.replace("[locale]",n),o=await fetch(r);if(!o.ok)throw new Error(`Failed to load translations from ${r}`);return await o.json()}}var qt=class{constructor(e,t){this.cache={},this.fallbackPromises={},this.cache=structuredClone(e),this.onHit=t?.onHit,this.onMiss=t?.onMiss}setCache(e,t){this.cache[e]=t}getCache(e){const t=this.genKey(e);return this.cache[t]}getInternalCache(){return this.cache}async missCache(e){const t=this.genKey(e);if(void 0!==this.fallbackPromises[t])return await this.fallbackPromises[t];const n=this.fallback(e);this.fallbackPromises[t]=n;try{const e=await n;return this.setCache(t,e),e}finally{delete this.fallbackPromises[t]}}};function zt(e,t){return null!=t.$_hash?t.$_hash:function({source:e,context:t,id:n,maxChars:r,dataFormat:o},i=kt){let a;return a="JSX"===o?Ft(e):e,i(ue({source:a,...n&&{id:n},...t&&{context:t},...null!=r&&{maxChars:Math.abs(r)},...o&&{dataFormat:o}}))}({source:"ICU"===t.$format?jt(e):e,...t?.$context&&{context:t.$context},...t?.$id&&{id:t.$id},..."$maxChars"in t&&null!=t.$maxChars&&{maxChars:Math.abs(t.$maxChars)},dataFormat:t.$format})}const Wt=100,Jt=25,Zt=50;function Qt(e,t){if(void 0===e||!Number.isFinite(e))return t;const n=Math.trunc(e);return n>0?n:t}var en=class extends qt{constructor({init:e,translateMany:t,lifecycle:n,batchConfig:r}){super(e,n),this._queue=[],this._batchTimer=null,this._activeRequests=0,this._translateMany=t,this._batchConfig=function(e){return{maxConcurrentRequests:Qt(e?.maxConcurrentRequests,Wt),maxBatchSize:Qt(e?.maxBatchSize,Jt),batchInterval:(t=e?.batchInterval,n=Zt,void 0===t||!Number.isFinite(t)||t<=0?n:t)};var t,n}(r)}get(e){const t=this.getCache(e);return null!=t&&this.onHit&&this.onHit({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:t}),t}async miss(e){const t=await this.missCache(e);return null!=t&&this.onMiss&&this.onMiss({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:t}),t}genKey(e){return zt(e.message,e.options)}fallback(e){const t=this._enqueueTranslation(e);return this._queue.length>=this._batchConfig.maxBatchSize?this._flushNow():this._scheduleBatch(),t}_flushNow(){this._batchTimer&&(clearTimeout(this._batchTimer),this._batchTimer=null),this._drainQueue()}_scheduleBatch(){this._batchTimer||(this._batchTimer=setTimeout(()=>{this._batchTimer=null,this._drainQueue()},this._batchConfig.batchInterval))}_drainQueue(){for(;this._queue.length>0&&this._activeRequests<this._batchConfig.maxConcurrentRequests;){const e=this._queue.splice(0,this._batchConfig.maxBatchSize);this._sendBatchRequest(e)}this._queue.length>0&&this._scheduleBatch()}_enqueueTranslation(e){const t=this.genKey(e),n=e.options;return new Promise((r,o)=>{this._queue.push({key:t,source:e.message,metadata:{hash:t,...n?.$context&&{context:n.$context},...n?.$id&&{id:n.$id},..."$maxChars"in n&&null!=n.$maxChars&&{maxChars:Math.abs(n.$maxChars)},dataFormat:n.$format},resolve:e=>r(e),reject:o})})}async _sendBatchRequest(e){this._activeRequests++;const t=function(e){return e.reduce((e,t)=>(e[t.key]={source:t.source,metadata:t.metadata},e),{})}(e),n=await this._sendBatchRequestWithErrorHandling(e,t);n&&this._handleTranslationResponse(e,n),this._activeRequests--}async _sendBatchRequestWithErrorHandling(e,t){try{return await this._translateMany(t)}catch(t){for(const n of e)n.reject(t);return}}_handleTranslationResponse(e,t){for(const n of e){const{key:e}=n,r=t[e];if(r&&r.success){const t=r.translation;this.setCache(e,t),n.resolve(t)}else n.reject(r?.error)}}};var tn=class extends qt{constructor({init:e={},ttl:t,batchConfig:n,loadTranslations:r,createTranslateMany:o,lifecycle:{onLocalesCacheHit:i,onLocalesCacheMiss:a,onTranslationsCacheHit:s,onTranslationsCacheMiss:c}}){super(e,{onHit:i,onMiss:a}),this.ttl=6e4,this.ttl=null===t?-1:t??6e4,this._translationLoader=r,this._createTranslateMany=o,this._batchConfig=n,this._onTranslationsCacheHit=s,this._onTranslationsCacheMiss=c}get(e){const t=this.getCache(e);if(!t||t.expiresAt>0&&t.expiresAt<Date.now())return;const n=t.translationsCache;return null!=n&&this.onHit&&this.onHit({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:n}),n}async miss(e){const t=await this.missCache(e),n=t.translationsCache;return null!=n&&this.onMiss&&this.onMiss({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:n}),n}genKey(e){return e}async fallback(e){const t=this._translationLoader(e),n=this.ttl<0?this.ttl:Date.now()+this.ttl;return{translationsCache:new en({init:await t,lifecycle:this._createTranslationsCacheLifecycle(e),translateMany:this._createTranslateMany(e),batchConfig:this._batchConfig}),expiresAt:n}}_createTranslationsCacheLifecycle(e){return{onHit:this._onTranslationsCacheHit?t=>this._onTranslationsCacheHit({locale:e,...t}):void 0,onMiss:this._onTranslationsCacheMiss?t=>this._onTranslationsCacheMiss({locale:e,...t}):void 0}}};function nn(e){return e?e.split("."):[]}function rn(e){return"object"==typeof e&&null!=e&&!Array.isArray(e)}function on(e){if(function(e){return"string"==typeof e||!(!Array.isArray(e)||"string"!=typeof e[0])&&(1===e.length||2===e.length&&function(e){if("object"!=typeof e||null==e||Array.isArray(e))return!1;const t=e;return!(void 0!==t.$context&&"string"!=typeof t.$context||void 0!==t.$maxChars&&"number"!=typeof t.$maxChars||void 0!==t.context&&"string"!=typeof t.context)}(e[1]))}(e))return Array.isArray(e)?e[0]:e}var an=class extends qt{constructor({init:e,lifecycle:t}){super(e,t)}get(e){const t=this.getCache(e),n=on(t);if(void 0!==n)return this.onHit&&this.onHit({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:n}),n}async miss(e){const t=await this.missCache(e),n=on(t);return void 0!==n&&this.onMiss&&this.onMiss({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:n}),n}setCache(e,t){const n=this.getInternalCache(),r=nn(e);if(0===r.length)return void(rn(t)&&function(e,t){for(const t of Object.keys(e))delete e[t];Object.assign(e,t)}(n,t));let o=n;for(const e of r.slice(0,-1)){rn(o[e])||(o[e]={}),o=o[e]}o[r[r.length-1]]=t}getCache(e){const t=nn(this.genKey(e));let n=this.getInternalCache();if(0===t.length)return n;for(const e of t){if(!rn(n))return;n=n[e]}return n}genKey(e){return e}fallback(){throw new Error("DictionaryCache fallback is not implemented")}},sn=class extends qt{constructor({ttl:e,defaultLocale:t,dictionary:n={},loadDictionary:r,lifecycle:{onLocalesDictionaryCacheHit:o,onLocalesDictionaryCacheMiss:i,onDictionaryCacheHit:a,onDictionaryCacheMiss:s}}){super({},{onHit:o,onMiss:i}),this.ttl=6e4,this.ttl=null===e?-1:e??6e4,this._dictionaryLoader=r,this._onDictionaryCacheHit=a,this._onDictionaryCacheMiss=s,this.setCache(t,{dictionaryCache:new an({init:n,lifecycle:this._createDictionaryCacheLifecycle(t)}),expiresAt:-1})}get(e){const t=this.getCache(e);if(!t||t.expiresAt>0&&t.expiresAt<Date.now())return;const n=t.dictionaryCache;return null!=n&&this.onHit&&this.onHit({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:n}),n}async miss(e){const t=await this.missCache(e),n=t.dictionaryCache;return null!=n&&this.onMiss&&this.onMiss({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:n}),n}genKey(e){return e}async fallback(e){const t=this._dictionaryLoader(e),n=this.ttl<0?this.ttl:Date.now()+this.ttl;return{dictionaryCache:new an({init:await t,lifecycle:this._createDictionaryCacheLifecycle(e)}),expiresAt:n}}_createDictionaryCacheLifecycle(e){return{onHit:this._onDictionaryCacheHit?t=>this._onDictionaryCacheHit({locale:e,...t}):void 0,onMiss:this._onDictionaryCacheMiss?t=>this._onDictionaryCacheMiss({locale:e,...t}):void 0}}};var cn=class{constructor(){this.listeners={}}getOrCreateListeners(e){return this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e]}subscribe(e,t){const n=this.getOrCreateListeners(e);return n.add(t),()=>{n.delete(t)}}emit(e,t){this.listeners[e]?.forEach(e=>e(t))}};var ln=class extends Error{constructor(e){super(`I18nManager: source dictionary entry ${e} is not defined`),this.name="DictionarySourceNotFoundError"}},un=class extends cn{constructor(e){super(),this.resolveTranslationSync=(e,t,n)=>this.lookupTranslation(e,t,n),function(e,t="",n=!0){if(e.forEach(e=>{switch(e.type){case"error":Dt.error(t+e.message);break;case"warning":Dt.warn(t+e.message)}}),n&&e.some(e=>"error"===e.type))throw new Error("Validation errors occurred")}(Xt(e),"I18nManager: "),this.config=function(e){const t=Kt(e),n=function({defaultLocale:e,locales:t,customMapping:n}){return{defaultLocale:e,locales:Array.from(new Set([e,...t])),customMapping:n||{}}}({defaultLocale:e.defaultLocale||se,locales:e.locales||[se],customMapping:e.customMapping});return{environment:e.environment||"production",enableI18n:void 0===e.enableI18n||e.enableI18n,projectId:e.projectId,devApiKey:e.devApiKey,apiKey:e.apiKey,runtimeUrl:e.runtimeUrl,cacheExpiryTime:e.cacheExpiryTime,batchConfig:e.batchConfig,runtimeTranslation:e.runtimeTranslation,_versionId:e._versionId,...t?hn(n):n}}(e),this.localeConfig=new n({defaultLocale:this.config.defaultLocale,locales:this.config.locales,customMapping:this.config.customMapping});const t=function(e){return function({type:e,remoteTranslationLoaderParams:t,loadTranslations:n}){"disabled"===e&&Dt.warn("I18nManager: No translation loader found. No translations will be loaded.");const{cacheUrl:r,projectId:o,_versionId:i,_branchId:a,customMapping:s}=t;switch(e){case"remote":case"gt-remote":return Yt({cacheUrl:r||"",projectId:o||"",_versionId:i,_branchId:a,customMapping:s});case"custom":return n;case"disabled":return async e=>({})}}({loadTranslations:e.loadTranslations,type:$t(e),remoteTranslationLoaderParams:{cacheUrl:e.cacheUrl,projectId:e.projectId,_versionId:e._versionId,_branchId:e._branchId,customMapping:e.customMapping}})}(e),r=function(e){return e.loadDictionary??(()=>Promise.resolve({}))}(e),o=this.config.runtimeTranslation?.timeout??12e3,i=this.config.runtimeTranslation?.metadata??{},a=function(e,t,n={}){return r=>o=>e.translateMany(o,{...n,targetLocale:r},t)}(this.getGTClassClean(),o,i);!function({onLocalesCacheHit:e,onLocalesCacheMiss:t,onTranslationsCacheHit:n,onTranslationsCacheMiss:r,onLocalesDictionaryCacheHit:o,onLocalesDictionaryCacheMiss:i,onDictionaryCacheHit:a,onDictionaryCacheMiss:s},c){e&&c("locales-cache-hit",t=>{e({...t,value:t.translations})}),t&&c("locales-cache-miss",e=>{t({...e,value:e.translations})}),n&&c("translations-cache-hit",e=>{n({...e,value:e.translation})}),r&&c("translations-cache-miss",e=>{r({...e,value:e.translation})}),o&&c("locales-dictionary-cache-hit",e=>{o(e)}),i&&c("locales-dictionary-cache-miss",e=>{i(e)}),a&&c("dictionary-cache-hit",e=>{a(e)}),s&&c("dictionary-cache-miss",e=>{s(e)})}(e.lifecycle??{},(...e)=>this.subscribe(...e));const s=(c=(...e)=>this.emit(...e),{onLocalesCacheHit:e=>{c("locales-cache-hit",{locale:e.inputKey,translations:e.outputValue.getInternalCache()})},onLocalesCacheMiss:e=>{c("locales-cache-miss",{locale:e.inputKey,translations:e.outputValue.getInternalCache()})},onTranslationsCacheHit:e=>{c("translations-cache-hit",{locale:e.locale,hash:e.cacheKey,translation:e.outputValue})},onTranslationsCacheMiss:e=>{c("translations-cache-miss",{locale:e.locale,hash:e.cacheKey,translation:e.outputValue})},onLocalesDictionaryCacheHit:e=>{c("locales-dictionary-cache-hit",{locale:e.inputKey,dictionary:e.outputValue.getInternalCache()})},onLocalesDictionaryCacheMiss:e=>{c("locales-dictionary-cache-miss",{locale:e.inputKey,dictionary:e.outputValue.getInternalCache()})},onDictionaryCacheHit:e=>{c("dictionary-cache-hit",{locale:e.locale,id:e.cacheKey,dictionaryEntry:e.outputValue})},onDictionaryCacheMiss:e=>{c("dictionary-cache-miss",{locale:e.locale,id:e.cacheKey,dictionaryEntry:e.outputValue})}});var c;this.localesCache=new tn({loadTranslations:t,createTranslateMany:a,lifecycle:s,ttl:this.config.cacheExpiryTime,batchConfig:this.config.batchConfig}),this.localesDictionaryCache=new sn({defaultLocale:this.config.defaultLocale,dictionary:e.dictionary,loadDictionary:r,ttl:this.config.cacheExpiryTime,lifecycle:s})}subscribeToTranslationsCacheMiss(e,t,n){return this.subscribe("translations-cache-miss",r=>{r.locale===t&&r.hash===n&&e(r)})}getDefaultLocale(){return this.config.defaultLocale}getLocales(){return this.config.locales}getCustomMapping(){return this.config.customMapping}getVersionId(){return this.config._versionId}getGTClass(e){return this.getGTClassClean(e?this.resolveLocale(e):void 0)}isTranslationEnabled(){return this.config.enableI18n}getTranslationLoader(){return e=>this.loadTranslations(e)}async loadTranslations(e){try{const t=this.resolveCacheLocale(e);if(!t)return{};let n=this.localesCache.get(t);return n||(n=await this.localesCache.miss(t)),n.getInternalCache()}catch(e){return this.handleError(e),{}}}async loadDictionary(e){try{const t=this.resolveCacheLocale(e);if(!t)return this.localesDictionaryCache.get(this.config.defaultLocale)?.getInternalCache()??{};let n=this.localesDictionaryCache.get(t);return n||(n=await this.localesDictionaryCache.miss(t)),n.getInternalCache()}catch(e){return this.handleError(e),{}}}lookupDictionary(e,t){try{const n=this.resolveCacheLocale(e)??this.config.defaultLocale;return this.localesDictionaryCache.get(n)?.get(t)}catch(e){return void this.handleError(e)}}lookupTranslation(e,t,n){try{const{translationLocale:r,options:o}=this.resolveLookupParams(e,n);if(!r)return t;const i=this.localesCache.get(r);if(!i)return;return i.get({message:t,options:o})}catch(e){return void this.handleError(e)}}async lookupTranslationWithFallback(e,t,n){try{const{translationLocale:r,options:o}=this.resolveLookupParams(e,n);if(!r)return t;let i=this.localesCache.get(r);i||(i=await this.localesCache.miss(r));let a=i.get({message:t,options:o});return null==a&&(a=await i.miss({message:t,options:o})),a}catch(e){return void this.handleError(e)}}async getLookupTranslation(e,t=[]){try{const n=this.resolveCacheLocale(e);if(!n)return e=>e;const r=function(e,t,n){return e.flatMap(e=>{const r=e.options.$locale;if(null==r)return[e];try{const o=n(r);return o!==t?[]:[{message:e.message,options:{...e.options,$locale:o}}]}catch{return[]}})}(t,n,e=>this.resolveCacheLocale(e)??this.resolveLocale(e));r.length!==t.length&&Dt.warn(`I18nManager: getLookupTranslation(): prefetchEntries must all be the same locale, ignoring all entries that are not for ${n}`);let o=this.localesCache.get(n);return o||(o=await this.localesCache.miss(n)),o?(await Promise.all(r.filter(e=>null==o.get(e)).map(e=>o.miss(e))),(e,t={})=>o.get({message:e,options:this.resolveLookupOptions(t)})):()=>{}}catch(e){return this.handleError(e),e=>e}}async getTranslations(e){try{return this.loadTranslations(e)}catch(e){return this.handleError(e),{}}}async getTranslationResolver(e){return this.getLookupTranslation(e)}requiresTranslation(e){const t=this.getDefaultLocale(),n=this.getLocales();return this.isTranslationEnabled()&&this.localeConfig.requiresTranslation(e,t,n)}requiresDialectTranslation(e){const t=this.getDefaultLocale();return this.requiresTranslation(e)&&this.localeConfig.isSameLanguage(t,e)}handleError(e){if(e instanceof ln)throw e;if("development"===this.config.environment)throw e;Dt.error("I18nManager: "+e)}resolveLocale(e){const t=this.localeConfig.determineLocale(e);if(!this.localeConfig.isValidLocale(e)||!t)throw new Error(`I18nManager: validateLocale(): locale ${e} is not valid`);return t}resolveCacheLocale(e){const t=this.resolveLocale(e);if(this.requiresTranslation(t))return t;const n=this.localeConfig.resolveAliasLocale(r(e));return this.requiresTranslation(n)?n:void 0}resolveLookupParams(e,t){const n=this.resolveCacheLocale(e);return{translationLocale:n,options:n?this.resolveLookupOptions(t,n):t}}resolveLookupOptions(e={},t){return e.$locale?{...e,$locale:t??this.resolveCacheLocale(e.$locale)??this.resolveLocale(e.$locale)}:e}getGTClassClean(e){return new a({sourceLocale:this.config.defaultLocale,targetLocale:e,locales:Array.from(new Set(this.config.locales.map(e=>this.localeConfig.resolveCanonicalLocale(e)))),customMapping:this.config.customMapping,projectId:this.config.projectId,baseUrl:this.config.runtimeUrl||void 0,apiKey:this.config.apiKey,devApiKey:this.config.devApiKey})}};function hn(e){return{defaultLocale:r(e.defaultLocale),locales:e.locales.map(t=>("string"==typeof e.customMapping?.[t]?e.customMapping?.[t]:e.customMapping?.[t]?.code)?t:r(t)),customMapping:Object.fromEntries(Object.entries(e.customMapping||{}).map(([e,t])=>[e,"string"==typeof t?r(t):{...t,...t.code?{code:r(t.code)}:{}}]))}}let fn,pn=se;const dn={getLocale:()=>pn};let gn=dn;function mn(){return fn||(Dt.warn("getI18nManager(): Translation failed because I18nManager not initialized."),fn=new un({defaultLocale:se,locales:[se]})),fn}function yn(){return gn.getLocale()}function _n(e){gn=e}function bn(e){fn=e,pn=e.getDefaultLocale(),gn=dn}function En({source:e,target:t,options:n,sourceLocale:r}){return null!=t?vn(t,{$_fallback:e,...n}):vn(e,function(e,t){return t?{...e,$locale:t}:e}(n,r))}function vn(t,n){switch(n.$format??"STRING"){case"ICU":return Gt(t,n);case"I18NEXT":case"STRING":return function(t,n){return e(t,{locales:n.$locale??n.$_locales,maxChars:n.$maxChars})}(t,n);default:return t}}async function Tn(e,t,n={}){const r=mn(),o=Ln(e,n,"JSX");return await r.lookupTranslationWithFallback(o.$locale,t,o)??t}function Ln(e,t,n){return{...t,$format:t.$format??n,$locale:e}}function Cn(){return yn()}function wn(){return mn().getLocales()}function An(){return mn().getDefaultLocale()}function Sn(){return mn().getVersionId()}async function On(e,t={}){return async function(e,t,n={}){const r=mn(),o=Ln(e,n,"STRING");return En({source:t,target:await r.lookupTranslationWithFallback(o.$locale,t,o),options:o,sourceLocale:r.getDefaultLocale()})}(t.$locale??yn(),e,{$format:"STRING",...t})}function Pn(e,t,n={}){return function(e,t,n={}){const r=mn(),o=Ln(e,n,"STRING"),i=r.lookupTranslation(o.$locale,t,o);if(null!=i)return En({source:t,target:i,options:o,sourceLocale:r.getDefaultLocale()})}(e,t,{$format:"ICU",...n})}function Hn(e,t,n={}){return function(e,t,n={}){const r=mn(),o=Ln(e,n,"STRING");return En({source:t,target:r.lookupTranslation(o.$locale,t,o),options:o,sourceLocale:r.getDefaultLocale()})}(e,t,{$format:"ICU",...n})}function In({defaultLocale:e,locales:t,customMapping:n}={}){const r=e||se;return{defaultLocale:r,locales:t?.length?t:[r],customMapping:n}}function Mn(e,t={}){return Nn(e,In(t))}function Nn(e,t){if(!(null==e||Array.isArray(e)&&0===e.length))return new n(t).determineLocale(e)||void 0}function Bn(e,t={}){const n=In(t);return Nn(e,n)||n.defaultLocale}const Rn="en",jn="DEFAULT_TERMINATOR_KEY",Dn={ellipsis:{fr:{terminator:"…",separator:" "},zh:{terminator:"……",separator:void 0},ja:{terminator:"……",separator:void 0},[jn]:{terminator:"…",separator:void 0}},none:{[jn]:{terminator:void 0,separator:void 0}}},Un={Collator:Intl.Collator,DateTimeFormat:Intl.DateTimeFormat,DisplayNames:Intl.DisplayNames,ListFormat:Intl.ListFormat,Locale:Intl.Locale,NumberFormat:Intl.NumberFormat,PluralRules:Intl.PluralRules,RelativeTimeFormat:Intl.RelativeTimeFormat,Segmenter:Intl.Segmenter,CutoffFormat:class{constructor(e,t={}){try{const t=e?Array.isArray(e)?e.map(e=>String(e)):[String(e)]:["en"],n=Intl.getCanonicalLocales(t);this.locale=n.length?n[0]:"en"}catch{this.locale="en"}if(!Dn[t.style??"ellipsis"])throw new Error((e=>`generaltranslation Formatting Error: Invalid cutoff style: ${e}.`)(t.style??"ellipsis"));let n,r;if(void 0!==t.maxChars){n=t.style??"ellipsis";const e=new Intl.Locale(this.locale).language;r=Dn[n][e]||Dn[n].DEFAULT_TERMINATOR_KEY}let o=t.terminator??r?.terminator,i=null!=o?t.separator??r?.separator:void 0;this.additionLength=(o?.length??0)+(i?.length??0),void 0!==t.maxChars&&Math.abs(t.maxChars)<this.additionLength&&(o=void 0,i=void 0),this.options={maxChars:t.maxChars,style:n,terminator:o,separator:i}}format(e){return this.formatToParts(e).join("")}formatToParts(e){const{maxChars:t,terminator:n,separator:r}=this.options,o=void 0===t||Math.abs(t)>=e.length?t:t>=0?Math.max(0,t-this.additionLength):Math.min(0,t+this.additionLength),i=void 0!==o&&o>-1?e.slice(0,o):e.slice(o);return null==t||null==o||0===o||null==n||e.length<=Math.abs(t)?[i]:o>0?null!=r?[i,r,n]:[i,n]:null!=r?[n,r,i]:[n,i]}resolvedOptions(){return this.options}}},Gn=new class{constructor(){this.cache={}}_generateKey(e,t={}){return`${e?Array.isArray(e)?e.map(e=>String(e)).join(","):String(e):"undefined"}:${t?JSON.stringify(t,Object.keys(t).sort()):"{}"}`}get(e,...t){const[n="en",r={}]=t,o=this._generateKey(n,r);let i=this.cache[e]?.[o];return void 0===i&&(i=new Un[e](...t),this.cache[e]||(this.cache[e]={}),this.cache[e][o]=i),i}};function kn(e){const t=e;if(t&&"object"==typeof t&&"string"==typeof t.k){const e=Object.keys(t);if(1===e.length)return!0;if(2===e.length){if("number"==typeof t.i)return!0;if("string"==typeof t.v)return!0}if(3===e.length&&"string"==typeof t.v&&"number"==typeof t.i)return!0}return!1}function xn(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 i=e?.length;if(!r||void 0!==t){const t=(n&&`"${n}" `)+"expected Uint8Array, got "+(r?`length=${i}`:"type="+typeof e);if(!r)throw new TypeError(t);throw new RangeError(t)}return e}function Fn(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 $n(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Vn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Kn(e,t){return e<<32-t|e>>>t}"function"==typeof Uint8Array.from([]).toHex&&Uint8Array.fromHex,Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Xn(e,t,n){return e&t^~e&n}function Yn(e,t,n){return e&t^e&n^t&n}class qn{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=Vn(this.buffer)}update(e){Fn(this),xn(e);const{view:t,buffer:n,blockLen:r}=this,o=e.length;for(let i=0;i<o;){const a=Math.min(r-this.pos,o-i);if(a===r){const t=Vn(e);for(;r<=o-i;i+=r)this.process(t,i);continue}n.set(e.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Fn(this),function(e,t){xn(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:i}=this;t[i++]=128,$n(this.buffer.subarray(i)),this.padOffset>r-i&&(this.process(n,0),i=0);for(let e=i;e<r;e++)t[e]=0;n.setBigUint64(r-8,BigInt(8*this.length),o),this.process(n,0);const a=Vn(e),s=this.outputLen;if(s%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=s/4,l=this.get();if(c>l.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)a.setUint32(4*e,l[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:i,pos:a}=this;return e.destroyed=i,e.finished=o,e.length=r,e.pos=a,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const zn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Wn=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]),Jn=new Uint32Array(64);class Zn extends qn{constructor(e){super(64,e,8,!1)}get(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:a,H:s}=this;return[e,t,n,r,o,i,a,s]}set(e,t,n,r,o,i,a,s){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|i,this.G=0|a,this.H=0|s}process(e,t){for(let n=0;n<16;n++,t+=4)Jn[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=Jn[e-15],n=Jn[e-2],r=Kn(t,7)^Kn(t,18)^t>>>3,o=Kn(n,17)^Kn(n,19)^n>>>10;Jn[e]=o+Jn[e-7]+r+Jn[e-16]|0}let{A:n,B:r,C:o,D:i,E:a,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){const t=l+(Kn(a,6)^Kn(a,11)^Kn(a,25))+Xn(a,s,c)+Wn[e]+Jn[e]|0,u=(Kn(n,2)^Kn(n,13)^Kn(n,22))+Yn(n,r,o)|0;l=c,c=s,s=a,a=i+t|0,i=o,o=r,r=n,n=t+u|0}n=n+this.A|0,r=r+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,l=l+this.H|0,this.set(n,r,o,i,a,s,c,l)}roundClean(){$n(Jn)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),$n(this.buffer)}}class Qn extends Zn{A=0|zn[0];B=0|zn[1];C=0|zn[2];D=0|zn[3];E=0|zn[4];F=0|zn[5];G=0|zn[6];H=0|zn[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 Qn,(e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])}))(1));var er=function(e,t){return er=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])},er(e,t)};function tr(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}er(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var nr=function(){return nr=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},nr.apply(this,arguments)};function rr(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 or(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function ir(e,t){return function(n,r){t(n,r,e)}}function ar(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=r.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?r.static?e:e.prototype:null,h=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var d={};for(var g in r)d[g]="access"===g?{}:r[g];for(var g in r.access)d.access[g]=r.access[g];d.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var m=(0,n[p])("accessor"===c?{get:h.get,set:h.set}:h[l],d);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(s=a(m.get))&&(h.get=s),(s=a(m.set))&&(h.set=s),(s=a(m.init))&&o.unshift(s)}else(s=a(m))&&("field"===c?o.unshift(s):h[l]=s)}u&&Object.defineProperty(u,r.name,h),f=!0}function sr(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 cr(e){return"symbol"==typeof e?e:"".concat(e)}function lr(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 ur(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function hr(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function fr(e,t){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=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++,r=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],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var pr=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 dr(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||pr(t,e,n)}function gr(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 mr(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function yr(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(mr(arguments[t]));return e}function _r(){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 i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function br(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;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 Er(e){return this instanceof Er?(this.v=e,this):new Er(e)}function vr(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r=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,l)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||s(e,t)})},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=o[e](t)).value instanceof Er?Promise.resolve(n.value.v).then(c,l):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function Tr(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:Er(e[r](t)),done:!1}:o?o(t):t}:o}}function Lr(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=gr(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 Cr(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var wr=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},Ar=function(e){return Ar=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},Ar(e)};function Sr(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=Ar(e),r=0;r<n.length;r++)"default"!==n[r]&&pr(t,e,n[r]);return wr(t,e),t}function Or(e){return e&&e.__esModule?e:{default:e}}function Pr(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 Hr(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 Ir(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 Mr(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 Nr="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 Br(e){function t(t){e.error=e.hasError?new Nr(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 i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).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 Rr(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,n,r,o,i){return n?t?".jsx":".js":!r||o&&i?r+o+"."+i.toLowerCase()+"js":e}):e}var jr,Dr,Ur,Gr,kr={__extends:tr,__assign:nr,__rest:rr,__decorate:or,__param:ir,__esDecorate:ar,__runInitializers:sr,__propKey:cr,__setFunctionName:lr,__metadata:ur,__awaiter:hr,__generator:fr,__createBinding:pr,__exportStar:dr,__values:gr,__read:mr,__spread:yr,__spreadArrays:_r,__spreadArray:br,__await:Er,__asyncGenerator:vr,__asyncDelegator:Tr,__asyncValues:Lr,__makeTemplateObject:Cr,__importStar:Sr,__importDefault:Or,__classPrivateFieldGet:Pr,__classPrivateFieldSet:Hr,__classPrivateFieldIn:Ir,__addDisposableResource:Mr,__disposeResources:Br,__rewriteRelativeImportExtension:Rr},xr=Object.freeze({__proto__:null,__addDisposableResource:Mr,get __assign(){return nr},__asyncDelegator:Tr,__asyncGenerator:vr,__asyncValues:Lr,__await:Er,__awaiter:hr,__classPrivateFieldGet:Pr,__classPrivateFieldIn:Ir,__classPrivateFieldSet:Hr,__createBinding:pr,__decorate:or,__disposeResources:Br,__esDecorate:ar,__exportStar:dr,__extends:tr,__generator:fr,__importDefault:Or,__importStar:Sr,__makeTemplateObject:Cr,__metadata:ur,__param:ir,__propKey:cr,__read:mr,__rest:rr,__rewriteRelativeImportExtension:Rr,__runInitializers:sr,__setFunctionName:lr,__spread:yr,__spreadArray:br,__spreadArrays:_r,__values:gr,default:kr});!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"}(jr||(jr={})),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"}(Dr||(Dr={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(Ur||(Ur={}));try{"a"===(null===(Gr=function(e,t){return new RegExp(e,t)}("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Gr?void 0:Gr[0])}catch(jo){0}var Fr,$r,Vr={};function Kr(){return Fr||(Fr=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.SKELETON_TYPE=Vr.TYPE=void 0,Vr.isLiteralElement=function(t){return t.type===e.literal},Vr.isArgumentElement=function(t){return t.type===e.argument},Vr.isNumberElement=function(t){return t.type===e.number},Vr.isDateElement=function(t){return t.type===e.date},Vr.isTimeElement=function(t){return t.type===e.time},Vr.isSelectElement=function(t){return t.type===e.select},Vr.isPluralElement=function(t){return t.type===e.plural},Vr.isPoundElement=function(t){return t.type===e.pound},Vr.isTagElement=function(t){return t.type===e.tag},Vr.isNumberSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.number)},Vr.isDateTimeSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.dateTime)},Vr.createLiteralElement=function(t){return{type:e.literal,value:t}},Vr.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||(Vr.TYPE=e={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(t||(Vr.SKELETON_TYPE=t={}))),Vr;var e,t}Kr();var Xr={},Yr=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}(xr);!function(){if($r)return Xr;$r=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.printAST=n,Xr.doPrintAST=r,Xr.printDateTimeSkeleton=a;var e=Yr,t=Kr();function n(e){return r(e,!1)}function r(s,c){var l=s.map(function(l,u){return(0,t.isLiteralElement)(l)?function(e,t,n,r){var i=e.value;return n||"'"!==i[0]||(i="''".concat(i.slice(1))),r||"'"!==i[i.length-1]||(i="".concat(i.slice(0,i.length-1),"''")),i=o(i),t?i.replace("#","'#'"):i}(l,c,0===u,u===s.length-1):(0,t.isArgumentElement)(l)?function(e){var t=e.value;return"{".concat(t,"}")}(l):(0,t.isDateElement)(l)||(0,t.isTimeElement)(l)||(0,t.isNumberElement)(l)?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(a(n)):"::".concat(n.tokens.map(i).join(" "))):"","}");var n}(l):(0,t.isPluralElement)(l)?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,"}")}(l):(0,t.isSelectElement)(l)?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,"}")}(l):(0,t.isPoundElement)(l)?"#":(0,t.isTagElement)(l)?function(e){return"<".concat(e.value,">").concat(n(e.children),"</").concat(e.value,">")}(l):void 0});return l.join("")}function o(e){return e.replace(/([{}](?:[\s\S]*[{}])?)/,"'$1'")}function i(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 a(e){return e.pattern}}();const qr=["singular","plural","dual","zero","one","two","few","many","other"];function zr(e){return qr.includes(e)}const Wr={variable:"v",number:"n",datetime:"d",currency:"c","relative-time":"rt"};function Jr(e){return Wr[e]}function Zr(e,t=0){let n=t;function r(e){return u(e)?function(e){const{props:t}=e,r=(e=>{const{type:t,props:r}=e;n+=1;const o={id:n,injectionType:"manual"};let i;try{i="function"==typeof t&&t._gtt||""}catch{}if(i){const e=i.split("-");if("automatic"!==e[1]&&"automatic"!==e[2]||(o.injectionType="automatic"),"translate"===e[0]&&(e[0]="fragment"),"variable"===e[0]&&(o.variableType=e?.[1]||"variable"),"plural"===e[0]){const e=Object.entries(r).reduce((e,[t,r])=>(zr(t)&&(e[t]=Zr(r,n)),e),{});Object.keys(e).length&&(o.branches=e)}if("branch"===e[0]){const{children:e,branch:t,...i}=r,a=Object.fromEntries(Object.entries(i).filter(([e])=>!e.startsWith("data-"))),s=Object.entries(a).reduce((e,[t,r])=>(e[t]=Zr(r,n),e),{});Object.keys(s).length&&(o.branches=s)}o.transformation=e[0]}return o})(e),i={...t,"data-_gt":r};return t.children&&!r.variableType&&(i.children=o(t.children)),e.type===c.Fragment&&(i["data-_gt"].transformation="fragment"),c.cloneElement(e,i)}(e):e}function o(e){return Array.isArray(e)?c.Children.map(e,r):r(e)}return o(e)}function Qr(e,t){return u(e)?function(e,t){const{type:n,props:r}=e,o=function(e){const t="function"==typeof e&&"_gtt"in e?e._gtt:void 0;if(null==t||"string"!=typeof t)return;const n=t.split("-");return{componentType:n[0],injectionType:"automatic"===n[1]||"automatic"===n[2]?"automatic":"manual"}}(n);if("object"!=typeof r||null===r)return e;if(o){const{componentType:n,injectionType:i}=o;if("variable"===n)return e;if("branch"===n){const n=Object.entries(r).reduce((e,[n,r])=>("branch"===n||n.startsWith("data-")?e[n]=r:e[n]=Qr(r,t),e),{});return h(e,{...n})}if("plural"===n){const n=Object.entries(r).reduce((e,[n,r])=>(zr(n)||"children"===n?e[n]=Qr(r,t):e[n]=r,e),{});return h(e,{...n})}if("derive"===n)return h(e,{...r,..."children"in r&&{children:eo(r.children,t+1)}});if("translate"===n&&"automatic"===i&&t>0)return"children"in r?eo(r.children,t):void 0;"translate"===n&&"automatic"===i&&console.warn("@generaltranslation/react-core Warning: A <_T> component was found injected outside of a <Derive> boundary. This may affect translation resolution for this component.")}return h(e,{...r,..."children"in r&&{children:eo(r.children,t)}})}(e,t):e}function eo(e,t){return Array.isArray(e)?l.map(e,e=>Qr(e,t)):Qr(e,t)}const to={variable:"value",number:"n",datetime:"date",currency:"cost","relative-time":"time"};function no(e={},t){return e.name?e.name:`_gt_${to[t]||"value"}_${e["data-_gt"]?.id}`}const ro={pl:"placeholder",ti:"title",alt:"alt",arl:"aria-label",arb:"aria-labelledby",ard:"aria-describedby"},oo=e=>{if(!e)return"";const{type:t,props:n}=e;if(t&&"function"==typeof t){if("displayName"in t&&"string"==typeof t.displayName&&t.displayName)return t.displayName;if("name"in t&&"string"==typeof t.name&&t.name)return t.name}return t&&"string"==typeof t?t:n.href?"a":n["data-_gt"]?.id?`C${n["data-_gt"].id}`:"function"},io=e=>{return t=e,c.isValidElement(t)?(e=>{const{props:t}=e,n={t:oo(e)};if(t["data-_gt"]){const e=t["data-_gt"],r=e.transformation;if("variable"===r){const n=e.variableType||"variable",r=no(t,n),o=Jr(n);return{i:e.id,k:r,v:o}}n.i=e.id,n.d=((e,t,n)=>{let r=Object.entries(ro).reduce((e,[n,r])=>(t[r]&&(e[n]=t[r]),e),{});if("plural"===e&&n){const e={};Object.entries(n).forEach(([t,n])=>{e[t]=ao(n)}),r={...r,b:e,t:"p"}}if("branch"===e&&n){const e={};Object.entries(n).forEach(([t,n])=>{e[t]=ao(n)}),r={...r,b:e,t:"b"}}return Object.keys(r).length?r:void 0})(r,t,e.branches);let o=Object.entries(ro).reduce((e,[n,r])=>(t[r]&&(e[n]=t[r]),e),{});if("plural"===r&&e.branches){const t={};Object.entries(e.branches).forEach(([e,n])=>{t[e]=ao(n)}),o={...o,b:t,t:"p"}}if("branch"===r&&e.branches){const t={};Object.entries(e.branches).forEach(([e,n])=>{t[e]=ao(n)}),o={...o,b:t,t:"b"}}n.d=Object.keys(o).length?o:void 0}return t.children&&(n.c=ao(t.children)),n})(e):"number"==typeof e?e.toString():e;var t};function ao(e){return Array.isArray(e)?e.map(io):io(e)}function so(e,t,n){let r="",o=null;return"number"==typeof e&&!o&&n&&(r=function(e,t=qr,n=["en"]){const r=Gn.get("PluralRules",n).select(e),o=Math.abs(e);if(0===o&&t.includes("zero"))return"zero";if(1===o){if(t.includes("singular"))return"singular";if(t.includes("one"))return"one"}if("one"===r&&t.includes("singular"))return"singular";if(2===o){if(t.includes("dual"))return"dual";if(t.includes("two"))return"two"}return"two"===r&&t.includes("dual")?"dual":t.includes(r)?r:"two"===r&&t.includes("dual")?"dual":"two"===r&&t.includes("plural")?"plural":"two"===r&&t.includes("other")?"other":"few"===r&&t.includes("plural")?"plural":"few"===r&&t.includes("other")?"other":"many"===r&&t.includes("plural")?"plural":"many"===r&&t.includes("other")?"other":"other"===r&&t.includes("plural")?"plural":""}(e,Object.keys(n),t)),r&&!o&&(o=n[r]),o}function co(e){return"object"==typeof e&&!!e&&"data-_gt"in e&&"object"==typeof e["data-_gt"]&&!!e["data-_gt"]&&"transformation"in e["data-_gt"]&&"variable"===e["data-_gt"]?.transformation}function lo(e){const t=e["data-_gt"]?.variableType||"variable";return{variableName:no(e,t),variableType:Jr(t),injectionType:e["data-_gt"]?.injectionType||"manual",variableValue:void 0!==e.value?e.value:void 0!==e.date?e.date:void 0!==e["data-_gt-unformatted-value"]?e["data-_gt-unformatted-value"]:void 0!==e.children?e.children:void 0,variableOptions:(()=>{const t={...void 0!==e.currency&&{currency:e.currency},...void 0!==e.unit&&{unit:e.unit},...void 0!==e.baseDate&&{baseDate:e.baseDate},...void 0!==e.options&&e.options};return Object.keys(t).length?t:"string"==typeof e["data-_gt-variable-options"]?JSON.parse(e["data-_gt-variable-options"]):e["data-_gt-variable-options"]||void 0})()}}function uo(e){return e&&e.props&&e.props["data-_gt"]?e.props["data-_gt"]:null}function ho({children:e,defaultLocale:t=Rn,renderVariable:n}){const r=e=>c.isValidElement(e)?(e=>{const r=uo(e);if(co(e.props)){const{variableType:r,variableValue:o,variableOptions:i,injectionType:a}=lo(e.props);return n({variableType:r,variableValue:o,variableOptions:i,locales:[t],injectionType:a})}if("plural"===r?.transformation){const n=r.branches||{};return o(so(e.props.n,[t],n)||e.props.children)}if("branch"===r?.transformation){const{children:t,branch:n}=e.props,i=r.branches||{};return o(void 0!==i[n]?i[n]:t)}return"fragment"===r?.transformation?c.createElement(c.Fragment,{key:e.props.key,children:o(e.props.children)}):e.props.children?c.cloneElement(e,{...e.props,"data-_gt":void 0,children:o(e.props.children)}):c.cloneElement(e,{...e.props,"data-_gt":void 0})})(e):e,o=e=>Array.isArray(e)?c.Children.map(e,r):r(e);return o(e)}function fo({sourceElement:e,targetElement:t,locales:n=[Rn],renderVariable:r}){const{props:o}=e,i=o["data-_gt"],a=i?.transformation,s=t.d,l={};if(s&&Object.entries(ro).forEach(([e,t])=>{s[e]&&(l[t]=s[e])}),"plural"===a){const o=e.props.n;return po({source:so(o,n,i.branches||{})||e.props.children,target:so(o,n,t.d?.b||{})||t.c,locales:n,renderVariable:r})}if("branch"===a){const{branch:e,children:a}=o;return po({source:(i.branches||{})[e]||a,target:(t.d?.b||{})[e]||t.c,locales:n,renderVariable:r})}return"fragment"===a&&t.c?c.createElement(c.Fragment,{key:e.props.key,children:po({source:o.children,target:t.c,locales:n,renderVariable:r})}):o?.children&&t?.c?c.cloneElement(e,{...o,...l,"data-_gt":void 0,children:po({source:o.children,target:t.c,locales:n,renderVariable:r})}):ho({children:e,defaultLocale:n[0],renderVariable:r})}function po({source:e,target:t,locales:n=[Rn],renderVariable:r}){if(null==t&&e)return ho({children:e,defaultLocale:n[0],renderVariable:r});if("string"==typeof t)return t;if(Array.isArray(t)&&!Array.isArray(e)&&e&&(e=[e]),Array.isArray(e)&&Array.isArray(t)){const o={},i={},a={},s=e.filter(e=>{if(c.isValidElement(e)){if(!co(e.props))return!0;{const{variableName:t,variableValue:n,variableOptions:r,injectionType:s}=lo(e.props);o[t]=n,i[t]=r,a[t]=s}}return!1}),l=e=>s.find(t=>{const n=uo(t);return void 0!==n?.id&&n.id===e.i})||s.shift();return t.map((e,t)=>{if("string"==typeof e)return m(c.Fragment,{children:e},`string_${t}`);if(kn(e))return m(c.Fragment,{children:r({variableType:e.v||"v",variableValue:o[e.k],variableOptions:i[e.k],locales:n,injectionType:a[e.k]||"manual"})},`var_${t}`);const s=l(e);return s?m(c.Fragment,{children:fo({sourceElement:s,targetElement:e,locales:n,renderVariable:r})},`element_${t}`):null})}if(t&&"object"==typeof t&&!Array.isArray(t)){const o=kn(t)?"variable":"element";if(c.isValidElement(e)){if("element"===o)return fo({sourceElement:e,targetElement:t,locales:n,renderVariable:r});if(co(e.props)){const{variableValue:t,variableOptions:o,variableType:i,injectionType:a}=lo(e.props);return r({variableType:i,variableValue:t,variableOptions:o,locales:n,injectionType:a})}}}return ho({children:e,defaultLocale:n[0],renderVariable:r})}const go="generaltranslation.locale";function mo({defaultLocale:e,locales:t,customMapping:n,localeCookieName:r=go,getLocale:o}){const i={defaultLocale:e,locales:t,customMapping:n},a=Bn(void 0,i);if(o){const e=o(),t=Mn(e,i);return t||(console.warn((({customLocale:e,defaultLocale:t})=>`${_} Warning: Custom getLocale() function returned an unsupported locale: "${e}". Falling back to default locale: "${t}".`)({customLocale:e,defaultLocale:a})),a)}const s=[],c=function({cookieName:e}){var t;if("undefined"==typeof document)return;return null===(t=document.cookie.split("; ").find(t=>t.startsWith(`${e}=`)))||void 0===t?void 0:t.split("=")[1]}({cookieName:r});c&&s.push(c);const l=(null===navigator||void 0===navigator?void 0:navigator.languages)||[];return s.push(...l),Bn(s,i)}class yo{constructor(e={}){var{getLocale:t,localeCookieName:n=go}=e,r=A(e,["getLocale","localeCookieName"]);this.localeConfig=r,this.customGetLocale=t,this.localeCookieName=n}getLocale(){return mo(Object.assign(Object.assign({},this.localeConfig),{getLocale:this.customGetLocale,localeCookieName:this.localeCookieName}))}setLocale(e){!function({cookieName:e,value:t}){"undefined"!=typeof document&&(document.cookie=`${e}=${t};path=/`)}({cookieName:this.localeCookieName,value:e})}}const _o={updateHtmlLangTag:!0,updateHtmlDirTag:!0},bo=new Map;class Eo{constructor({locale:e,projectId:t,init:n,maxSize:r,ttl:o,purgeInterval:i}){this._writeBuffer={},this._flushTimer=null,this._estimatedSize=0,this._storageKey=`gt:tx:${t}:${e}`,this._purgeTimestampKey=`gt:tx:purge:${t}:${e}`,this._maxSize=null!=r?r:1e6,this._ttl=null!=o?o:864e5,this._purgeInterval=null!=i?i:3e5,n&&this.initStorage(n),bo.has(this._storageKey)&&clearInterval(bo.get(this._storageKey));const a=setInterval(()=>this._backgroundPurge(),this._purgeInterval);bo.set(this._storageKey,a)}getInternalCache(){const e=Date.now(),t=this._readFromStorage(),n={};for(const[r,o]of Object.entries(t))o.exp>e&&(n[r]=o.t);return Object.assign(n,this._writeBuffer),n}write(e,t){this._writeBuffer[e]=t,this._scheduleFlush()}purge(e){const t=this._readFromStorage();for(const n of e)delete t[n];this._writeRaw(JSON.stringify(t))}_scheduleFlush(){this._flushTimer||(this._flushTimer=setTimeout(()=>{this._flushTimer=null,this._flush()},500))}_flush(){if(0!==Object.keys(this._writeBuffer).length){try{const e=this._readFromStorage(),t=Date.now();this._estimatedSize>this._maxSize&&this._purgeCache(e,t);const n=t+this._ttl;for(const[t,r]of Object.entries(this._writeBuffer))e[t]={t:r,exp:n};this._writeRaw(JSON.stringify(e))}catch(e){}this._writeBuffer={}}}_purgeCache(e,t){const n=Object.keys(e);if(0===n.length)return;const r=this._estimatedSize/n.length;vo(e,t);const o=.8*this._maxSize,i=Math.floor(o/r),a=Object.entries(e);if(a.length>i){a.sort((e,t)=>e[1].exp-t[1].exp);const t=a.length-i;for(let n=0;n<t;n++)delete e[a[n][0]]}}_backgroundPurge(){try{const e=localStorage.getItem(this._purgeTimestampKey),t=e?parseInt(e,10):0,n=Date.now();if(n-t<this._purgeInterval)return;const r=this._readFromStorage(),o=Object.keys(r).length;vo(r,n),Object.keys(r).length<o&&this._writeRaw(JSON.stringify(r)),localStorage.setItem(this._purgeTimestampKey,String(n))}catch(e){}}_readFromStorage(){try{const e=localStorage.getItem(this._storageKey);return e?(this._estimatedSize=e.length,JSON.parse(e)):(this._estimatedSize=0,{})}catch(e){return this._estimatedSize=0,{}}}initStorage(e){try{const t=this._readFromStorage(),n=Date.now()+this._ttl;for(const[r,o]of Object.entries(e))t[r]={t:o,exp:n};this._writeRaw(JSON.stringify(t))}catch(e){}}_writeRaw(e){try{localStorage.setItem(this._storageKey,e),this._estimatedSize=e.length}catch(e){}}}function vo(e,t=Date.now()){for(const n of Object.keys(e))e[n].exp<=t&&delete e[n]}class To extends un{constructor(e){var t,n,r;const{htmlTagOptions:o}=e,i=A(e,["htmlTagOptions"]),a={},s=Lo(null===(r=null===(n=null===(t=e.files)||void 0===t?void 0:t.gt)||void 0===n?void 0:n.parsingFlags)||void 0===r?void 0:r.devHotReload),c=function(e){var t,n,r;const o={environment:!!import.meta.env.DEV,customLoadTranslations:!!e.loadTranslations,projectId:!!e.projectId,devApiKey:!!e.devApiKey},i=Object.values(o).every(Boolean),a=Lo(null===(r=null===(n=null===(t=e.files)||void 0===t?void 0:t.gt)||void 0===n?void 0:n.parsingFlags)||void 0===r?void 0:r.devHotReload),s=a.strings||a.jsx;if(import.meta.env.DEV&&s&&!i){const e=Object.keys(o).filter(e=>!o[e]);console.warn(`Dev hot reload is enabled, but the requirements are not met: ${e.join(", ")}`)}return i&&s}(e),l=c?function(e,t,n){return r=>B(this,void 0,void 0,function*(){const o=yield e(r);return n[r]||(n[r]=new Eo({locale:r,projectId:t,init:o})),n[r].getInternalCache()})}(e.loadTranslations,e.projectId,a):e.loadTranslations;super(Object.assign(Object.assign({},i),{loadTranslations:l})),this._devHotReloadJsx=!1,this._localStorageCaches=a,this._devHotReloadJsx=c&&s.jsx,this.htmlTagOptions=Object.assign(Object.assign({},_o),o),c&&this.subscribe("translations-cache-miss",({locale:e,hash:t,translation:n})=>{const r=a[e];r?r.write(t,n):a[e]=new Eo({locale:e,projectId:this.config.projectId,init:{[t]:n}})})}isDevHotReloadJsx(){return this._devHotReloadJsx}getLocalStorageTranslationCache(e,t){if(import.meta.env.DEV)return this._localStorageCaches[e]||(this._localStorageCaches[e]=new Eo({locale:e,projectId:this.config.projectId,init:t})),this._localStorageCaches[e]}updateHtmlTag(e,t){const n=(null==t?void 0:t.lang)||e,r=this.getGTClass(),o=r.resolveCanonicalLocale(n);if(!r.isValidLocale(o))return void console.warn(T(n));const i=(null==t?void 0:t.dir)||r.getLocaleDirection(o),a=Object.assign(Object.assign({},this.htmlTagOptions),t);a.updateHtmlLangTag&&(document.documentElement.lang=o),a.updateHtmlDirTag&&(document.documentElement.dir=i)}}function Lo(e){var t,n;return void 0===e||"boolean"==typeof e?{strings:!!e,jsx:!!e}:{strings:null!==(t=e.strings)&&void 0!==t&&t,jsx:null!==(n=e.jsx)&&void 0!==n&&n}}const{getConditionStore:Co,setConditionStore:wo}=function(e){let t;return{getConditionStore:function(){if(!t)throw new Error(e);return t},setConditionStore:function(e){t=e,_n(e)}}}(v);function Ao(){const e=mn();if(!(e instanceof To))throw new Error(v);return e}function So(e){const t=new To(e),n=new yo({defaultLocale:t.getDefaultLocale(),locales:t.getLocales(),customMapping:t.getCustomMapping(),getLocale:e.getLocale});bn(t),wo(n)}function Oo(e){const t=mn(),n=Mn(e,{defaultLocale:t.getDefaultLocale(),locales:t.getLocales(),customMapping:t.getCustomMapping()});n?(Co().setLocale(n),window.location.reload()):console.warn(T(e))}function Po(e){return B(this,void 0,void 0,function*(){So(e);const t=Ao(),n=Cn();t.updateHtmlTag(n),yield t.loadTranslations(n)})}function Ho(e){var{children:t,branch:n}=e,r=A(e,["children","branch"]);const o=null==n?void 0:n.toString();"string"==typeof n&&n.startsWith("data-")&&(n=void 0);return o&&void 0!==r[o]?r[o]:t}function Io(e){return Ho(e)}function Mo(e){var{children:t,n:n,locales:r}=e,o=A(e,["children","n","locales"]);const i=[...r?[r]:[],Cn(),An()];return"number"!=typeof n?t:so(n,i,o)||t}function No(e){return Mo(e)}function Bo({children:e}){return e}function Ro({children:e}){return e}Ho._gtt="branch",Io._gtt="branch-automatic",Mo._gtt="plural",No._gtt="plural-automatic",Bo._gtt="derive",Ro._gtt="derive-automatic";const jo=(e,...t)=>{var n,r;if("undefined"==typeof window&&console.warn(`${_} Warning: Translation failed for t("${"string"==typeof(r=e)?r:"`"+(null==r?void 0:r.join("${}"))+"`"}") because it was used outside of a browser environment. Falling back to original message.`),"string"==typeof e){const r=t.at(0);return Hn(null!==(n=null==r?void 0:r.$locale)&&void 0!==n?n:Cn(),e,r)}return function(e,t){const n=Cn(),r=function(e,t){return e.map((e,n)=>{var r;return e+(null!==(r=t[n])&&void 0!==r?r:"")}).join("")}(e,t),o=Pn(n,r);if(o)return o;const{message:i,variables:a}=function(e,t){const n=[],r={};let o=0;for(let i=0;i<e.length;i++)if(n.push(e[i]),i<t.length){const e=o.toString();n.push(`{${e}}`),r[e]=t[i],o++}return{message:n.join(""),variables:r}}(e,t);return Hn(n,i,a)}(e,t)};const Do=(e,t={})=>On(e,Object.assign({$format:"ICU"},t)),Uo=(e,t={})=>{var n;return Tn(null!==(n=t.$locale)&&void 0!==n?n:Cn(),e,Object.assign({$format:"JSX"},t))};function Go({children:e,options:t={},locales:n=[]}){if(null==e)return null;const r="string"==typeof e?parseFloat(e):e,o=[...n,Cn(),An()];return mn().getGTClass().formatNum(r,Object.assign({locales:o},t))}function ko(e){return Go(e)}function xo({children:e}){return e}function Fo({children:e}){return xo({children:e})}function $o({children:e}){return xo({children:e})}function Vo({children:e,currency:t="USD",options:n={},locales:r=[]}){if(null==e)return null;const o="string"==typeof e?parseFloat(e):e,i=[...r,Cn(),An()];return mn().getGTClass().formatCurrency(o,t,Object.assign({locales:i},n))}function Ko(e){return Vo(e)}function Xo({children:e,options:t={},locales:n=[]}){if(null==e)return null;const r=[...n,Cn(),An()];return mn().getGTClass().formatDateTime(e,Object.assign({locales:r},t)).replace(/[\u200F\u202B\u202E]/g,"")}function Yo(e){return Xo(e)}Go._gtt="variable-number-automatic",ko._gtt="variable-number",$o._gtt="variable-variable",Fo._gtt="variable-variable-automatic",Vo._gtt="variable-currency-automatic",Ko._gtt="variable-currency",Xo._gtt="variable-datetime-automatic",Yo._gtt="variable-datetime";const qo=({variableType:e,variableValue:t,variableOptions:n,injectionType:r})=>{switch(e){case"n":return m("automatic"===r?ko:Go,{options:n,children:t});case"d":return m("automatic"===r?Yo:Xo,{options:n,children:t});case"c":return m("automatic"===r?Ko:Vo,{options:n,children:t});default:return"automatic"===r?xo({children:t}):m($o,{children:t})}};function zo(e){return Jo(e)}function Wo(e){return Jo(e)}function Jo(e){var{children:t}=e,n=A(e,["children"]);const{taggedSourceChildren:r,sourceJsxChildren:o,renderSourceChildren:i,options:a}=function({sourceChildren:e,params:t}){const n=p(()=>Zr(function(e){return eo(e,0)}(e)),[e]),r=p(()=>ao(n),[n]),o=d(()=>ho({children:n,defaultLocale:Cn(),renderVariable:qo}),[n]),i=p(()=>{return e=t,Object.assign({$format:"JSX",$context:e.context,$id:e.id,$_hash:e._hash},e);var e},[t.context,t.id,t._hash,t.$format,t.$context,t.$id,t.$_hash]);return{taggedSourceChildren:n,sourceJsxChildren:r,renderSourceChildren:o,options:i}}({sourceChildren:t,params:n}),c=Cn(),l=An();if(!s(l,c))return i();const u=Object.assign(Object.assign({},a),{$locale:c}),h=function(e,t,n={}){const r=mn(),o=Ln(e,n,"JSX");return r.lookupTranslation(o.$locale,t,o)}(c,o,u);return h?po({source:r,target:h,locales:[c],renderVariable:qo}):Ao().isDevHotReloadJsx()?m(f,{fallback:i(),children:m(Zo,{sourceJsxChildren:o,taggedSourceChildren:r,options:u,targetLocale:c})}):i()}function Zo({sourceJsxChildren:e,taggedSourceChildren:t,options:n,targetLocale:r}){return po({source:t,target:g(Tn(r,e,n)),locales:[r],renderVariable:qo})}function Qo({date:e,children:t,value:n,unit:r,baseDate:o,locales:i=[],options:a={}}){const s=mn().getGTClass(),c=[...i,Cn(),An()],l=null!=e?e:t;let u;if("development"!==process.env.NODE_ENV||void 0===n||r||console.warn("<RelativeTime>: `value` was provided without `unit`. The `value` prop will be ignored."),void 0!==n&&r)u=s.formatRelativeTime(n,r,{locales:c,numeric:a.numeric,style:a.style,localeMatcher:a.localeMatcher});else{if(null==l)return null;u=s.formatRelativeTimeFromDate(l,{locales:c,baseDate:null!=o?o:new Date,numeric:a.numeric,style:a.style,localeMatcher:a.localeMatcher})}return u}function ei(e){return Qo(e)}function ti(e){Ao().updateHtmlTag(e,{lang:e,updateHtmlLangTag:!0,updateHtmlDirTag:!1})}function ni(e){Ao().updateHtmlTag(Cn(),{dir:e,updateHtmlLangTag:!1,updateHtmlDirTag:!0})}function ri(e){if(!e)return;const t={};for(const n in e)t[n]={name:e[n]};return t}function oi(e){var{locale:t,locales:n,customNames:r,customMapping:o=ri(r),setLocale:i,getLocaleProperties:a}=e,s=A(e,["locale","locales","customNames","customMapping","setLocale","getLocaleProperties"]);const c=e=>{if(o&&o[e]){if("string"==typeof o[e])return o[e];if(o[e].name)return o[e].name}return(t=a(e).nativeNameWithRegionCode)?t.charAt(0).toUpperCase()+(t.length>1?t.slice(1):""):"";var t};return n&&0!==n.length&&i?y("select",Object.assign({},s,{value:t||"",onChange:e=>i(e.target.value),children:[!t&&m("option",{value:""}),n.map(e=>m("option",{value:e,suppressHydrationWarning:!0,children:c(e)},e))]})):null}function ii(e){var{locales:t}=e,n=A(e,["locales"]);const{sortedLocales:r,setLocale:o,locale:i,getLocaleProperties:a}=p(()=>{const e=mn(),n=e.getGTClass(),r=Cn(),o=e=>n.getLocaleProperties(e);if(t)return{locale:r,setLocale:Oo,sortedLocales:t,getLocaleProperties:o};const i=e.getLocales().sort((e,t)=>(new Intl.Collator).compare(n.getLocaleProperties(e).nativeNameWithRegionCode,n.getLocaleProperties(t).nativeNameWithRegionCode));return{locale:r,sortedLocales:i,setLocale:Oo,getLocaleProperties:o}},[t]);return m(oi,Object.assign({locale:i,locales:r,setLocale:o,getLocaleProperties:a},n))}Wo._gtt="translate-client",zo._gtt="translate-client-automatic",Qo._gtt="variable-relative-time-automatic",ei._gtt="variable-relative-time",function(e=E){if("undefined"==typeof window)throw new Error(e)}(b);export{Ho as Branch,Ko as Currency,Yo as DateTime,Bo as Derive,Io as GtInternalBranch,Vo as GtInternalCurrency,Xo as GtInternalDateTime,Ro as GtInternalDerive,Go as GtInternalNum,No as GtInternalPlural,Qo as GtInternalRelativeTime,Uo as GtInternalRuntimeTranslateJsx,Do as GtInternalRuntimeTranslateString,zo as GtInternalTranslateJsx,Fo as GtInternalVar,ii as LocaleSelector,ko as Num,Mo as Plural,ei as RelativeTime,Wo as T,$o as Var,Po as bootstrap,An as getDefaultLocale,Cn as getLocale,wn as getLocales,Sn as getVersionId,So as initializeGT,Oo as setLocale,jo as t,ni as updateHtmlTagDir,ti as updateHtmlTagLang};
1
+ import{formatCutoff as e,formatMessage as t,LocaleConfig as n,standardizeLocale as r,isValidLocale as o,resolveCanonicalLocale as i}from"generaltranslation/core";import{GT as a,requiresTranslation as s}from"generaltranslation";import c,{Children as l,isValidElement as u,cloneElement as h,Suspense as f,useMemo as p,useCallback as d,use as g}from"react";import{jsx as y,jsxs as m}from"react/jsx-runtime";const _="gt-react",b=`${_}/browser Error: The ${_}/browser module requires a browser environment`,E=`${_} Error: You are trying to import a browser-only module into a non-browser environment.`,v=`${_} Error: BrowserI18nManager not initialized. Invoke initializeGT() to initialize.`,T=e=>`${_} Warning: Invalid locale: "${e}".`;var L=function(e,t){return L=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])},L(e,t)};function C(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}L(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var w=function(){return w=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},w.apply(this,arguments)};function A(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 O(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function S(e,t){return function(n,r){t(n,r,e)}}function H(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=r.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?r.static?e:e.prototype:null,h=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var d={};for(var g in r)d[g]="access"===g?{}:r[g];for(var g in r.access)d.access[g]=r.access[g];d.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var y=(0,n[p])("accessor"===c?{get:h.get,set:h.set}:h[l],d);if("accessor"===c){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=a(y.get))&&(h.get=s),(s=a(y.set))&&(h.set=s),(s=a(y.init))&&o.unshift(s)}else(s=a(y))&&("field"===c?o.unshift(s):h[l]=s)}u&&Object.defineProperty(u,r.name,h),f=!0}function P(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 I(e){return"symbol"==typeof e?e:"".concat(e)}function M(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 R(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function B(e,t){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=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++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.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],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var j=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 D(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||j(t,e,n)}function U(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 G(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function k(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(G(arguments[t]));return e}function x(){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 i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function F(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;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 $(e){return this instanceof $?(this.v=e,this):new $(e)}function V(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r=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,l)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||s(e,t)})},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=o[e](t)).value instanceof $?Promise.resolve(n.value.v).then(c,l):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function K(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:$(e[r](t)),done:!1}:o?o(t):t}:o}}function X(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=U(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 Y(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var W=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},q=function(e){return q=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},q(e)};function z(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=q(e),r=0;r<n.length;r++)"default"!==n[r]&&j(t,e,n[r]);return W(t,e),t}function J(e){return e&&e.__esModule?e:{default:e}}function Z(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 Q(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 ee(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 te(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 ne="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 re(e){function t(t){e.error=e.hasError?new ne(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 i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).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 oe(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,n,r,o,i){return n?t?".jsx":".js":!r||o&&i?r+o+"."+i.toLowerCase()+"js":e}):e}var ie={__extends:C,__assign:w,__rest:A,__decorate:O,__param:S,__esDecorate:H,__runInitializers:P,__propKey:I,__setFunctionName:M,__metadata:N,__awaiter:R,__generator:B,__createBinding:j,__exportStar:D,__values:U,__read:G,__spread:k,__spreadArrays:x,__spreadArray:F,__await:$,__asyncGenerator:V,__asyncDelegator:K,__asyncValues:X,__makeTemplateObject:Y,__importStar:z,__importDefault:J,__classPrivateFieldGet:Z,__classPrivateFieldSet:Q,__classPrivateFieldIn:ee,__addDisposableResource:te,__disposeResources:re,__rewriteRelativeImportExtension:oe},ae=Object.freeze({__proto__:null,__addDisposableResource:te,get __assign(){return w},__asyncDelegator:K,__asyncGenerator:V,__asyncValues:X,__await:$,__awaiter:R,__classPrivateFieldGet:Z,__classPrivateFieldIn:ee,__classPrivateFieldSet:Q,__createBinding:j,__decorate:O,__disposeResources:re,__esDecorate:H,__exportStar:D,__extends:C,__generator:B,__importDefault:J,__importStar:z,__makeTemplateObject:Y,__metadata:N,__param:S,__propKey:I,__read:G,__rest:A,__rewriteRelativeImportExtension:oe,__runInitializers:P,__setFunctionName:M,__spread:k,__spreadArray:F,__spreadArrays:x,__values:U,default:ie});const se="en",ce="https://cdn.gtx.dev";function le(e){if(void 0===e)return;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)){let t="[";for(let n=0;n<e.length;n++)n&&(t+=","),t+=le(e[n])||"null";return t+"]"}const t=Object.keys(e).sort();let n="";for(const r of t){const t=le(e[r]);t&&(n&&(n+=","),n+=JSON.stringify(r)+":"+t)}return"{"+n+"}"}function ue(e){return le(e)??""}function he(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 i=e?.length;if(!r||void 0!==t){const t=(n&&`"${n}" `)+"expected Uint8Array"+""+", got "+(r?`length=${i}`:"type="+typeof e);if(!r)throw new TypeError(t);throw new RangeError(t)}return e}function fe(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 pe(...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 ge(e,t){return e<<32-t|e>>>t}const ye=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),me=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function _e(e,t={}){const n=(t,n)=>e(n).update(t).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=t=>e(t),Object.assign(n,t),Object.freeze(n)}const be=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function Ee(e,t,n){return e&t^~e&n}function ve(e,t,n){return e&t^e&n^t&n}class Te{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=de(this.buffer)}update(e){fe(this),he(e);const{view:t,buffer:n,blockLen:r}=this,o=e.length;for(let i=0;i<o;){const a=Math.min(r-this.pos,o-i);if(a===r){const t=de(e);for(;r<=o-i;i+=r)this.process(t,i);continue}n.set(e.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){fe(this),function(e,t){he(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:i}=this;t[i++]=128,pe(this.buffer.subarray(i)),this.padOffset>r-i&&(this.process(n,0),i=0);for(let e=i;e<r;e++)t[e]=0;n.setBigUint64(r-8,BigInt(8*this.length),o),this.process(n,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,l=this.get();if(c>l.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)a.setUint32(4*e,l[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:i,pos:a}=this;return e.destroyed=i,e.finished=o,e.length=r,e.pos=a,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const Le=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ce=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]),we=new Uint32Array(64);class Ae extends Te{constructor(e){super(64,e,8,!1)}get(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:a,H:s}=this;return[e,t,n,r,o,i,a,s]}set(e,t,n,r,o,i,a,s){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|i,this.G=0|a,this.H=0|s}process(e,t){for(let n=0;n<16;n++,t+=4)we[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=we[e-15],n=we[e-2],r=ge(t,7)^ge(t,18)^t>>>3,o=ge(n,17)^ge(n,19)^n>>>10;we[e]=o+we[e-7]+r+we[e-16]|0}let{A:n,B:r,C:o,D:i,E:a,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){const t=l+(ge(a,6)^ge(a,11)^ge(a,25))+Ee(a,s,c)+Ce[e]+we[e]|0,u=(ge(n,2)^ge(n,13)^ge(n,22))+ve(n,r,o)|0;l=c,c=s,s=a,a=i+t|0,i=o,o=r,r=n,n=t+u|0}n=n+this.A|0,r=r+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,l=l+this.H|0,this.set(n,r,o,i,a,s,c,l)}roundClean(){pe(we)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),pe(this.buffer)}}class Oe extends Ae{A=0|Le[0];B=0|Le[1];C=0|Le[2];D=0|Le[3];E=0|Le[4];F=0|Le[5];G=0|Le[6];H=0|Le[7];constructor(){super(32)}}const Se=_e(()=>new Oe,be(1));var He,Pe,Ie;!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"}(He||(He={})),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"}(Pe||(Pe={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(Ie||(Ie={}));var Me=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ne=/(?:[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 Re(e){var t={};return e.replace(Ne,function(e){var n=e.length;switch(e[0]){case"G":t.era=4===n?"long":5===n?"narrow":"short";break;case"y":t.year=2===n?"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"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-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===n?"long":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-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"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-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"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<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 Be=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function je(e){return e.replace(/^(.*?)-/,"")}var De=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Ue=/^(@+)?(\+|#+)?[rs]?$/g,Ge=/(\*)(0+)|(#+)(0+)|(0+)/g,ke=/^(0+)$/;function xe(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(Ue,function(e,n,r){return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""}),t}function Fe(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 $e(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 n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!ke.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Ve(e){var t=Fe(e);return t||{}}function Ke(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];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=je(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=w(w(w({},t),{notation:"scientific"}),o.options.reduce(function(e,t){return w(w({},e),Ve(t))},{}));continue;case"engineering":t=w(w(w({},t),{notation:"engineering"}),o.options.reduce(function(e,t){return w(w({},e),Ve(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(Ge,function(e,n,r,o,i,a){if(n)t.minimumIntegerDigits=r.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(ke.test(o.stem))t.minimumIntegerDigits=o.stem.length;else if(De.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(De,function(e,n,r,o,i,a){return"*"===r?t.minimumFractionDigits=n.length:o&&"#"===o[0]?t.maximumFractionDigits=o.length:i&&a?(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length+a.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""});var i=o.options[0];"w"===i?t=w(w({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=w(w({},t),xe(i)))}else if(Ue.test(o.stem))t=w(w({},t),xe(o.stem));else{var a=Fe(o.stem);a&&(t=w(w({},t),a));var s=$e(o.stem);s&&(t=w(w({},t),s))}}return t}var Xe,Ye={"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 We(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 n,r=e.language;return"root"!==r&&(n=e.maximize().region),(Ye[n||""]||Ye[r||""]||Ye["".concat(r,"-001")]||Ye["001"])[0]}var qe=new RegExp("^".concat(Me.source,"*")),ze=new RegExp("".concat(Me.source,"*$"));function Je(e,t){return{start:e,end:t}}var Ze=!!String.prototype.startsWith&&"_a".startsWith("a",1),Qe=!!String.fromCodePoint,et=!!Object.fromEntries,tt=!!String.prototype.codePointAt,nt=!!String.prototype.trimStart,rt=!!String.prototype.trimEnd,ot=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},it=!0;try{it="a"===(null===(Xe=pt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Xe?void 0:Xe[0])}catch(Yn){it=!1}var at,st=Ze?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},ct=Qe?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,r="",o=e.length,i=0;o>i;){if((n=e[i++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},lt=et?Object.fromEntries:function(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n],i=o[0],a=o[1];t[i]=a}return t},ut=tt?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var r,o=e.charCodeAt(t);return o<55296||o>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?o:r-56320+(o-55296<<10)+65536}},ht=nt?function(e){return e.trimStart()}:function(e){return e.replace(qe,"")},ft=rt?function(e){return e.trimEnd()}:function(e){return e.replace(ze,"")};function pt(e,t){return new RegExp(e,t)}if(it){var dt=pt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");at=function(e,t){var n;return dt.lastIndex=t,null!==(n=dt.exec(e)[1])&&void 0!==n?n:""}}else at=function(e,t){for(var n=[];;){var r=ut(e,t);if(void 0===r||_t(r)||bt(r))break;n.push(r),t+=r>=65536?2:1}return ct.apply(void 0,n)};var gt=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,n){for(var r=[];!this.isEOF();){var o=this.char();if(123===o){if((i=this.parseArgument(e,n)).err)return i;r.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(n)break;return this.error(He.UNMATCHED_CLOSING_TAG,Je(this.clonePosition(),this.clonePosition()))}if(60===o&&!this.ignoreTag&&yt(this.peek()||0)){if((i=this.parseTag(e,t)).err)return i;r.push(i.val)}else{var i;if((i=this.parseLiteral(e,t)).err)return i;r.push(i.val)}}else{var a=this.clonePosition();this.bump(),r.push({type:Pe.pound,location:Je(a,this.clonePosition())})}}}return{val:r,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Pe.literal,value:"<".concat(r,"/>"),location:Je(n,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()||!yt(this.char()))return this.error(He.INVALID_TAG,Je(a,this.clonePosition()));var s=this.clonePosition();return r!==this.parseTagName()?this.error(He.UNMATCHED_CLOSING_TAG,Je(s,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Pe.tag,value:r,children:i,location:Je(n,this.clonePosition())},err:null}:this.error(He.INVALID_TAG,Je(a,this.clonePosition())))}return this.error(He.UNCLOSED_TAG,Je(n,this.clonePosition()))}return this.error(He.INVALID_TAG,Je(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&mt(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var o=this.tryParseQuote(t);if(o)r+=o;else{var i=this.tryParseUnquoted(e,t);if(i)r+=i;else{var a=this.tryParseLeftAngleBracket();if(!a)break;r+=a}}}var s=Je(n,this.clonePosition());return{val:{type:Pe.literal,value:r,location:s},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(yt(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 n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(n);this.bump()}return ct.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),ct(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(He.EXPECT_ARGUMENT_CLOSING_BRACE,Je(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(He.EMPTY_ARGUMENT,Je(n,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(He.MALFORMED_ARGUMENT,Je(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(He.EXPECT_ARGUMENT_CLOSING_BRACE,Je(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Pe.argument,value:r,location:Je(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(He.EXPECT_ARGUMENT_CLOSING_BRACE,Je(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(He.MALFORMED_ARGUMENT,Je(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=at(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:Je(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var o,i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,s=this.clonePosition();switch(a){case"":return this.error(He.EXPECT_ARGUMENT_TYPE,Je(i,s));case"number":case"date":case"time":this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var l=this.clonePosition();if((m=this.parseSimpleArgStyleIfPossible()).err)return m;if(0===(p=ft(m.val)).length)return this.error(He.EXPECT_ARGUMENT_STYLE,Je(this.clonePosition(),this.clonePosition()));c={style:p,styleLocation:Je(l,this.clonePosition())}}if((_=this.tryParseArgumentClose(r)).err)return _;var u=Je(r,this.clonePosition());if(c&&st(null==c?void 0:c.style,"::",0)){var h=ht(c.style.slice(2));if("number"===a)return(m=this.parseNumberSkeletonFromString(h,c.styleLocation)).err?m:{val:{type:Pe.number,value:n,location:u,style:m.val},err:null};if(0===h.length)return this.error(He.EXPECT_DATE_TIME_SKELETON,u);var f=h;this.locale&&(f=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);if("j"===o){for(var i=0;r+1<e.length&&e.charAt(r+1)===o;)i++,r++;var a=1+(1&i),s=i<2?1:3+(i>>1),c=We(t);for("H"!=c&&"k"!=c||(s=0);s-- >0;)n+="a";for(;a-- >0;)n=c+n}else n+="J"===o?"H":o}return n}(h,this.locale));var p={type:Ie.dateTime,pattern:f,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?Re(f):{}};return{val:{type:"date"===a?Pe.date:Pe.time,value:n,location:u,style:p},err:null}}return{val:{type:"number"===a?Pe.number:"date"===a?Pe.date:Pe.time,value:n,location:u,style:null!==(o=null==c?void 0:c.style)&&void 0!==o?o:null},err:null};case"plural":case"selectordinal":case"select":var d=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(He.EXPECT_SELECT_ARGUMENT_OPTIONS,Je(d,w({},d)));this.bumpSpace();var g=this.parseIdentifierIfPossible(),y=0;if("select"!==a&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(He.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Je(this.clonePosition(),this.clonePosition()));var m;if(this.bumpSpace(),(m=this.tryParseDecimalInteger(He.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,He.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return m;this.bumpSpace(),g=this.parseIdentifierIfPossible(),y=m.val}var _,b=this.tryParsePluralOrSelectOptions(e,a,t,g);if(b.err)return b;if((_=this.tryParseArgumentClose(r)).err)return _;var E=Je(r,this.clonePosition());return"select"===a?{val:{type:Pe.select,value:n,options:lt(b.val),location:E},err:null}:{val:{type:Pe.plural,value:n,options:lt(b.val),offset:y,pluralType:"plural"===a?"cardinal":"ordinal",location:E},err:null};default:return this.error(He.INVALID_ARGUMENT_TYPE,Je(i,s))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(He.EXPECT_ARGUMENT_CLOSING_BRACE,Je(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 n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(He.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Je(n,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 n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Be).filter(function(e){return e.length>0}),n=[],r=0,o=t;r<o.length;r++){var i=o[r].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var a=i[0],s=i.slice(1),c=0,l=s;c<l.length;c++)if(0===l[c].length)throw new Error("Invalid number skeleton");n.push({stem:a,options:s})}return n}(e)}catch(e){return this.error(He.INVALID_NUMBER_SKELETON,t)}return{val:{type:Ie.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?Ke(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,r){for(var o,i=!1,a=[],s=new Set,c=r.value,l=r.location;;){if(0===c.length){var u=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var h=this.tryParseDecimalInteger(He.EXPECT_PLURAL_ARGUMENT_SELECTOR,He.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;l=Je(u,this.clonePosition()),c=this.message.slice(u.offset,this.offset())}if(s.has(c))return this.error("select"===t?He.DUPLICATE_SELECT_ARGUMENT_SELECTOR:He.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===c&&(i=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?He.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:He.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Je(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(e+1,t,n);if(p.err)return p;var d=this.tryParseArgumentClose(f);if(d.err)return d;a.push([c,{value:p.val,location:Je(f,this.clonePosition())}]),s.add(c),this.bumpSpace(),c=(o=this.parseIdentifierIfPossible()).value,l=o.location}return 0===a.length?this.error("select"===t?He.EXPECT_SELECT_ARGUMENT_SELECTOR:He.EXPECT_PLURAL_ARGUMENT_SELECTOR,Je(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(He.MISSING_OTHER_CLAUSE,Je(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-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=Je(r,this.clonePosition());return o?ot(i*=n)?{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=ut(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(st(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(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!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()&&_t(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function yt(e){return e>=97&&e<=122||e>=65&&e<=90}function mt(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 _t(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function bt(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 Et(e){e.forEach(function(e){if(delete e.location,function(e){return e.type===Pe.select}(e)||function(e){return e.type===Pe.plural}(e))for(var t in e.options)delete e.options[t].location,Et(e.options[t].value);else(function(e){return e.type===Pe.number})(e)&&function(e){return!(!e||"object"!=typeof e||e.type!==Ie.number)}(e.style)?delete e.style.location:!function(e){return e.type===Pe.date}(e)&&!function(e){return e.type===Pe.time}(e)||!function(e){return!(!e||"object"!=typeof e||e.type!==Ie.dateTime)}(e.style)?function(e){return e.type===Pe.tag}(e)&&Et(e.children):delete e.style.location})}function vt(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 Tt,Lt={};function Ct(){if(Tt)return Lt;var e,t;return Tt=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.SKELETON_TYPE=Lt.TYPE=void 0,Lt.isLiteralElement=function(t){return t.type===e.literal},Lt.isArgumentElement=function(t){return t.type===e.argument},Lt.isNumberElement=function(t){return t.type===e.number},Lt.isDateElement=function(t){return t.type===e.date},Lt.isTimeElement=function(t){return t.type===e.time},Lt.isSelectElement=function(t){return t.type===e.select},Lt.isPluralElement=function(t){return t.type===e.plural},Lt.isPoundElement=function(t){return t.type===e.pound},Lt.isTagElement=function(t){return t.type===e.tag},Lt.isNumberSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.number)},Lt.isDateTimeSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.dateTime)},Lt.createLiteralElement=function(t){return{type:e.literal,value:t}},Lt.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||(Lt.TYPE=e={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(t||(Lt.SKELETON_TYPE=t={})),Lt}var wt,At=Ct(),Ot={},St=vt(ae);var Ht=function(){if(wt)return Ot;wt=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.printAST=n,Ot.doPrintAST=r,Ot.printDateTimeSkeleton=a;var e=St,t=Ct();function n(e){return r(e,!1)}function r(s,c){var l=s.map(function(l,u){return(0,t.isLiteralElement)(l)?function(e,t,n,r){var i=e.value,a=i;n||"'"!==a[0]||(a="''".concat(a.slice(1)));r||"'"!==a[a.length-1]||(a="".concat(a.slice(0,a.length-1),"''"));return a=o(a),t?a.replace("#","'#'"):a}(l,c,0===u,u===s.length-1):(0,t.isArgumentElement)(l)?function(e){var t=e.value;return"{".concat(t,"}")}(l):(0,t.isDateElement)(l)||(0,t.isTimeElement)(l)||(0,t.isNumberElement)(l)?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(a(n)):"::".concat(n.tokens.map(i).join(" ")))):"","}");var n}(l):(0,t.isPluralElement)(l)?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,"}")}(l):(0,t.isSelectElement)(l)?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,"}")}(l):(0,t.isPoundElement)(l)?"#":(0,t.isTagElement)(l)?function(e){return"<".concat(e.value,">").concat(n(e.children),"</").concat(e.value,">")}(l):void 0});return l.join("")}function o(e){return e.replace(/([{}](?:[\s\S]*[{}])?)/,"'$1'")}function i(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 a(e){return e.pattern}return Ot}();function Pt({icuString:e,shouldVisit:t,visitor:n,options:{recurseIntoVisited:r=!0,...o}}){const i=function(e,t){void 0===t&&(t={}),t=w({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new gt(e,t).parse();if(n.err){var r=SyntaxError(He[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||Et(n.val),n.val}(e,o);return a(i),i;function a(e){e.map(s)}function s(e){let o=!1;t(e)&&(n(e),o=!0),o&&!r||(e.type===Pe.select||e.type===Pe.plural?Object.values(e.options).map(e=>e.value).map(a):e.type===Pe.tag&&a(e.children))}}const It="_gt_",Mt=new RegExp(`^${It}\\d+$`),Nt=new RegExp(`^${It}$`);function Rt(e){return e.type===At.TYPE.select&&Mt.test(e.value)&&!!e.options.other&&(0===e.options.other.value.length||e.options.other.value.length>0&&e.options.other.value[0]?.type===At.TYPE.literal)}function Bt(e){return e.type===At.TYPE.select&&Nt.test(e.value)&&!!e.options.other&&(0===e.options.other.value.length||e.options.other.value.length>0&&e.options.other.value[0]?.type===At.TYPE.literal)}function jt(e){if(!e.includes("_gt_"))return e;const t=[];Pt({icuString:e,shouldVisit:Bt,visitor:function(e){t.push({start:e.location?.start.offset??0,end:e.location?.end.offset??0,otherStart:e.options.other.location?.start.offset??0,otherEnd:e.options.other.location?.end.offset??0})},options:{recurseIntoVisited:!1,captureLocation:!0}});const n=[];let r=0;for(let o=0;o<t.length;o++){const{start:i,end:a,otherStart:s,otherEnd:c}=t[o];n.push(e.slice(r,i)),n.push(e.slice(i,i+4+1)),n.push(String(o+1)),n.push(e.slice(i+4+1,s)),n.push("{}"),n.push(e.slice(c,a)),r=a}return n.push(e.slice(r,e.length)),n.join("")}var Dt={warn(e){console.warn(e)},error(e){console.error(e)},info(e){console.info(e)},debug(e){console.debug(e)}};const Ut=e=>`String interpolation failed for message: "${e}".`;function Gt(n,r){if(!n)return n;const o=r.$_fallback,i=function(e){return Object.fromEntries(Object.entries(e).filter(([e])=>"$id"!==e&&"$context"!==e&&"$maxChars"!==e&&"$hash"!==e&&"$_hash"!==e&&"$_source"!==e&&"$_fallback"!==e&&"$format"!==e&&"$_locales"!==e&&"$locale"!==e))}(r);try{const s=function(e){if(!e.includes("_gt_"))return{};let t=1;const n={};return Pt({icuString:e,shouldVisit:Bt,visitor:function(e){n[e.value+t]=e.options.other.value.length?e.options.other.value[0]?.value:"",t+=1},options:{recurseIntoVisited:!1}}),n}(o||"");return e(function(e,n,r,o){try{return t(e,{variables:n,locales:r,dataFormat:o})}catch{return Dt.warn(Ut(e)),e}}(Object.keys(s).length?(a=n).includes("_gt_")?Ht.printAST(Pt({icuString:a,shouldVisit:Rt,visitor:function(e){e.type=At.TYPE.argument,Reflect.deleteProperty(e,"options")},options:{recurseIntoVisited:!1}})):a:n,{...i,...s,[It]:"other"},r.$locale??r.$_locales,r.$format),{maxChars:r.$maxChars})}catch{return Dt.warn(Ut(n)),null!=r.$_fallback?Gt(r.$_fallback,{...r,$_fallback:void 0}):e(n,{maxChars:r.$maxChars})}var a}function kt(e){return function(e){if(he(e),ye)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=me[e[n]];return t}(Se(function(e){if("string"!=typeof e)throw new TypeError("string expected");return new Uint8Array((new TextEncoder).encode(e))}(e))).slice(0,16)}const xt=e=>{if(e&&"object"==typeof e){const t={};if("c"in e&&e.c&&(t.c=Ft(e.c)),"d"in e){const n=e?.d;n?.b&&(t.b=Object.fromEntries(Object.entries(n.b).map(([e,t])=>[e,Ft(t)]))),n?.t&&(t.t=n.t)}return function(e){const t=e;if(t&&"object"==typeof t&&"string"==typeof t.k){const e=Object.keys(t);if(1===e.length)return!0;if(2===e.length){if("number"==typeof t.i)return!0;if("string"==typeof t.v)return!0}if(3===e.length&&"string"==typeof t.v&&"number"==typeof t.i)return!0}return!1}(e)?{k:e.k,...e.v&&{v:e.v}}:t}return e};function Ft(e){return Array.isArray(e)?e.map(xt):xt(e)}function $t(e){return e.loadTranslations?"custom":e.cacheUrl?"remote":void 0!==e.cacheUrl&&e.cacheUrl!==ce||!e.projectId?"disabled":"gt-remote"}function Vt(e){return void 0!==e.runtimeUrl&&"https://runtime2.gtx.dev"!==e.runtimeUrl||!e.projectId||!e.devApiKey&&!e.apiKey?e.runtimeUrl?"custom":"disabled":"gt"}function Kt(e){return"gt-remote"===$t(e)||"gt"===Vt(e)}function Xt(e){const t=[];return t.push(...function(e){const t=[],{projectId:n,loadTranslations:r}=e;switch($t(e)){case"remote":case"gt-remote":n||t.push({type:"warning",message:"projectId is required when loading translations from a remote store"});break;case"custom":r||t.push({type:"error",message:"loadTranslations is required when loading translations from a custom loader"})}return t}(e)),t.push(...function(e){const t=[];switch(Vt(e)){case"custom":case"gt":e.projectId||t.push({type:"warning",message:"projectId is required"}),e.devApiKey||e.apiKey||t.push({type:"warning",message:"devApiKey or apiKey is required"})}return t}(e)),t.push(...function(e){const t=[];if(!Kt(e))return t;const{defaultLocale:n,locales:r,customMapping:i}=e;return new Set([...n?[n]:[],...r||[]]).forEach(e=>{o(e,i)||t.push({type:"error",message:`Invalid locale: ${e}`})}),t}(e)),t.push(...function(e){const t=[];return e.loadDictionary&&!e.dictionary&&t.push({type:"error",message:"dictionary is required when loadDictionary is provided"}),t}(e)),t}function Yt(e){const t=function(e){const{cacheUrl:t=ce,projectId:n,_versionId:r,_branchId:o}=e;return`${t}/${n}/[locale]`+(r?`/${r}`:"")+(o?`?branchId=${o}`:"")}(e);return async n=>{n=i(n,e.customMapping);const r=t.replace("[locale]",n),o=await fetch(r);if(!o.ok)throw new Error(`Failed to load translations from ${r}`);return await o.json()}}var Wt=class{constructor(e,t){this.cache={},this.fallbackPromises={},this.cache=structuredClone(e),this.onHit=t?.onHit,this.onMiss=t?.onMiss}setCache(e,t){this.cache[e]=t}getCache(e){const t=this.genKey(e);return this.cache[t]}getInternalCache(){return this.cache}async missCache(...e){const t=e[0],n=this.genKey(t);if(void 0!==this.fallbackPromises[n])return await this.fallbackPromises[n];const r=this.fallback(...e);this.fallbackPromises[n]=r;try{const e=await r;return this.setCache(n,e),e}finally{delete this.fallbackPromises[n]}}};function qt(e,t){return null!=t.$_hash?t.$_hash:function({source:e,context:t,id:n,maxChars:r,dataFormat:o},i=kt){let a;return a="JSX"===o?Ft(e):e,i(ue({source:a,...n&&{id:n},...t&&{context:t},...null!=r&&{maxChars:Math.abs(r)},...o&&{dataFormat:o}}))}({source:"ICU"===t.$format?jt(e):e,...t?.$context&&{context:t.$context},...t?.$id&&{id:t.$id},..."$maxChars"in t&&null!=t.$maxChars&&{maxChars:Math.abs(t.$maxChars)},dataFormat:t.$format})}const zt=100,Jt=25,Zt=50;function Qt(e,t){if(void 0===e||!Number.isFinite(e))return t;const n=Math.trunc(e);return n>0?n:t}var en=class extends Wt{constructor({init:e,translateMany:t,lifecycle:n,batchConfig:r}){super(e,n),this._queue=[],this._batchTimer=null,this._activeRequests=0,this._translateMany=t,this._batchConfig=function(e){return{maxConcurrentRequests:Qt(e?.maxConcurrentRequests,zt),maxBatchSize:Qt(e?.maxBatchSize,Jt),batchInterval:(t=e?.batchInterval,n=Zt,void 0===t||!Number.isFinite(t)||t<=0?n:t)};var t,n}(r)}get(e){const t=this.getCache(e);return null!=t&&this.onHit&&this.onHit({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:t}),t}async miss(e){const t=await this.missCache(e);return null!=t&&this.onMiss&&this.onMiss({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:t}),t}genKey(e){return qt(e.message,e.options)}fallback(e){const t=this._enqueueTranslation(e);return this._queue.length>=this._batchConfig.maxBatchSize?this._flushNow():this._scheduleBatch(),t}_flushNow(){this._batchTimer&&(clearTimeout(this._batchTimer),this._batchTimer=null),this._drainQueue()}_scheduleBatch(){this._batchTimer||(this._batchTimer=setTimeout(()=>{this._batchTimer=null,this._drainQueue()},this._batchConfig.batchInterval))}_drainQueue(){for(;this._queue.length>0&&this._activeRequests<this._batchConfig.maxConcurrentRequests;){const e=this._queue.splice(0,this._batchConfig.maxBatchSize);this._sendBatchRequest(e)}this._queue.length>0&&this._scheduleBatch()}_enqueueTranslation(e){const t=this.genKey(e),n=e.options;return new Promise((r,o)=>{this._queue.push({key:t,source:e.message,metadata:{hash:t,...n?.$context&&{context:n.$context},...n?.$id&&{id:n.$id},..."$maxChars"in n&&null!=n.$maxChars&&{maxChars:Math.abs(n.$maxChars)},dataFormat:n.$format},resolve:e=>r(e),reject:o})})}async _sendBatchRequest(e){this._activeRequests++;const t=function(e){return e.reduce((e,t)=>(e[t.key]={source:t.source,metadata:t.metadata},e),{})}(e),n=await this._sendBatchRequestWithErrorHandling(e,t);n&&this._handleTranslationResponse(e,n),this._activeRequests--}async _sendBatchRequestWithErrorHandling(e,t){try{return await this._translateMany(t)}catch(t){for(const n of e)n.reject(t);return}}_handleTranslationResponse(e,t){for(const n of e){const{key:e}=n,r=t[e];if(r&&r.success){const t=r.translation;this.setCache(e,t),n.resolve(t)}else n.reject(r?.error)}}};var tn=class extends Wt{constructor({init:e={},ttl:t,batchConfig:n,loadTranslations:r,createTranslateMany:o,lifecycle:{onLocalesCacheHit:i,onLocalesCacheMiss:a,onTranslationsCacheHit:s,onTranslationsCacheMiss:c}}){super(e,{onHit:i,onMiss:a}),this.ttl=6e4,this.ttl=null===t?-1:t??6e4,this._translationLoader=r,this._createTranslateMany=o,this._batchConfig=n,this._onTranslationsCacheHit=s,this._onTranslationsCacheMiss=c}get(e){const t=this.getCache(e);if(!t||t.expiresAt>0&&t.expiresAt<Date.now())return;const n=t.translationsCache;return null!=n&&this.onHit&&this.onHit({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:n}),n}async miss(e){const t=await this.missCache(e),n=t.translationsCache;return null!=n&&this.onMiss&&this.onMiss({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:n}),n}genKey(e){return e}async fallback(e){const t=this._translationLoader(e),n=this.ttl<0?this.ttl:Date.now()+this.ttl;return{translationsCache:new en({init:await t,lifecycle:this._createTranslationsCacheLifecycle(e),translateMany:this._createTranslateMany(e),batchConfig:this._batchConfig}),expiresAt:n}}_createTranslationsCacheLifecycle(e){return{onHit:this._onTranslationsCacheHit?t=>this._onTranslationsCacheHit({locale:e,...t}):void 0,onMiss:this._onTranslationsCacheMiss?t=>this._onTranslationsCacheMiss({locale:e,...t}):void 0}}};function nn(e){return e?e.split("."):[]}function rn(e){return"object"==typeof e&&null!=e&&!Array.isArray(e)}function on(e){if(function(e){return"string"==typeof e||!(!Array.isArray(e)||"string"!=typeof e[0])&&(1===e.length||2===e.length&&function(e){if("object"!=typeof e||null==e||Array.isArray(e))return!1;const t=e;return(void 0===t.$context||"string"==typeof t.$context)&&(void 0===t.$format||sn(t.$format))&&(void 0===t.$maxChars||"number"==typeof t.$maxChars)&&(void 0===t.context||"string"==typeof t.context)}(e[1]))}(e))return{entry:Array.isArray(e)?e[0]:e,options:Array.isArray(e)?e[1]??{}:{}}}function an(e){return 0===Object.keys(e.options).length?e.entry:[e.entry,e.options]}function sn(e){return"ICU"===e||"I18NEXT"===e||"STRING"===e}var cn=class extends Error{constructor(e){super(`I18nManager: source dictionary entry ${e} is not defined`),this.name="DictionarySourceNotFoundError"}},ln=class extends Wt{constructor({init:e,lifecycle:t,runtimeTranslate:n}){super(e,t),this._runtimeTranslate=n,this.onHitObj=t?.onHitObj,this.onMissObj=t?.onMissObj}get(e){const t=this.getCache(e),n=on(t);if(void 0!==n)return this.onHit&&this.onHit({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:n}),n}set(e,t){const n=an(t);this.setCache(this.genKey(e),n)}getObj(e){const t=this.getCache(e);if(void 0===t)return;const n=structuredClone(t);return this.onHitObj&&this.onHitObj({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:n}),n}setObj(e,t){this.setCache(this.genKey(e),structuredClone(t))}async missObj(e,t){const n=on(t);if(void 0!==n)return an(await this.miss(e,n));if(!rn(t))throw new cn(e);const r=await Promise.all(Object.entries(t).map(async([t,n])=>{const r=e?`${e}.${t}`:t;return[t,await this.missObj(r,n)]})),o=Object.fromEntries(r);return this.setObj(e,o),o}async miss(e,t){const n=await this.missCache(e,t),r=on(n);if(void 0===r)throw new Error("DictionaryCache missCache did not return a DictionaryEntry");return this.onMiss&&this.onMiss({inputKey:e,cacheKey:this.genKey(e),cacheValue:n,outputValue:r}),r}setCache(e,t){const n=this.getInternalCache(),r=nn(e);if(0===r.length)return void(rn(t)&&function(e,t){for(const t of Object.keys(e))delete e[t];Object.assign(e,t)}(n,t));let o=n;for(const e of r.slice(0,-1)){rn(o[e])||(o[e]={}),o=o[e]}o[r[r.length-1]]=t}getCache(e){const t=nn(this.genKey(e));let n=this.getInternalCache();if(0===t.length)return n;for(const e of t){if(!rn(n))return;n=n[e]}return n}genKey(e){return e}fallback(e,t){return this._runtimeTranslate(e,t)}},un=class extends Wt{constructor({ttl:e,defaultLocale:t,dictionary:n={},loadDictionary:r,runtimeTranslate:o,lifecycle:{onLocalesDictionaryCacheHit:i,onLocalesDictionaryCacheMiss:a,onDictionaryCacheHit:s,onDictionaryCacheMiss:c,onDictionaryObjectCacheHit:l}}){super({},{onHit:i,onMiss:a}),this.ttl=6e4,this.ttl=null===e?-1:e??6e4,this._dictionaryLoader=r,this._runtimeTranslate=o,this._onDictionaryCacheHit=s,this._onDictionaryCacheMiss=c,this._onDictionaryObjectCacheHit=l,this.setCache(t,{dictionaryCache:new ln({init:n,runtimeTranslate:this._createDictionaryRuntimeTranslate(t),lifecycle:this._createDictionaryCacheLifecycle(t)}),expiresAt:-1})}get(e){const t=this.getCache(e);if(!t||t.expiresAt>0&&t.expiresAt<Date.now())return;const n=t.dictionaryCache;return null!=n&&this.onHit&&this.onHit({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:n}),n}async miss(e){const t=await this.missCache(e),n=t.dictionaryCache;return null!=n&&this.onMiss&&this.onMiss({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:n}),n}genKey(e){return e}async fallback(e){const t=this._dictionaryLoader(e),n=this.ttl<0?this.ttl:Date.now()+this.ttl;return{dictionaryCache:new ln({init:await t,runtimeTranslate:this._createDictionaryRuntimeTranslate(e),lifecycle:this._createDictionaryCacheLifecycle(e)}),expiresAt:n}}_createDictionaryCacheLifecycle(e){return{onHit:this._onDictionaryCacheHit?t=>this._onDictionaryCacheHit({locale:e,...t}):void 0,onMiss:this._onDictionaryCacheMiss?t=>this._onDictionaryCacheMiss({locale:e,...t}):void 0,onHitObj:this._onDictionaryObjectCacheHit?t=>this._onDictionaryObjectCacheHit({locale:e,...t}):void 0}}_createDictionaryRuntimeTranslate(e){return(t,n)=>this._runtimeTranslate(e,t,n)}};const hn="locales-cache-miss",fn="translations-cache-miss",pn="locales-dictionary-cache-miss",dn="dictionary-cache-miss";var gn=class{constructor(){this.listeners={}}getOrCreateListeners(e){return this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e]}subscribe(e,t){const n=this.getOrCreateListeners(e);return n.add(t),()=>{n.delete(t)}}emit(e,t){this.listeners[e]?.forEach(e=>e(t))}};var yn=class extends gn{constructor(e){super(),this.resolveTranslationSync=(e,t,n)=>this.lookupTranslation(e,t,n),function(e,t="",n=!0){if(e.forEach(e=>{switch(e.type){case"error":Dt.error(t+e.message);break;case"warning":Dt.warn(t+e.message)}}),n&&e.some(e=>"error"===e.type))throw new Error("Validation errors occurred")}(Xt(e),"I18nManager: "),this.config=function(e){const t=Kt(e),n=function({defaultLocale:e,locales:t,customMapping:n}){return{defaultLocale:e,locales:Array.from(new Set([e,...t])),customMapping:n||{}}}({defaultLocale:e.defaultLocale||se,locales:e.locales||[se],customMapping:e.customMapping});return{environment:e.environment||"production",enableI18n:void 0===e.enableI18n||e.enableI18n,projectId:e.projectId,devApiKey:e.devApiKey,apiKey:e.apiKey,runtimeUrl:e.runtimeUrl,cacheExpiryTime:e.cacheExpiryTime,batchConfig:e.batchConfig,runtimeTranslation:e.runtimeTranslation,_versionId:e._versionId,...t?mn(n):n}}(e),this.localeConfig=new n({defaultLocale:this.config.defaultLocale,locales:this.config.locales,customMapping:this.config.customMapping});const t=function(e){return function({type:e,remoteTranslationLoaderParams:t,loadTranslations:n}){"disabled"===e&&Dt.warn("I18nManager: No translation loader found. No translations will be loaded.");const{cacheUrl:r,projectId:o,_versionId:i,_branchId:a,customMapping:s}=t;switch(e){case"remote":case"gt-remote":return Yt({cacheUrl:r,projectId:o||"",_versionId:i,_branchId:a,customMapping:s});case"custom":return n;case"disabled":return async e=>({})}}({loadTranslations:e.loadTranslations,type:$t(e),remoteTranslationLoaderParams:{cacheUrl:e.cacheUrl,projectId:e.projectId,_versionId:e._versionId,_branchId:e._branchId,customMapping:e.customMapping}})}(e),r=function(e){return e.loadDictionary??(()=>Promise.resolve({}))}(e),o=this.config.runtimeTranslation?.timeout??12e3,i=this.config.runtimeTranslation?.metadata??{},a=function(e,t,n={}){return r=>o=>e.translateMany(o,{...n,targetLocale:r},t)}(this.getGTClassClean(),o,i);!function({onLocalesCacheHit:e,onLocalesCacheMiss:t,onTranslationsCacheHit:n,onTranslationsCacheMiss:r,onLocalesDictionaryCacheHit:o,onLocalesDictionaryCacheMiss:i,onDictionaryCacheHit:a,onDictionaryCacheMiss:s,onDictionaryObjectCacheHit:c},l){e&&l("locales-cache-hit",t=>{e({...t,value:t.translations})}),t&&l(hn,e=>{t({...e,value:e.translations})}),n&&l("translations-cache-hit",e=>{n({...e,value:e.translation})}),r&&l(fn,e=>{r({...e,value:e.translation})}),o&&l("locales-dictionary-cache-hit",e=>{o(e)}),i&&l(pn,e=>{i(e)}),a&&l("dictionary-cache-hit",e=>{a(e)}),s&&l(dn,e=>{s(e)}),c&&l("dictionary-object-cache-hit",e=>{c(e)})}(e.lifecycle??{},(...e)=>this.subscribe(...e));const s=(c=(...e)=>this.emit(...e),{onLocalesCacheHit:e=>{c("locales-cache-hit",{locale:e.inputKey,translations:e.outputValue.getInternalCache()})},onLocalesCacheMiss:e=>{c(hn,{locale:e.inputKey,translations:e.outputValue.getInternalCache()})},onTranslationsCacheHit:e=>{c("translations-cache-hit",{locale:e.locale,hash:e.cacheKey,translation:e.outputValue})},onTranslationsCacheMiss:e=>{c(fn,{locale:e.locale,hash:e.cacheKey,translation:e.outputValue})},onLocalesDictionaryCacheHit:e=>{c("locales-dictionary-cache-hit",{locale:e.inputKey,dictionary:e.outputValue.getInternalCache()})},onLocalesDictionaryCacheMiss:e=>{c(pn,{locale:e.inputKey,dictionary:e.outputValue.getInternalCache()})},onDictionaryCacheHit:e=>{c("dictionary-cache-hit",{locale:e.locale,id:e.cacheKey,dictionaryEntry:e.outputValue})},onDictionaryCacheMiss:e=>{c(dn,{locale:e.locale,id:e.cacheKey,dictionaryEntry:e.outputValue})},onDictionaryObjectCacheHit:e=>{c("dictionary-object-cache-hit",{locale:e.locale,id:e.cacheKey,dictionaryValue:e.outputValue})}});var c;this.localesCache=new tn({loadTranslations:t,createTranslateMany:a,lifecycle:s,ttl:this.config.cacheExpiryTime,batchConfig:this.config.batchConfig}),this.localesDictionaryCache=new un({defaultLocale:this.config.defaultLocale,dictionary:e.dictionary,loadDictionary:r,runtimeTranslate:(e,t,n)=>this.dictionaryRuntimeTranslate(e,t,n),ttl:this.config.cacheExpiryTime,lifecycle:s})}subscribeToTranslationsCacheMiss(e,t,n){return this.subscribe(fn,r=>{r.locale===t&&r.hash===n&&e(r)})}getDefaultLocale(){return this.config.defaultLocale}getLocales(){return this.config.locales}getCustomMapping(){return this.config.customMapping}getVersionId(){return this.config._versionId}getGTClass(e){return this.getGTClassClean(e?this.resolveLocale(e):void 0)}isTranslationEnabled(){return this.config.enableI18n}getTranslationLoader(){return e=>this.loadTranslations(e)}async loadTranslations(e){try{const t=this.resolveCacheLocale(e);if(!t)return{};let n=this.localesCache.get(t);return n||(n=await this.localesCache.miss(t)),n.getInternalCache()}catch(e){return this.handleError(e),{}}}async loadDictionary(e){try{const t=this.resolveCacheLocale(e);if(!t)return this.localesDictionaryCache.get(this.config.defaultLocale)?.getInternalCache()??{};let n=this.localesDictionaryCache.get(t);return n||(n=await this.localesDictionaryCache.miss(t)),n.getInternalCache()}catch(e){return this.handleError(e),{}}}lookupDictionary(e,t){try{const n=this.resolveCacheLocale(e)??this.config.defaultLocale;return this.localesDictionaryCache.get(n)?.get(t)}catch(e){return void this.handleError(e)}}lookupDictionaryObj(e,t){try{const n=this.resolveCacheLocale(e)??this.config.defaultLocale;return this.localesDictionaryCache.get(n)?.getObj(t)}catch(e){return void this.handleError(e)}}async lookupDictionaryWithFallback(e,t){try{const n=this.resolveCacheLocale(e);if(!n){const e=this.localesDictionaryCache.get(this.config.defaultLocale)?.get(t);if(void 0===e)throw new cn(t);return e}let r=this.localesDictionaryCache.get(n);r||(r=await this.localesDictionaryCache.miss(n));let o=r.get(t);if(void 0===o){const e=this.localesDictionaryCache.get(this.config.defaultLocale)?.get(t);if(void 0===e)throw new cn(t);o=await r.miss(t,e)}return o}catch(e){return void this.handleError(e)}}async lookupDictionaryObjWithFallback(e,t){try{const n=this.resolveCacheLocale(e);if(!n){const e=this.localesDictionaryCache.get(this.config.defaultLocale)?.getObj(t);if(void 0===e)throw new cn(t);return e}let r=this.localesDictionaryCache.get(n);r||(r=await this.localesDictionaryCache.miss(n));let o=r.getObj(t);if(void 0===o){const e=this.localesDictionaryCache.get(this.config.defaultLocale)?.getObj(t);if(void 0===e)throw new cn(t);o=await r.missObj(t,e)}return o}catch(e){return void this.handleError(e)}}lookupTranslation(e,t,n){try{const{translationLocale:r,options:o}=this.resolveLookupParams(e,n);if(!r)return t;const i=this.localesCache.get(r);if(!i)return;return i.get({message:t,options:o})}catch(e){return void this.handleError(e)}}async lookupTranslationWithFallback(e,t,n){try{return await this.lookupTranslationWithFallbackResolved(e,t,n)}catch(e){return void this.handleError(e)}}async getLookupTranslation(e,t=[]){try{const n=this.resolveCacheLocale(e);if(!n)return e=>e;const r=function(e,t,n){return e.flatMap(e=>{const r=e.options.$locale;if(null==r)return[e];try{const o=n(r);return o!==t?[]:[{message:e.message,options:{...e.options,$locale:o}}]}catch{return[]}})}(t,n,e=>this.resolveCacheLocale(e)??this.resolveLocale(e));r.length!==t.length&&Dt.warn(`I18nManager: getLookupTranslation(): prefetchEntries must all be the same locale, ignoring all entries that are not for ${n}`);let o=this.localesCache.get(n);return o||(o=await this.localesCache.miss(n)),o?(await Promise.all(r.filter(e=>null==o.get(e)).map(e=>o.miss(e))),(e,t={})=>o.get({message:e,options:this.resolveLookupOptions(t)})):()=>{}}catch(e){return this.handleError(e),e=>e}}async getTranslations(e){try{return this.loadTranslations(e)}catch(e){return this.handleError(e),{}}}async getTranslationResolver(e){return this.getLookupTranslation(e)}requiresTranslation(e){const t=this.getDefaultLocale(),n=this.getLocales();return this.isTranslationEnabled()&&this.localeConfig.requiresTranslation(e,t,n)}requiresDialectTranslation(e){const t=this.getDefaultLocale();return this.requiresTranslation(e)&&this.localeConfig.isSameLanguage(t,e)}handleError(e){if(e instanceof cn)throw e;if("development"===this.config.environment)throw e;Dt.error("I18nManager: "+e)}resolveLocale(e){const t=this.localeConfig.determineLocale(e);if(!this.localeConfig.isValidLocale(e)||!t)throw new Error(`I18nManager: validateLocale(): locale ${e} is not valid`);return t}resolveCacheLocale(e){const t=this.resolveLocale(e);if(this.requiresTranslation(t))return t;const n=this.localeConfig.resolveAliasLocale(r(e));return this.requiresTranslation(n)?n:void 0}resolveLookupParams(e,t){const n=this.resolveCacheLocale(e);return{translationLocale:n,options:n?this.resolveLookupOptions(t,n):t}}resolveLookupOptions(e={},t){return e.$locale?{...e,$locale:t??this.resolveCacheLocale(e.$locale)??this.resolveLocale(e.$locale)}:e}async lookupTranslationWithFallbackResolved(e,t,n){const{translationLocale:r,options:o}=this.resolveLookupParams(e,n);if(!r)return t;let i=this.localesCache.get(r);i||(i=await this.localesCache.miss(r));let a=i.get({message:t,options:o});return null==a&&(a=await i.miss({message:t,options:o})),a}async dictionaryRuntimeTranslate(e,t,n){const r=await this.lookupTranslationWithFallbackResolved(e,n.entry,function(e){const{$format:t,...n}=e;return{...n,$format:sn(t)?t:"ICU",...void 0===n.$context&&"string"==typeof n.context&&{$context:n.context}}}(n.options));if("string"!=typeof r)throw new Error(`I18nManager: dictionaryRuntimeTranslate(): unable to translate dictionary entry ${t}`);return r}getGTClassClean(e){return new a({sourceLocale:this.config.defaultLocale,targetLocale:e,locales:Array.from(new Set(this.config.locales.map(e=>this.localeConfig.resolveCanonicalLocale(e)))),customMapping:this.config.customMapping,projectId:this.config.projectId,baseUrl:this.config.runtimeUrl||void 0,apiKey:this.config.apiKey,devApiKey:this.config.devApiKey})}};function mn(e){return{defaultLocale:r(e.defaultLocale),locales:e.locales.map(t=>("string"==typeof e.customMapping?.[t]?e.customMapping?.[t]:e.customMapping?.[t]?.code)?t:r(t)),customMapping:Object.fromEntries(Object.entries(e.customMapping||{}).map(([e,t])=>[e,"string"==typeof t?r(t):{...t,...t.code?{code:r(t.code)}:{}}]))}}let _n,bn=se;const En={getLocale:()=>bn};let vn=En;function Tn(){return _n||(Dt.warn("getI18nManager(): Translation failed because I18nManager not initialized."),_n=new yn({defaultLocale:se,locales:[se]})),_n}function Ln(){return vn.getLocale()}function Cn(e){vn=e}function wn(e){_n=e,bn=e.getDefaultLocale(),vn=En}function An({source:e,target:t,options:n,sourceLocale:r}){return null!=t?On(t,{$_fallback:e,...n}):On(e,function(e,t){return t?{...e,$locale:t}:e}(n,r))}function On(t,n){switch(n.$format??"STRING"){case"ICU":return Gt(t,n);case"I18NEXT":case"STRING":return function(t,n){return e(t,{locales:n.$locale??n.$_locales,maxChars:n.$maxChars})}(t,n);default:return t}}async function Sn(e,t,n={}){const r=Tn(),o=Hn(e,n,"JSX");return await r.lookupTranslationWithFallback(o.$locale,t,o)??t}function Hn(e,t,n){return{...t,$format:t.$format??n,$locale:e}}function Pn(){return Ln()}function In(){return Tn().getLocales()}function Mn(){return Tn().getDefaultLocale()}function Nn(){return Tn().getVersionId()}async function Rn(e,t={}){return async function(e,t,n={}){const r=Tn(),o=Hn(e,n,"STRING");return An({source:t,target:await r.lookupTranslationWithFallback(o.$locale,t,o),options:o,sourceLocale:r.getDefaultLocale()})}(t.$locale??Ln(),e,{$format:"STRING",...t})}function Bn(e,t,n={}){return function(e,t,n={}){const r=Tn(),o=Hn(e,n,"STRING"),i=r.lookupTranslation(o.$locale,t,o);if(null!=i)return An({source:t,target:i,options:o,sourceLocale:r.getDefaultLocale()})}(e,t,{$format:"ICU",...n})}function jn(e,t,n={}){return function(e,t,n={}){const r=Tn(),o=Hn(e,n,"STRING");return An({source:t,target:r.lookupTranslation(o.$locale,t,o),options:o,sourceLocale:r.getDefaultLocale()})}(e,t,{$format:"ICU",...n})}function Dn({defaultLocale:e,locales:t,customMapping:n}={}){const r=e||se;return{defaultLocale:r,locales:t?.length?t:[r],customMapping:n}}function Un(e,t={}){return Gn(e,Dn(t))}function Gn(e,t){if(!(null==e||Array.isArray(e)&&0===e.length))return new n(t).determineLocale(e)||void 0}function kn(e,t={}){const n=Dn(t);return Gn(e,n)||n.defaultLocale}const xn="en",Fn="DEFAULT_TERMINATOR_KEY",$n={ellipsis:{fr:{terminator:"…",separator:" "},zh:{terminator:"……",separator:void 0},ja:{terminator:"……",separator:void 0},[Fn]:{terminator:"…",separator:void 0}},none:{[Fn]:{terminator:void 0,separator:void 0}}},Vn={Collator:Intl.Collator,DateTimeFormat:Intl.DateTimeFormat,DisplayNames:Intl.DisplayNames,ListFormat:Intl.ListFormat,Locale:Intl.Locale,NumberFormat:Intl.NumberFormat,PluralRules:Intl.PluralRules,RelativeTimeFormat:Intl.RelativeTimeFormat,Segmenter:Intl.Segmenter,CutoffFormat:class{constructor(e,t={}){try{const t=e?Array.isArray(e)?e.map(e=>String(e)):[String(e)]:["en"],n=Intl.getCanonicalLocales(t);this.locale=n.length?n[0]:"en"}catch{this.locale="en"}if(!$n[t.style??"ellipsis"])throw new Error((e=>`generaltranslation Formatting Error: Invalid cutoff style: ${e}.`)(t.style??"ellipsis"));let n,r;if(void 0!==t.maxChars){n=t.style??"ellipsis";const e=new Intl.Locale(this.locale).language;r=$n[n][e]||$n[n].DEFAULT_TERMINATOR_KEY}let o=t.terminator??r?.terminator,i=null!=o?t.separator??r?.separator:void 0;this.additionLength=(o?.length??0)+(i?.length??0),void 0!==t.maxChars&&Math.abs(t.maxChars)<this.additionLength&&(o=void 0,i=void 0),this.options={maxChars:t.maxChars,style:n,terminator:o,separator:i}}format(e){return this.formatToParts(e).join("")}formatToParts(e){const{maxChars:t,terminator:n,separator:r}=this.options,o=void 0===t||Math.abs(t)>=e.length?t:t>=0?Math.max(0,t-this.additionLength):Math.min(0,t+this.additionLength),i=void 0!==o&&o>-1?e.slice(0,o):e.slice(o);return null==t||null==o||0===o||null==n||e.length<=Math.abs(t)?[i]:o>0?null!=r?[i,r,n]:[i,n]:null!=r?[n,r,i]:[n,i]}resolvedOptions(){return this.options}}},Kn=new class{constructor(){this.cache={}}_generateKey(e,t={}){return`${e?Array.isArray(e)?e.map(e=>String(e)).join(","):String(e):"undefined"}:${t?JSON.stringify(t,Object.keys(t).sort()):"{}"}`}get(e,...t){const[n="en",r={}]=t,o=this._generateKey(n,r);let i=this.cache[e]?.[o];return void 0===i&&(i=new Vn[e](...t),this.cache[e]||(this.cache[e]={}),this.cache[e][o]=i),i}};function Xn(e){const t=e;if(t&&"object"==typeof t&&"string"==typeof t.k){const e=Object.keys(t);if(1===e.length)return!0;if(2===e.length){if("number"==typeof t.i)return!0;if("string"==typeof t.v)return!0}if(3===e.length&&"string"==typeof t.v&&"number"==typeof t.i)return!0}return!1}function Yn(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 i=e?.length;if(!r||void 0!==t){const t=(n&&`"${n}" `)+"expected Uint8Array, got "+(r?`length=${i}`:"type="+typeof e);if(!r)throw new TypeError(t);throw new RangeError(t)}return e}function Wn(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 qn(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function zn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Jn(e,t){return e<<32-t|e>>>t}"function"==typeof Uint8Array.from([]).toHex&&Uint8Array.fromHex,Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Zn(e,t,n){return e&t^~e&n}function Qn(e,t,n){return e&t^e&n^t&n}class er{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=zn(this.buffer)}update(e){Wn(this),Yn(e);const{view:t,buffer:n,blockLen:r}=this,o=e.length;for(let i=0;i<o;){const a=Math.min(r-this.pos,o-i);if(a===r){const t=zn(e);for(;r<=o-i;i+=r)this.process(t,i);continue}n.set(e.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Wn(this),function(e,t){Yn(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:i}=this;t[i++]=128,qn(this.buffer.subarray(i)),this.padOffset>r-i&&(this.process(n,0),i=0);for(let e=i;e<r;e++)t[e]=0;n.setBigUint64(r-8,BigInt(8*this.length),o),this.process(n,0);const a=zn(e),s=this.outputLen;if(s%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=s/4,l=this.get();if(c>l.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)a.setUint32(4*e,l[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:i,pos:a}=this;return e.destroyed=i,e.finished=o,e.length=r,e.pos=a,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const tr=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),nr=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]),rr=new Uint32Array(64);class or extends er{constructor(e){super(64,e,8,!1)}get(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:a,H:s}=this;return[e,t,n,r,o,i,a,s]}set(e,t,n,r,o,i,a,s){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|i,this.G=0|a,this.H=0|s}process(e,t){for(let n=0;n<16;n++,t+=4)rr[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=rr[e-15],n=rr[e-2],r=Jn(t,7)^Jn(t,18)^t>>>3,o=Jn(n,17)^Jn(n,19)^n>>>10;rr[e]=o+rr[e-7]+r+rr[e-16]|0}let{A:n,B:r,C:o,D:i,E:a,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){const t=l+(Jn(a,6)^Jn(a,11)^Jn(a,25))+Zn(a,s,c)+nr[e]+rr[e]|0,u=(Jn(n,2)^Jn(n,13)^Jn(n,22))+Qn(n,r,o)|0;l=c,c=s,s=a,a=i+t|0,i=o,o=r,r=n,n=t+u|0}n=n+this.A|0,r=r+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,l=l+this.H|0,this.set(n,r,o,i,a,s,c,l)}roundClean(){qn(rr)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),qn(this.buffer)}}class ir extends or{A=0|tr[0];B=0|tr[1];C=0|tr[2];D=0|tr[3];E=0|tr[4];F=0|tr[5];G=0|tr[6];H=0|tr[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 ir,(e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])}))(1));var ar=function(e,t){return ar=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])},ar(e,t)};function sr(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}ar(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var cr=function(){return cr=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},cr.apply(this,arguments)};function lr(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 ur(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function hr(e,t){return function(n,r){t(n,r,e)}}function fr(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=r.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?r.static?e:e.prototype:null,h=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var d={};for(var g in r)d[g]="access"===g?{}:r[g];for(var g in r.access)d.access[g]=r.access[g];d.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var y=(0,n[p])("accessor"===c?{get:h.get,set:h.set}:h[l],d);if("accessor"===c){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=a(y.get))&&(h.get=s),(s=a(y.set))&&(h.set=s),(s=a(y.init))&&o.unshift(s)}else(s=a(y))&&("field"===c?o.unshift(s):h[l]=s)}u&&Object.defineProperty(u,r.name,h),f=!0}function pr(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 dr(e){return"symbol"==typeof e?e:"".concat(e)}function gr(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 yr(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function mr(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function _r(e,t){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=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++,r=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],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var br=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 Er(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||br(t,e,n)}function vr(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 Tr(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Lr(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Tr(arguments[t]));return e}function Cr(){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 i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function wr(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;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 Ar(e){return this instanceof Ar?(this.v=e,this):new Ar(e)}function Or(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r=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,l)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||s(e,t)})},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=o[e](t)).value instanceof Ar?Promise.resolve(n.value.v).then(c,l):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function Sr(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:Ar(e[r](t)),done:!1}:o?o(t):t}:o}}function Hr(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=vr(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 Pr(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Ir=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},Mr=function(e){return Mr=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},Mr(e)};function Nr(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=Mr(e),r=0;r<n.length;r++)"default"!==n[r]&&br(t,e,n[r]);return Ir(t,e),t}function Rr(e){return e&&e.__esModule?e:{default:e}}function Br(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 jr(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 Dr(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 Ur(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 Gr="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 kr(e){function t(t){e.error=e.hasError?new Gr(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 i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).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 xr(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,n,r,o,i){return n?t?".jsx":".js":!r||o&&i?r+o+"."+i.toLowerCase()+"js":e}):e}var Fr,$r,Vr,Kr,Xr={__extends:sr,__assign:cr,__rest:lr,__decorate:ur,__param:hr,__esDecorate:fr,__runInitializers:pr,__propKey:dr,__setFunctionName:gr,__metadata:yr,__awaiter:mr,__generator:_r,__createBinding:br,__exportStar:Er,__values:vr,__read:Tr,__spread:Lr,__spreadArrays:Cr,__spreadArray:wr,__await:Ar,__asyncGenerator:Or,__asyncDelegator:Sr,__asyncValues:Hr,__makeTemplateObject:Pr,__importStar:Nr,__importDefault:Rr,__classPrivateFieldGet:Br,__classPrivateFieldSet:jr,__classPrivateFieldIn:Dr,__addDisposableResource:Ur,__disposeResources:kr,__rewriteRelativeImportExtension:xr},Yr=Object.freeze({__proto__:null,__addDisposableResource:Ur,get __assign(){return cr},__asyncDelegator:Sr,__asyncGenerator:Or,__asyncValues:Hr,__await:Ar,__awaiter:mr,__classPrivateFieldGet:Br,__classPrivateFieldIn:Dr,__classPrivateFieldSet:jr,__createBinding:br,__decorate:ur,__disposeResources:kr,__esDecorate:fr,__exportStar:Er,__extends:sr,__generator:_r,__importDefault:Rr,__importStar:Nr,__makeTemplateObject:Pr,__metadata:yr,__param:hr,__propKey:dr,__read:Tr,__rest:lr,__rewriteRelativeImportExtension:xr,__runInitializers:pr,__setFunctionName:gr,__spread:Lr,__spreadArray:wr,__spreadArrays:Cr,__values:vr,default:Xr});!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"}(Fr||(Fr={})),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"}($r||($r={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(Vr||(Vr={}));try{"a"===(null===(Kr=function(e,t){return new RegExp(e,t)}("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Kr?void 0:Kr[0])}catch(Fo){0}var Wr,qr,zr={};function Jr(){return Wr||(Wr=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.SKELETON_TYPE=zr.TYPE=void 0,zr.isLiteralElement=function(t){return t.type===e.literal},zr.isArgumentElement=function(t){return t.type===e.argument},zr.isNumberElement=function(t){return t.type===e.number},zr.isDateElement=function(t){return t.type===e.date},zr.isTimeElement=function(t){return t.type===e.time},zr.isSelectElement=function(t){return t.type===e.select},zr.isPluralElement=function(t){return t.type===e.plural},zr.isPoundElement=function(t){return t.type===e.pound},zr.isTagElement=function(t){return t.type===e.tag},zr.isNumberSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.number)},zr.isDateTimeSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.dateTime)},zr.createLiteralElement=function(t){return{type:e.literal,value:t}},zr.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||(zr.TYPE=e={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(t||(zr.SKELETON_TYPE=t={}))),zr;var e,t}Jr();var Zr={},Qr=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}(Yr);!function(){if(qr)return Zr;qr=1,Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.printAST=n,Zr.doPrintAST=r,Zr.printDateTimeSkeleton=a;var e=Qr,t=Jr();function n(e){return r(e,!1)}function r(s,c){var l=s.map(function(l,u){return(0,t.isLiteralElement)(l)?function(e,t,n,r){var i=e.value;return n||"'"!==i[0]||(i="''".concat(i.slice(1))),r||"'"!==i[i.length-1]||(i="".concat(i.slice(0,i.length-1),"''")),i=o(i),t?i.replace("#","'#'"):i}(l,c,0===u,u===s.length-1):(0,t.isArgumentElement)(l)?function(e){var t=e.value;return"{".concat(t,"}")}(l):(0,t.isDateElement)(l)||(0,t.isTimeElement)(l)||(0,t.isNumberElement)(l)?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(a(n)):"::".concat(n.tokens.map(i).join(" "))):"","}");var n}(l):(0,t.isPluralElement)(l)?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,"}")}(l):(0,t.isSelectElement)(l)?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,"}")}(l):(0,t.isPoundElement)(l)?"#":(0,t.isTagElement)(l)?function(e){return"<".concat(e.value,">").concat(n(e.children),"</").concat(e.value,">")}(l):void 0});return l.join("")}function o(e){return e.replace(/([{}](?:[\s\S]*[{}])?)/,"'$1'")}function i(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 a(e){return e.pattern}}();const eo=["singular","plural","dual","zero","one","two","few","many","other"];function to(e){return eo.includes(e)}const no={variable:"v",number:"n",datetime:"d",currency:"c","relative-time":"rt"};function ro(e){return no[e]}function oo(e,t=0){let n=t;function r(e){return u(e)?function(e){const{props:t}=e,r=(e=>{const{type:t,props:r}=e;n+=1;const o={id:n,injectionType:"manual"};let i;try{i="function"==typeof t&&t._gtt||""}catch{}if(i){const e=i.split("-");if("automatic"!==e[1]&&"automatic"!==e[2]||(o.injectionType="automatic"),"translate"===e[0]&&(e[0]="fragment"),"variable"===e[0]&&(o.variableType=e?.[1]||"variable"),"plural"===e[0]){const e=Object.entries(r).reduce((e,[t,r])=>(to(t)&&(e[t]=oo(r,n)),e),{});Object.keys(e).length&&(o.branches=e)}if("branch"===e[0]){const{children:e,branch:t,...i}=r,a=Object.fromEntries(Object.entries(i).filter(([e])=>!e.startsWith("data-"))),s=Object.entries(a).reduce((e,[t,r])=>(e[t]=oo(r,n),e),{});Object.keys(s).length&&(o.branches=s)}o.transformation=e[0]}return o})(e),i={...t,"data-_gt":r};return t.children&&!r.variableType&&(i.children=o(t.children)),e.type===c.Fragment&&(i["data-_gt"].transformation="fragment"),c.cloneElement(e,i)}(e):e}function o(e){return Array.isArray(e)?c.Children.map(e,r):r(e)}return o(e)}function io(e,t){return u(e)?function(e,t){const{type:n,props:r}=e,o=function(e){const t="function"==typeof e&&"_gtt"in e?e._gtt:void 0;if(null==t||"string"!=typeof t)return;const n=t.split("-");return{componentType:n[0],injectionType:"automatic"===n[1]||"automatic"===n[2]?"automatic":"manual"}}(n);if("object"!=typeof r||null===r)return e;if(o){const{componentType:n,injectionType:i}=o;if("variable"===n)return e;if("branch"===n){const n=Object.entries(r).reduce((e,[n,r])=>("branch"===n||n.startsWith("data-")?e[n]=r:e[n]=io(r,t),e),{});return h(e,{...n})}if("plural"===n){const n=Object.entries(r).reduce((e,[n,r])=>(to(n)||"children"===n?e[n]=io(r,t):e[n]=r,e),{});return h(e,{...n})}if("derive"===n)return h(e,{...r,..."children"in r&&{children:ao(r.children,t+1)}});if("translate"===n&&"automatic"===i&&t>0)return"children"in r?ao(r.children,t):void 0;"translate"===n&&"automatic"===i&&console.warn("@generaltranslation/react-core Warning: A <_T> component was found injected outside of a <Derive> boundary. This may affect translation resolution for this component.")}return h(e,{...r,..."children"in r&&{children:ao(r.children,t)}})}(e,t):e}function ao(e,t){return Array.isArray(e)?l.map(e,e=>io(e,t)):io(e,t)}const so={variable:"value",number:"n",datetime:"date",currency:"cost","relative-time":"time"};function co(e={},t){return e.name?e.name:`_gt_${so[t]||"value"}_${e["data-_gt"]?.id}`}const lo={pl:"placeholder",ti:"title",alt:"alt",arl:"aria-label",arb:"aria-labelledby",ard:"aria-describedby"},uo=e=>{if(!e)return"";const{type:t,props:n}=e;if(t&&"function"==typeof t){if("displayName"in t&&"string"==typeof t.displayName&&t.displayName)return t.displayName;if("name"in t&&"string"==typeof t.name&&t.name)return t.name}return t&&"string"==typeof t?t:n.href?"a":n["data-_gt"]?.id?`C${n["data-_gt"].id}`:"function"},ho=e=>{return t=e,c.isValidElement(t)?(e=>{const{props:t}=e,n={t:uo(e)};if(t["data-_gt"]){const e=t["data-_gt"],r=e.transformation;if("variable"===r){const n=e.variableType||"variable",r=co(t,n),o=ro(n);return{i:e.id,k:r,v:o}}n.i=e.id,n.d=((e,t,n)=>{let r=Object.entries(lo).reduce((e,[n,r])=>(t[r]&&(e[n]=t[r]),e),{});if("plural"===e&&n){const e={};Object.entries(n).forEach(([t,n])=>{e[t]=fo(n)}),r={...r,b:e,t:"p"}}if("branch"===e&&n){const e={};Object.entries(n).forEach(([t,n])=>{e[t]=fo(n)}),r={...r,b:e,t:"b"}}return Object.keys(r).length?r:void 0})(r,t,e.branches);let o=Object.entries(lo).reduce((e,[n,r])=>(t[r]&&(e[n]=t[r]),e),{});if("plural"===r&&e.branches){const t={};Object.entries(e.branches).forEach(([e,n])=>{t[e]=fo(n)}),o={...o,b:t,t:"p"}}if("branch"===r&&e.branches){const t={};Object.entries(e.branches).forEach(([e,n])=>{t[e]=fo(n)}),o={...o,b:t,t:"b"}}n.d=Object.keys(o).length?o:void 0}return t.children&&(n.c=fo(t.children)),n})(e):"number"==typeof e?e.toString():e;var t};function fo(e){return Array.isArray(e)?e.map(ho):ho(e)}function po(e,t,n){let r="",o=null;return"number"==typeof e&&!o&&n&&(r=function(e,t=eo,n=["en"]){const r=Kn.get("PluralRules",n).select(e),o=Math.abs(e);if(0===o&&t.includes("zero"))return"zero";if(1===o){if(t.includes("singular"))return"singular";if(t.includes("one"))return"one"}if("one"===r&&t.includes("singular"))return"singular";if(2===o){if(t.includes("dual"))return"dual";if(t.includes("two"))return"two"}return"two"===r&&t.includes("dual")?"dual":t.includes(r)?r:"two"===r&&t.includes("dual")?"dual":"two"===r&&t.includes("plural")?"plural":"two"===r&&t.includes("other")?"other":"few"===r&&t.includes("plural")?"plural":"few"===r&&t.includes("other")?"other":"many"===r&&t.includes("plural")?"plural":"many"===r&&t.includes("other")?"other":"other"===r&&t.includes("plural")?"plural":""}(e,Object.keys(n),t)),r&&!o&&(o=n[r]),o}function go(e){return"object"==typeof e&&!!e&&"data-_gt"in e&&"object"==typeof e["data-_gt"]&&!!e["data-_gt"]&&"transformation"in e["data-_gt"]&&"variable"===e["data-_gt"]?.transformation}function yo(e){const t=e["data-_gt"]?.variableType||"variable";return{variableName:co(e,t),variableType:ro(t),injectionType:e["data-_gt"]?.injectionType||"manual",variableValue:void 0!==e.value?e.value:void 0!==e.date?e.date:void 0!==e["data-_gt-unformatted-value"]?e["data-_gt-unformatted-value"]:void 0!==e.children?e.children:void 0,variableOptions:(()=>{const t={...void 0!==e.currency&&{currency:e.currency},...void 0!==e.unit&&{unit:e.unit},...void 0!==e.baseDate&&{baseDate:e.baseDate},...void 0!==e.options&&e.options};return Object.keys(t).length?t:"string"==typeof e["data-_gt-variable-options"]?JSON.parse(e["data-_gt-variable-options"]):e["data-_gt-variable-options"]||void 0})()}}function mo(e){return e&&e.props&&e.props["data-_gt"]?e.props["data-_gt"]:null}function _o({children:e,defaultLocale:t=xn,renderVariable:n}){const r=e=>c.isValidElement(e)?(e=>{const r=mo(e);if(go(e.props)){const{variableType:r,variableValue:o,variableOptions:i,injectionType:a}=yo(e.props);return n({variableType:r,variableValue:o,variableOptions:i,locales:[t],injectionType:a})}if("plural"===r?.transformation){const n=r.branches||{};return o(po(e.props.n,[t],n)||e.props.children)}if("branch"===r?.transformation){const{children:t,branch:n}=e.props,i=r.branches||{};return o(void 0!==i[n]?i[n]:t)}return"fragment"===r?.transformation?c.createElement(c.Fragment,{key:e.props.key,children:o(e.props.children)}):e.props.children?c.cloneElement(e,{...e.props,"data-_gt":void 0,children:o(e.props.children)}):c.cloneElement(e,{...e.props,"data-_gt":void 0})})(e):e,o=e=>Array.isArray(e)?c.Children.map(e,r):r(e);return o(e)}function bo({sourceElement:e,targetElement:t,locales:n=[xn],renderVariable:r}){const{props:o}=e,i=o["data-_gt"],a=i?.transformation,s=t.d,l={};if(s&&Object.entries(lo).forEach(([e,t])=>{s[e]&&(l[t]=s[e])}),"plural"===a){const o=e.props.n;return Eo({source:po(o,n,i.branches||{})||e.props.children,target:po(o,n,t.d?.b||{})||t.c,locales:n,renderVariable:r})}if("branch"===a){const{branch:e,children:a}=o;return Eo({source:(i.branches||{})[e]||a,target:(t.d?.b||{})[e]||t.c,locales:n,renderVariable:r})}return"fragment"===a&&t.c?c.createElement(c.Fragment,{key:e.props.key,children:Eo({source:o.children,target:t.c,locales:n,renderVariable:r})}):o?.children&&t?.c?c.cloneElement(e,{...o,...l,"data-_gt":void 0,children:Eo({source:o.children,target:t.c,locales:n,renderVariable:r})}):_o({children:e,defaultLocale:n[0],renderVariable:r})}function Eo({source:e,target:t,locales:n=[xn],renderVariable:r}){if(null==t&&e)return _o({children:e,defaultLocale:n[0],renderVariable:r});if("string"==typeof t)return t;if(Array.isArray(t)&&!Array.isArray(e)&&e&&(e=[e]),Array.isArray(e)&&Array.isArray(t)){const o={},i={},a={},s=e.filter(e=>{if(c.isValidElement(e)){if(!go(e.props))return!0;{const{variableName:t,variableValue:n,variableOptions:r,injectionType:s}=yo(e.props);o[t]=n,i[t]=r,a[t]=s}}return!1}),l=e=>s.find(t=>{const n=mo(t);return void 0!==n?.id&&n.id===e.i})||s.shift();return t.map((e,t)=>{if("string"==typeof e)return y(c.Fragment,{children:e},`string_${t}`);if(Xn(e))return y(c.Fragment,{children:r({variableType:e.v||"v",variableValue:o[e.k],variableOptions:i[e.k],locales:n,injectionType:a[e.k]||"manual"})},`var_${t}`);const s=l(e);return s?y(c.Fragment,{children:bo({sourceElement:s,targetElement:e,locales:n,renderVariable:r})},`element_${t}`):null})}if(t&&"object"==typeof t&&!Array.isArray(t)){const o=Xn(t)?"variable":"element";if(c.isValidElement(e)){if("element"===o)return bo({sourceElement:e,targetElement:t,locales:n,renderVariable:r});if(go(e.props)){const{variableValue:t,variableOptions:o,variableType:i,injectionType:a}=yo(e.props);return r({variableType:i,variableValue:t,variableOptions:o,locales:n,injectionType:a})}}}return _o({children:e,defaultLocale:n[0],renderVariable:r})}const vo="generaltranslation.locale";function To({defaultLocale:e,locales:t,customMapping:n,localeCookieName:r=vo,getLocale:o}){const i={defaultLocale:e,locales:t,customMapping:n},a=kn(void 0,i);if(o){const e=o(),t=Un(e,i);return t||(console.warn((({customLocale:e,defaultLocale:t})=>`${_} Warning: Custom getLocale() function returned an unsupported locale: "${e}". Falling back to default locale: "${t}".`)({customLocale:e,defaultLocale:a})),a)}const s=[],c=function({cookieName:e}){var t;if("undefined"==typeof document)return;return null===(t=document.cookie.split("; ").find(t=>t.startsWith(`${e}=`)))||void 0===t?void 0:t.split("=")[1]}({cookieName:r});c&&s.push(c);const l=(null===navigator||void 0===navigator?void 0:navigator.languages)||[];return s.push(...l),kn(s,i)}class Lo{constructor(e={}){var{getLocale:t,localeCookieName:n=vo}=e,r=A(e,["getLocale","localeCookieName"]);this.localeConfig=r,this.customGetLocale=t,this.localeCookieName=n}getLocale(){return To(Object.assign(Object.assign({},this.localeConfig),{getLocale:this.customGetLocale,localeCookieName:this.localeCookieName}))}setLocale(e){!function({cookieName:e,value:t}){"undefined"!=typeof document&&(document.cookie=`${e}=${t};path=/`)}({cookieName:this.localeCookieName,value:e})}}const Co={updateHtmlLangTag:!0,updateHtmlDirTag:!0},wo=new Map;class Ao{constructor({locale:e,projectId:t,init:n,maxSize:r,ttl:o,purgeInterval:i}){this._writeBuffer={},this._flushTimer=null,this._estimatedSize=0,this._storageKey=`gt:tx:${t}:${e}`,this._purgeTimestampKey=`gt:tx:purge:${t}:${e}`,this._maxSize=null!=r?r:1e6,this._ttl=null!=o?o:864e5,this._purgeInterval=null!=i?i:3e5,n&&this.initStorage(n),wo.has(this._storageKey)&&clearInterval(wo.get(this._storageKey));const a=setInterval(()=>this._backgroundPurge(),this._purgeInterval);wo.set(this._storageKey,a)}getInternalCache(){const e=Date.now(),t=this._readFromStorage(),n={};for(const[r,o]of Object.entries(t))o.exp>e&&(n[r]=o.t);return Object.assign(n,this._writeBuffer),n}write(e,t){this._writeBuffer[e]=t,this._scheduleFlush()}purge(e){const t=this._readFromStorage();for(const n of e)delete t[n];this._writeRaw(JSON.stringify(t))}_scheduleFlush(){this._flushTimer||(this._flushTimer=setTimeout(()=>{this._flushTimer=null,this._flush()},500))}_flush(){if(0!==Object.keys(this._writeBuffer).length){try{const e=this._readFromStorage(),t=Date.now();this._estimatedSize>this._maxSize&&this._purgeCache(e,t);const n=t+this._ttl;for(const[t,r]of Object.entries(this._writeBuffer))e[t]={t:r,exp:n};this._writeRaw(JSON.stringify(e))}catch(e){}this._writeBuffer={}}}_purgeCache(e,t){const n=Object.keys(e);if(0===n.length)return;const r=this._estimatedSize/n.length;Oo(e,t);const o=.8*this._maxSize,i=Math.floor(o/r),a=Object.entries(e);if(a.length>i){a.sort((e,t)=>e[1].exp-t[1].exp);const t=a.length-i;for(let n=0;n<t;n++)delete e[a[n][0]]}}_backgroundPurge(){try{const e=localStorage.getItem(this._purgeTimestampKey),t=e?parseInt(e,10):0,n=Date.now();if(n-t<this._purgeInterval)return;const r=this._readFromStorage(),o=Object.keys(r).length;Oo(r,n),Object.keys(r).length<o&&this._writeRaw(JSON.stringify(r)),localStorage.setItem(this._purgeTimestampKey,String(n))}catch(e){}}_readFromStorage(){try{const e=localStorage.getItem(this._storageKey);return e?(this._estimatedSize=e.length,JSON.parse(e)):(this._estimatedSize=0,{})}catch(e){return this._estimatedSize=0,{}}}initStorage(e){try{const t=this._readFromStorage(),n=Date.now()+this._ttl;for(const[r,o]of Object.entries(e))t[r]={t:o,exp:n};this._writeRaw(JSON.stringify(t))}catch(e){}}_writeRaw(e){try{localStorage.setItem(this._storageKey,e),this._estimatedSize=e.length}catch(e){}}}function Oo(e,t=Date.now()){for(const n of Object.keys(e))e[n].exp<=t&&delete e[n]}class So extends yn{constructor(e){var t,n,r;const{htmlTagOptions:o}=e,i=A(e,["htmlTagOptions"]),a={},s=Ho(null===(r=null===(n=null===(t=e.files)||void 0===t?void 0:t.gt)||void 0===n?void 0:n.parsingFlags)||void 0===r?void 0:r.devHotReload),c=function(e){var t,n,r;const o={environment:!!import.meta.env.DEV,customLoadTranslations:!!e.loadTranslations,projectId:!!e.projectId,devApiKey:!!e.devApiKey},i=Object.values(o).every(Boolean),a=Ho(null===(r=null===(n=null===(t=e.files)||void 0===t?void 0:t.gt)||void 0===n?void 0:n.parsingFlags)||void 0===r?void 0:r.devHotReload),s=a.strings||a.jsx;if(import.meta.env.DEV&&s&&!i){const e=Object.keys(o).filter(e=>!o[e]);console.warn(`Dev hot reload is enabled, but the requirements are not met: ${e.join(", ")}`)}return i&&s}(e),l=c?function(e,t,n){return r=>R(this,void 0,void 0,function*(){const o=yield e(r);return n[r]||(n[r]=new Ao({locale:r,projectId:t,init:o})),n[r].getInternalCache()})}(e.loadTranslations,e.projectId,a):e.loadTranslations;super(Object.assign(Object.assign({},i),{loadTranslations:l})),this._devHotReloadJsx=!1,this._localStorageCaches=a,this._devHotReloadJsx=c&&s.jsx,this.htmlTagOptions=Object.assign(Object.assign({},Co),o),c&&this.subscribe("translations-cache-miss",({locale:e,hash:t,translation:n})=>{const r=a[e];r?r.write(t,n):a[e]=new Ao({locale:e,projectId:this.config.projectId,init:{[t]:n}})})}isDevHotReloadJsx(){return this._devHotReloadJsx}getLocalStorageTranslationCache(e,t){if(import.meta.env.DEV)return this._localStorageCaches[e]||(this._localStorageCaches[e]=new Ao({locale:e,projectId:this.config.projectId,init:t})),this._localStorageCaches[e]}updateHtmlTag(e,t){const n=(null==t?void 0:t.lang)||e,r=this.getGTClass(),o=r.resolveCanonicalLocale(n);if(!r.isValidLocale(o))return void console.warn(T(n));const i=(null==t?void 0:t.dir)||r.getLocaleDirection(o),a=Object.assign(Object.assign({},this.htmlTagOptions),t);a.updateHtmlLangTag&&(document.documentElement.lang=o),a.updateHtmlDirTag&&(document.documentElement.dir=i)}}function Ho(e){var t,n;return void 0===e||"boolean"==typeof e?{strings:!!e,jsx:!!e}:{strings:null!==(t=e.strings)&&void 0!==t&&t,jsx:null!==(n=e.jsx)&&void 0!==n&&n}}const{getConditionStore:Po,setConditionStore:Io}=function(e){let t;return{getConditionStore:function(){if(!t)throw new Error(e);return t},setConditionStore:function(e){t=e,Cn(e)}}}(v);function Mo(){const e=Tn();if(!(e instanceof So))throw new Error(v);return e}function No(e){const t=new So(e),n=new Lo({defaultLocale:t.getDefaultLocale(),locales:t.getLocales(),customMapping:t.getCustomMapping(),getLocale:e.getLocale});wn(t),Io(n)}function Ro(e){const t=Tn(),n=Un(e,{defaultLocale:t.getDefaultLocale(),locales:t.getLocales(),customMapping:t.getCustomMapping()});n?(Po().setLocale(n),window.location.reload()):console.warn(T(e))}function Bo(e){return R(this,void 0,void 0,function*(){No(e);const t=Mo(),n=Pn();t.updateHtmlTag(n),yield t.loadTranslations(n)})}function jo(e){var{children:t,branch:n}=e,r=A(e,["children","branch"]);const o=null==n?void 0:n.toString();"string"==typeof n&&n.startsWith("data-")&&(n=void 0);return o&&void 0!==r[o]?r[o]:t}function Do(e){return jo(e)}function Uo(e){var{children:t,n:n,locales:r}=e,o=A(e,["children","n","locales"]);const i=[...r?[r]:[],Pn(),Mn()];return"number"!=typeof n?t:po(n,i,o)||t}function Go(e){return Uo(e)}function ko({children:e}){return e}function xo({children:e}){return e}jo._gtt="branch",Do._gtt="branch-automatic",Uo._gtt="plural",Go._gtt="plural-automatic",ko._gtt="derive",xo._gtt="derive-automatic";const Fo=(e,...t)=>{var n,r;if("undefined"==typeof window&&console.warn(`${_} Warning: Translation failed for t("${"string"==typeof(r=e)?r:"`"+(null==r?void 0:r.join("${}"))+"`"}") because it was used outside of a browser environment. Falling back to original message.`),"string"==typeof e){const r=t.at(0);return jn(null!==(n=null==r?void 0:r.$locale)&&void 0!==n?n:Pn(),e,r)}return function(e,t){const n=Pn(),r=function(e,t){return e.map((e,n)=>{var r;return e+(null!==(r=t[n])&&void 0!==r?r:"")}).join("")}(e,t),o=Bn(n,r);if(o)return o;const{message:i,variables:a}=function(e,t){const n=[],r={};let o=0;for(let i=0;i<e.length;i++)if(n.push(e[i]),i<t.length){const e=o.toString();n.push(`{${e}}`),r[e]=t[i],o++}return{message:n.join(""),variables:r}}(e,t);return jn(n,i,a)}(e,t)};const $o=(e,t={})=>Rn(e,Object.assign({$format:"ICU"},t)),Vo=(e,t={})=>{var n;return Sn(null!==(n=t.$locale)&&void 0!==n?n:Pn(),e,Object.assign({$format:"JSX"},t))};function Ko({children:e,options:t={},locales:n=[]}){if(null==e)return null;const r="string"==typeof e?parseFloat(e):e,o=[...n,Pn(),Mn()];return Tn().getGTClass().formatNum(r,Object.assign({locales:o},t))}function Xo(e){return Ko(e)}function Yo({children:e}){return e}function Wo({children:e}){return Yo({children:e})}function qo({children:e}){return Yo({children:e})}function zo({children:e,currency:t="USD",options:n={},locales:r=[]}){if(null==e)return null;const o="string"==typeof e?parseFloat(e):e,i=[...r,Pn(),Mn()];return Tn().getGTClass().formatCurrency(o,t,Object.assign({locales:i},n))}function Jo(e){return zo(e)}function Zo({children:e,options:t={},locales:n=[]}){if(null==e)return null;const r=[...n,Pn(),Mn()];return Tn().getGTClass().formatDateTime(e,Object.assign({locales:r},t)).replace(/[\u200F\u202B\u202E]/g,"")}function Qo(e){return Zo(e)}Ko._gtt="variable-number-automatic",Xo._gtt="variable-number",qo._gtt="variable-variable",Wo._gtt="variable-variable-automatic",zo._gtt="variable-currency-automatic",Jo._gtt="variable-currency",Zo._gtt="variable-datetime-automatic",Qo._gtt="variable-datetime";const ei=({variableType:e,variableValue:t,variableOptions:n,injectionType:r})=>{switch(e){case"n":return y("automatic"===r?Xo:Ko,{options:n,children:t});case"d":return y("automatic"===r?Qo:Zo,{options:n,children:t});case"c":return y("automatic"===r?Jo:zo,{options:n,children:t});default:return"automatic"===r?Yo({children:t}):y(qo,{children:t})}};function ti(e){return ri(e)}function ni(e){return ri(e)}function ri(e){var{children:t}=e,n=A(e,["children"]);const{taggedSourceChildren:r,sourceJsxChildren:o,renderSourceChildren:i,options:a}=function({sourceChildren:e,params:t}){const n=p(()=>oo(function(e){return ao(e,0)}(e)),[e]),r=p(()=>fo(n),[n]),o=d(()=>_o({children:n,defaultLocale:Pn(),renderVariable:ei}),[n]),i=p(()=>{return e=t,Object.assign({$format:"JSX",$context:e.context,$id:e.id,$_hash:e._hash},e);var e},[t.context,t.id,t._hash,t.$format,t.$context,t.$id,t.$_hash]);return{taggedSourceChildren:n,sourceJsxChildren:r,renderSourceChildren:o,options:i}}({sourceChildren:t,params:n}),c=Pn(),l=Mn();if(!s(l,c))return i();const u=Object.assign(Object.assign({},a),{$locale:c}),h=function(e,t,n={}){const r=Tn(),o=Hn(e,n,"JSX");return r.lookupTranslation(o.$locale,t,o)}(c,o,u);return h?Eo({source:r,target:h,locales:[c],renderVariable:ei}):Mo().isDevHotReloadJsx()?y(f,{fallback:i(),children:y(oi,{sourceJsxChildren:o,taggedSourceChildren:r,options:u,targetLocale:c})}):i()}function oi({sourceJsxChildren:e,taggedSourceChildren:t,options:n,targetLocale:r}){return Eo({source:t,target:g(Sn(r,e,n)),locales:[r],renderVariable:ei})}function ii({date:e,children:t,value:n,unit:r,baseDate:o,locales:i=[],options:a={}}){const s=Tn().getGTClass(),c=[...i,Pn(),Mn()],l=null!=e?e:t;let u;if("development"!==process.env.NODE_ENV||void 0===n||r||console.warn("<RelativeTime>: `value` was provided without `unit`. The `value` prop will be ignored."),void 0!==n&&r)u=s.formatRelativeTime(n,r,{locales:c,numeric:a.numeric,style:a.style,localeMatcher:a.localeMatcher});else{if(null==l)return null;u=s.formatRelativeTimeFromDate(l,{locales:c,baseDate:null!=o?o:new Date,numeric:a.numeric,style:a.style,localeMatcher:a.localeMatcher})}return u}function ai(e){return ii(e)}function si(e){Mo().updateHtmlTag(e,{lang:e,updateHtmlLangTag:!0,updateHtmlDirTag:!1})}function ci(e){Mo().updateHtmlTag(Pn(),{dir:e,updateHtmlLangTag:!1,updateHtmlDirTag:!0})}function li(e){if(!e)return;const t={};for(const n in e)t[n]={name:e[n]};return t}function ui(e){var{locale:t,locales:n,customNames:r,customMapping:o=li(r),setLocale:i,getLocaleProperties:a}=e,s=A(e,["locale","locales","customNames","customMapping","setLocale","getLocaleProperties"]);const c=e=>{if(o&&o[e]){if("string"==typeof o[e])return o[e];if(o[e].name)return o[e].name}return(t=a(e).nativeNameWithRegionCode)?t.charAt(0).toUpperCase()+(t.length>1?t.slice(1):""):"";var t};return n&&0!==n.length&&i?m("select",Object.assign({},s,{value:t||"",onChange:e=>i(e.target.value),children:[!t&&y("option",{value:""}),n.map(e=>y("option",{value:e,suppressHydrationWarning:!0,children:c(e)},e))]})):null}function hi(e){var{locales:t}=e,n=A(e,["locales"]);const{sortedLocales:r,setLocale:o,locale:i,getLocaleProperties:a}=p(()=>{const e=Tn(),n=e.getGTClass(),r=Pn(),o=e=>n.getLocaleProperties(e);if(t)return{locale:r,setLocale:Ro,sortedLocales:t,getLocaleProperties:o};const i=e.getLocales().sort((e,t)=>(new Intl.Collator).compare(n.getLocaleProperties(e).nativeNameWithRegionCode,n.getLocaleProperties(t).nativeNameWithRegionCode));return{locale:r,sortedLocales:i,setLocale:Ro,getLocaleProperties:o}},[t]);return y(ui,Object.assign({locale:i,locales:r,setLocale:o,getLocaleProperties:a},n))}ni._gtt="translate-client",ti._gtt="translate-client-automatic",ii._gtt="variable-relative-time-automatic",ai._gtt="variable-relative-time",function(e=E){if("undefined"==typeof window)throw new Error(e)}(b);export{jo as Branch,Jo as Currency,Qo as DateTime,ko as Derive,Do as GtInternalBranch,zo as GtInternalCurrency,Zo as GtInternalDateTime,xo as GtInternalDerive,Ko as GtInternalNum,Go as GtInternalPlural,ii as GtInternalRelativeTime,Vo as GtInternalRuntimeTranslateJsx,$o as GtInternalRuntimeTranslateString,ti as GtInternalTranslateJsx,Wo as GtInternalVar,hi as LocaleSelector,Xo as Num,Uo as Plural,ai as RelativeTime,ni as T,qo as Var,Bo as bootstrap,Mn as getDefaultLocale,Pn as getLocale,In as getLocales,Nn as getVersionId,No as initializeGT,Ro as setLocale,Fo as t,ci as updateHtmlTagDir,si as updateHtmlTagLang};
2
2
  //# sourceMappingURL=browser.esm.min.mjs.map