gt-react 10.19.3 → 10.19.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import{formatCutoff as t,GT as e,formatMessage as r,standardizeLocale as n,isValidLocale as o,resolveCanonicalLocale as i}from"generaltranslation";function a(t,e,r=""){const n=function(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name&&"BYTES_PER_ELEMENT"in t&&1===t.BYTES_PER_ELEMENT}(t),o=t?.length;if(!n||void 0!==e){const e=(r&&`"${r}" `)+"expected Uint8Array"+""+", got "+(n?`length=${o}`:"type="+typeof t);if(!n)throw new TypeError(e);throw new RangeError(e)}return t}function s(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function c(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function u(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function h(t,e){return t<<32-e|t>>>e}const l=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),f=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function p(t,e={}){const r=(e,r)=>t(r).update(e).digest(),n=t(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.canXOF=n.canXOF,r.create=e=>t(e),Object.assign(r,e),Object.freeze(r)}const d=t=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,t])});function y(t,e,r){return t&e^~t&r}function v(t,e,r){return t&e^t&r^e&r}class g{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,e,r,n){this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(t),this.view=u(this.buffer)}update(t){s(this),a(t);const{view:e,buffer:r,blockLen:n}=this,o=t.length;for(let i=0;i<o;){const a=Math.min(n-this.pos,o-i);if(a===n){const e=u(t);for(;n<=o-i;i+=n)this.process(e,i);continue}r.set(t.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===n&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){s(this),function(t,e){a(t,void 0,"digestInto() output");const r=e.outputLen;if(t.length<r)throw new RangeError('"digestInto() output" expected to be of length >='+r)}(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:n,isLE:o}=this;let{pos:i}=this;e[i++]=128,c(this.buffer.subarray(i)),this.padOffset>n-i&&(this.process(r,0),i=0);for(let t=i;t<n;t++)e[t]=0;r.setBigUint64(n-8,BigInt(8*this.length),o),this.process(r,0);const h=u(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const f=l/4,p=this.get();if(f>p.length)throw new Error("_sha2: outputLen bigger than state");for(let t=0;t<f;t++)h.setUint32(4*t,p[t],o)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||=new this.constructor,t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:o,destroyed:i,pos:a}=this;return t.destroyed=i,t.finished=o,t.length=n,t.pos=a,n%e&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const E=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),b=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]),m=new Uint32Array(64);class _ extends g{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:e,C:r,D:n,E:o,F:i,G:a,H:s}=this;return[t,e,r,n,o,i,a,s]}set(t,e,r,n,o,i,a,s){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|i,this.G=0|a,this.H=0|s}process(t,e){for(let r=0;r<16;r++,e+=4)m[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){const e=m[t-15],r=m[t-2],n=h(e,7)^h(e,18)^e>>>3,o=h(r,17)^h(r,19)^r>>>10;m[t]=o+m[t-7]+n+m[t-16]|0}let{A:r,B:n,C:o,D:i,E:a,F:s,G:c,H:u}=this;for(let t=0;t<64;t++){const e=u+(h(a,6)^h(a,11)^h(a,25))+y(a,s,c)+b[t]+m[t]|0,l=(h(r,2)^h(r,13)^h(r,22))+v(r,n,o)|0;u=c,c=s,s=a,a=i+e|0,i=o,o=n,n=r,r=e+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,i=i+this.D|0,a=a+this.E|0,s=s+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,o,i,a,s,c,u)}roundClean(){c(m)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),c(this.buffer)}}class T extends _{A=0|E[0];B=0|E[1];C=0|E[2];D=0|E[3];E=0|E[4];F=0|E[5];G=0|E[6];H=0|E[7];constructor(){super(32)}}const H=p(()=>new T,d(1));var B="https://cdn.gtx.dev",A="en",L=function(t,e){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},L(t,e)};function w(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}L(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var S=function(){return S=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},S.apply(this,arguments)};function P(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}function C(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}function I(t,e){return function(r,n){e(r,n,t)}}function O(t,e,r,n,o,i){function a(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var s,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",h=!e&&t?n.static?t:t.prototype:null,l=e||(h?Object.getOwnPropertyDescriptor(h,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var d={};for(var y in n)d[y]="access"===y?{}:n[y];for(var y in n.access)d.access[y]=n.access[y];d.addInitializer=function(t){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(t||null))};var v=(0,r[p])("accessor"===c?{get:l.get,set:l.set}:l[u],d);if("accessor"===c){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(s=a(v.get))&&(l.get=s),(s=a(v.set))&&(l.set=s),(s=a(v.init))&&o.unshift(s)}else(s=a(v))&&("field"===c?o.unshift(s):l[u]=s)}h&&Object.defineProperty(h,n.name,l),f=!0}function M(t,e,r){for(var n=arguments.length>2,o=0;o<e.length;o++)r=n?e[o].call(t,r):e[o].call(t);return n?r:void 0}function R(t){return"symbol"==typeof t?t:"".concat(t)}function N(t,e,r){return"symbol"==typeof e&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function U(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function G(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function s(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(a,s)}c((n=n.apply(t,e||[])).next())})}function D(t,e){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var k=Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]};function j(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||k(e,t,r)}function x(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function F(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function K(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(F(arguments[e]));return t}function V(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function $(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}function X(t){return this instanceof X?(this.v=t,this):new X(t)}function Y(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(t,e||[]),i=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function(t){return function(e){return Promise.resolve(e).then(t,u)}}),n[Symbol.asyncIterator]=function(){return this},n;function a(t,e){o[t]&&(n[t]=function(e){return new Promise(function(r,n){i.push([t,e,r,n])>1||s(t,e)})},e&&(n[t]=e(n[t])))}function s(t,e){try{(r=o[t](e)).value instanceof X?Promise.resolve(r.value.v).then(c,u):h(i[0][2],r)}catch(t){h(i[0][3],t)}var r}function c(t){s("next",t)}function u(t){s("throw",t)}function h(t,e){t(e),i.shift(),i.length&&s(i[0][0],i[0][1])}}function q(t){var e,r;return e={},n("next"),n("throw",function(t){throw t}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,o){e[n]=t[n]?function(e){return(r=!r)?{value:X(t[n](e)),done:!1}:o?o(e):e}:o}}function W(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=x(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise(function(n,o){!function(t,e,r,n){Promise.resolve(n).then(function(e){t({value:e,done:r})},e)}(n,o,(e=t[r](e)).done,e.value)})}}}function Z(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var Q=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},J=function(t){return J=Object.getOwnPropertyNames||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[e.length]=r);return e},J(t)};function z(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r=J(t),n=0;n<r.length;n++)"default"!==r[n]&&k(e,t,r[n]);return Q(e,t),e}function tt(t){return t&&t.__esModule?t:{default:t}}function et(t,e,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}function rt(t,e,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,r):o?o.value=r:e.set(t,r),r}function nt(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}function ot(t,e,r){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}var it="function"==typeof SuppressedError?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function at(t){function e(e){t.error=t.hasError?new it(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var r,n=0;return function o(){for(;r=t.stack.pop();)try{if(!r.async&&1===n)return n=0,t.stack.push(r),Promise.resolve().then(o);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(i).then(o,function(t){return e(t),o()})}else n|=1}catch(t){e(t)}if(1===n)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}function st(t,e){return"string"==typeof t&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(t,r,n,o,i){return r?e?".jsx":".js":!n||o&&i?n+o+"."+i.toLowerCase()+"js":t}):t}var ct,ut,ht,lt={__extends:w,__assign:S,__rest:P,__decorate:C,__param:I,__esDecorate:O,__runInitializers:M,__propKey:R,__setFunctionName:N,__metadata:U,__awaiter:G,__generator:D,__createBinding:k,__exportStar:j,__values:x,__read:F,__spread:K,__spreadArrays:V,__spreadArray:$,__await:X,__asyncGenerator:Y,__asyncDelegator:q,__asyncValues:W,__makeTemplateObject:Z,__importStar:z,__importDefault:tt,__classPrivateFieldGet:et,__classPrivateFieldSet:rt,__classPrivateFieldIn:nt,__addDisposableResource:ot,__disposeResources:at,__rewriteRelativeImportExtension:st},ft=Object.freeze({__proto__:null,__addDisposableResource:ot,get __assign(){return S},__asyncDelegator:q,__asyncGenerator:Y,__asyncValues:W,__await:X,__awaiter:G,__classPrivateFieldGet:et,__classPrivateFieldIn:nt,__classPrivateFieldSet:rt,__createBinding:k,__decorate:C,__disposeResources:at,__esDecorate:O,__exportStar:j,__extends:w,__generator:D,__importDefault:tt,__importStar:z,__makeTemplateObject:Z,__metadata:U,__param:I,__propKey:R,__read:F,__rest:P,__rewriteRelativeImportExtension:st,__runInitializers:M,__setFunctionName:N,__spread:K,__spreadArray:$,__spreadArrays:V,__values:x,default:lt}),pt="DEFAULT_TERMINATOR_KEY";!function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(ct||(ct={})),function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"}(ut||(ut={})),function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"}(ht||(ht={}));var dt=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,yt=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function vt(t){var e={};return t.replace(yt,function(t){var r=t.length;switch(t[0]){case"G":e.era=4===r?"long":5===r?"narrow":"short";break;case"y":e.year=2===r?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=4===r?"long":5===r?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][r-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][r-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][r-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][r-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][r-1];break;case"s":e.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e}var gt=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Et(t){return t.replace(/^(.*?)-/,"")}var bt=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,mt=/^(@+)?(\+|#+)?[rs]?$/g,_t=/(\*)(0+)|(#+)(0+)|(0+)/g,Tt=/^(0+)$/;function Ht(t){var e={};return"r"===t[t.length-1]?e.roundingPriority="morePrecision":"s"===t[t.length-1]&&(e.roundingPriority="lessPrecision"),t.replace(mt,function(t,r,n){return"string"!=typeof n?(e.minimumSignificantDigits=r.length,e.maximumSignificantDigits=r.length):"+"===n?e.minimumSignificantDigits=r.length:"#"===r[0]?e.maximumSignificantDigits=r.length:(e.minimumSignificantDigits=r.length,e.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""}),e}function Bt(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function At(t){var e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){var r=t.slice(0,2);if("+!"===r?(e.signDisplay="always",t=t.slice(2)):"+?"===r&&(e.signDisplay="exceptZero",t=t.slice(2)),!Tt.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function Lt(t){return Bt(t)||{}}function wt(t){for(var e={},r=0,n=t;r<n.length;r++){var o=n[r];switch(o.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=o.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=Et(o.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=S(S(S({},e),{notation:"scientific"}),o.options.reduce(function(t,e){return S(S({},t),Lt(e))},{}));continue;case"engineering":e=S(S(S({},e),{notation:"engineering"}),o.options.reduce(function(t,e){return S(S({},t),Lt(e))},{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(o.options[0]);continue;case"rounding-mode-floor":e.roundingMode="floor";continue;case"rounding-mode-ceiling":e.roundingMode="ceil";continue;case"rounding-mode-down":e.roundingMode="trunc";continue;case"rounding-mode-up":e.roundingMode="expand";continue;case"rounding-mode-half-even":e.roundingMode="halfEven";continue;case"rounding-mode-half-down":e.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":e.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(_t,function(t,r,n,o,i,a){if(r)e.minimumIntegerDigits=n.length;else{if(o&&i)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Tt.test(o.stem))e.minimumIntegerDigits=o.stem.length;else if(bt.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(bt,function(t,r,n,o,i,a){return"*"===n?e.minimumFractionDigits=r.length:o&&"#"===o[0]?e.maximumFractionDigits=o.length:i&&a?(e.minimumFractionDigits=i.length,e.maximumFractionDigits=i.length+a.length):(e.minimumFractionDigits=r.length,e.maximumFractionDigits=r.length),""});var i=o.options[0];"w"===i?e=S(S({},e),{trailingZeroDisplay:"stripIfInteger"}):i&&(e=S(S({},e),Ht(i)))}else if(mt.test(o.stem))e=S(S({},e),Ht(o.stem));else{var a=Bt(o.stem);a&&(e=S(S({},e),a));var s=At(o.stem);s&&(e=S(S({},e),s))}}return e}var St,Pt={"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 Ct(t){var e=t.hourCycle;if(void 0===e&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r,n=t.language;return"root"!==n&&(r=t.maximize().region),(Pt[r||""]||Pt[n||""]||Pt["".concat(n,"-001")]||Pt["001"])[0]}var It=new RegExp("^".concat(dt.source,"*")),Ot=new RegExp("".concat(dt.source,"*$"));function Mt(t,e){return{start:t,end:e}}var Rt=!!String.prototype.startsWith&&"_a".startsWith("a",1),Nt=!!String.fromCodePoint,Ut=!!Object.fromEntries,Gt=!!String.prototype.codePointAt,Dt=!!String.prototype.trimStart,kt=!!String.prototype.trimEnd,jt=Number.isSafeInteger?Number.isSafeInteger:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},xt=!0;try{xt="a"===(null===(St=Wt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===St?void 0:St[0])}catch(Ee){xt=!1}var Ft,Kt=Rt?function(t,e,r){return t.startsWith(e,r)}:function(t,e,r){return t.slice(r,r+e.length)===e},Vt=Nt?String.fromCodePoint:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r,n="",o=t.length,i=0;o>i;){if((r=t[i++])>1114111)throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},$t=Ut?Object.fromEntries:function(t){for(var e={},r=0,n=t;r<n.length;r++){var o=n[r],i=o[0],a=o[1];e[i]=a}return e},Xt=Gt?function(t,e){return t.codePointAt(e)}:function(t,e){var r=t.length;if(!(e<0||e>=r)){var n,o=t.charCodeAt(e);return o<55296||o>56319||e+1===r||(n=t.charCodeAt(e+1))<56320||n>57343?o:n-56320+(o-55296<<10)+65536}},Yt=Dt?function(t){return t.trimStart()}:function(t){return t.replace(It,"")},qt=kt?function(t){return t.trimEnd()}:function(t){return t.replace(Ot,"")};function Wt(t,e){return new RegExp(t,e)}if(xt){var Zt=Wt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ft=function(t,e){var r;return Zt.lastIndex=e,null!==(r=Zt.exec(t)[1])&&void 0!==r?r:""}}else Ft=function(t,e){for(var r=[];;){var n=Xt(t,e);if(void 0===n||te(n)||ee(n))break;r.push(n),e+=n>=65536?2:1}return Vt.apply(void 0,r)};var Qt=function(){function t(t,e){void 0===e&&(e={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.locale=e.locale,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}return t.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(t,e,r){for(var n=[];!this.isEOF();){var o=this.char();if(123===o){if((i=this.parseArgument(t,r)).err)return i;n.push(i.val)}else{if(125===o&&t>0)break;if(35!==o||"plural"!==e&&"selectordinal"!==e){if(60===o&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(ct.UNMATCHED_CLOSING_TAG,Mt(this.clonePosition(),this.clonePosition()))}if(60===o&&!this.ignoreTag&&Jt(this.peek()||0)){if((i=this.parseTag(t,e)).err)return i;n.push(i.val)}else{var i;if((i=this.parseLiteral(t,e)).err)return i;n.push(i.val)}}else{var a=this.clonePosition();this.bump(),n.push({type:ut.pound,location:Mt(a,this.clonePosition())})}}}return{val:n,err:null}},t.prototype.parseTag=function(t,e){var r=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:ut.literal,value:"<".concat(n,"/>"),location:Mt(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,e,!0);if(o.err)return o;var i=o.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Jt(this.char()))return this.error(ct.INVALID_TAG,Mt(a,this.clonePosition()));var s=this.clonePosition();return n!==this.parseTagName()?this.error(ct.UNMATCHED_CLOSING_TAG,Mt(s,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ut.tag,value:n,children:i,location:Mt(r,this.clonePosition())},err:null}:this.error(ct.INVALID_TAG,Mt(a,this.clonePosition())))}return this.error(ct.UNCLOSED_TAG,Mt(r,this.clonePosition()))}return this.error(ct.INVALID_TAG,Mt(r,this.clonePosition()))},t.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&zt(this.char());)this.bump();return this.message.slice(t,this.offset())},t.prototype.parseLiteral=function(t,e){for(var r=this.clonePosition(),n="";;){var o=this.tryParseQuote(e);if(o)n+=o;else{var i=this.tryParseUnquoted(t,e);if(i)n+=i;else{var a=this.tryParseLeftAngleBracket();if(!a)break;n+=a}}}var s=Mt(r,this.clonePosition());return{val:{type:ut.literal,value:n,location:s},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(Jt(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t},t.prototype.tryParseQuote=function(t){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"===t||"selectordinal"===t)break;return null;default:return null}this.bump();var e=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(39===r){if(39!==this.peek()){this.bump();break}e.push(39),this.bump()}else e.push(r);this.bump()}return Vt.apply(void 0,e)},t.prototype.tryParseUnquoted=function(t,e){if(this.isEOF())return null;var r=this.char();return 60===r||123===r||35===r&&("plural"===e||"selectordinal"===e)||125===r&&t>0?null:(this.bump(),Vt(r))},t.prototype.parseArgument=function(t,e){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ct.EXPECT_ARGUMENT_CLOSING_BRACE,Mt(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error(ct.EMPTY_ARGUMENT,Mt(r,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(ct.MALFORMED_ARGUMENT,Mt(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ct.EXPECT_ARGUMENT_CLOSING_BRACE,Mt(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:ut.argument,value:n,location:Mt(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ct.EXPECT_ARGUMENT_CLOSING_BRACE,Mt(r,this.clonePosition())):this.parseArgumentOptions(t,e,n,r);default:return this.error(ct.MALFORMED_ARGUMENT,Mt(r,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),r=Ft(this.message,e),n=e+r.length;return this.bumpTo(n),{value:r,location:Mt(t,this.clonePosition())}},t.prototype.parseArgumentOptions=function(t,e,r,n){var o,i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,s=this.clonePosition();switch(a){case"":return this.error(ct.EXPECT_ARGUMENT_TYPE,Mt(i,s));case"number":case"date":case"time":this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition();if((g=this.parseSimpleArgStyleIfPossible()).err)return g;if(0===(p=qt(g.val)).length)return this.error(ct.EXPECT_ARGUMENT_STYLE,Mt(this.clonePosition(),this.clonePosition()));c={style:p,styleLocation:Mt(u,this.clonePosition())}}if((E=this.tryParseArgumentClose(n)).err)return E;var h=Mt(n,this.clonePosition());if(c&&Kt(null==c?void 0:c.style,"::",0)){var l=Yt(c.style.slice(2));if("number"===a)return(g=this.parseNumberSkeletonFromString(l,c.styleLocation)).err?g:{val:{type:ut.number,value:r,location:h,style:g.val},err:null};if(0===l.length)return this.error(ct.EXPECT_DATE_TIME_SKELETON,h);var f=l;this.locale&&(f=function(t,e){for(var r="",n=0;n<t.length;n++){var o=t.charAt(n);if("j"===o){for(var i=0;n+1<t.length&&t.charAt(n+1)===o;)i++,n++;var a=1+(1&i),s=i<2?1:3+(i>>1),c=Ct(e);for("H"!=c&&"k"!=c||(s=0);s-- >0;)r+="a";for(;a-- >0;)r=c+r}else r+="J"===o?"H":o}return r}(l,this.locale));var p={type:ht.dateTime,pattern:f,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?vt(f):{}};return{val:{type:"date"===a?ut.date:ut.time,value:r,location:h,style:p},err:null}}return{val:{type:"number"===a?ut.number:"date"===a?ut.date:ut.time,value:r,location:h,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(ct.EXPECT_SELECT_ARGUMENT_OPTIONS,Mt(d,S({},d)));this.bumpSpace();var y=this.parseIdentifierIfPossible(),v=0;if("select"!==a&&"offset"===y.value){if(!this.bumpIf(":"))return this.error(ct.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Mt(this.clonePosition(),this.clonePosition()));var g;if(this.bumpSpace(),(g=this.tryParseDecimalInteger(ct.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ct.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return g;this.bumpSpace(),y=this.parseIdentifierIfPossible(),v=g.val}var E,b=this.tryParsePluralOrSelectOptions(t,a,e,y);if(b.err)return b;if((E=this.tryParseArgumentClose(n)).err)return E;var m=Mt(n,this.clonePosition());return"select"===a?{val:{type:ut.select,value:r,options:$t(b.val),location:m},err:null}:{val:{type:ut.plural,value:r,options:$t(b.val),offset:v,pluralType:"plural"===a?"cardinal":"ordinal",location:m},err:null};default:return this.error(ct.INVALID_ARGUMENT_TYPE,Mt(i,s))}},t.prototype.tryParseArgumentClose=function(t){return this.isEOF()||125!==this.char()?this.error(ct.EXPECT_ARGUMENT_CLOSING_BRACE,Mt(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,e=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ct.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Mt(r,this.clonePosition()));this.bump();break;case 123:t+=1,this.bump();break;case 125:if(!(t>0))return{val:this.message.slice(e.offset,this.offset()),err:null};t-=1;break;default:this.bump()}return{val:this.message.slice(e.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(t,e){var r=[];try{r=function(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");for(var e=[],r=0,n=t.split(gt).filter(function(t){return t.length>0});r<n.length;r++){var o=n[r].split("/");if(0===o.length)throw new Error("Invalid number skeleton");for(var i=o[0],a=o.slice(1),s=0,c=a;s<c.length;s++)if(0===c[s].length)throw new Error("Invalid number skeleton");e.push({stem:i,options:a})}return e}(t)}catch(t){return this.error(ct.INVALID_NUMBER_SKELETON,e)}return{val:{type:ht.number,tokens:r,location:e,parsedOptions:this.shouldParseSkeletons?wt(r):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(t,e,r,n){for(var o,i=!1,a=[],s=new Set,c=n.value,u=n.location;;){if(0===c.length){var h=this.clonePosition();if("select"===e||!this.bumpIf("="))break;var l=this.tryParseDecimalInteger(ct.EXPECT_PLURAL_ARGUMENT_SELECTOR,ct.INVALID_PLURAL_ARGUMENT_SELECTOR);if(l.err)return l;u=Mt(h,this.clonePosition()),c=this.message.slice(h.offset,this.offset())}if(s.has(c))return this.error("select"===e?ct.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ct.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);"other"===c&&(i=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?ct.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ct.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Mt(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,e,r);if(p.err)return p;var d=this.tryParseArgumentClose(f);if(d.err)return d;a.push([c,{value:p.val,location:Mt(f,this.clonePosition())}]),s.add(c),this.bumpSpace(),c=(o=this.parseIdentifierIfPossible()).value,u=o.location}return 0===a.length?this.error("select"===e?ct.EXPECT_SELECT_ARGUMENT_SELECTOR:ct.EXPECT_PLURAL_ARGUMENT_SELECTOR,Mt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(ct.MISSING_OTHER_CLAUSE,Mt(this.clonePosition(),this.clonePosition())):{val:a,err:null}},t.prototype.tryParseDecimalInteger=function(t,e){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,i=0;!this.isEOF();){var a=this.char();if(!(a>=48&&a<=57))break;o=!0,i=10*i+(a-48),this.bump()}var s=Mt(n,this.clonePosition());return o?jt(i*=r)?{val:i,err:null}:this.error(e,s):this.error(t,s)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=Xt(this.message,t);if(void 0===e)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return e},t.prototype.error=function(t,e){return{val:null,err:{kind:t,message:this.message,location:e}}},t.prototype.bump=function(){if(!this.isEOF()){var t=this.char();10===t?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},t.prototype.bumpIf=function(t){if(Kt(this.message,t,this.offset())){for(var e=0;e<t.length;e++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(t){var e=this.offset(),r=this.message.indexOf(t,e);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var e=this.offset();if(e===t)break;if(e>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&te(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),e=this.offset(),r=this.message.charCodeAt(e+(t>=65536?2:1));return null!=r?r:null},t}();function Jt(t){return t>=97&&t<=122||t>=65&&t<=90}function zt(t){return 45===t||46===t||t>=48&&t<=57||95===t||t>=97&&t<=122||t>=65&&t<=90||183==t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function te(t){return t>=9&&t<=13||32===t||133===t||t>=8206&&t<=8207||8232===t||8233===t}function ee(t){return t>=33&&t<=35||36===t||t>=37&&t<=39||40===t||41===t||42===t||43===t||44===t||45===t||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||91===t||92===t||93===t||94===t||96===t||123===t||124===t||125===t||126===t||161===t||t>=162&&t<=165||166===t||167===t||169===t||171===t||172===t||174===t||176===t||177===t||182===t||187===t||191===t||215===t||247===t||t>=8208&&t<=8213||t>=8214&&t<=8215||8216===t||8217===t||8218===t||t>=8219&&t<=8220||8221===t||8222===t||8223===t||t>=8224&&t<=8231||t>=8240&&t<=8248||8249===t||8250===t||t>=8251&&t<=8254||t>=8257&&t<=8259||8260===t||8261===t||8262===t||t>=8263&&t<=8273||8274===t||8275===t||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||8608===t||t>=8609&&t<=8610||8611===t||t>=8612&&t<=8613||8614===t||t>=8615&&t<=8621||8622===t||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||8658===t||8659===t||8660===t||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||8968===t||8969===t||8970===t||8971===t||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||9001===t||9002===t||t>=9003&&t<=9083||9084===t||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||9655===t||t>=9656&&t<=9664||9665===t||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||9839===t||t>=9840&&t<=10087||10088===t||10089===t||10090===t||10091===t||10092===t||10093===t||10094===t||10095===t||10096===t||10097===t||10098===t||10099===t||10100===t||10101===t||t>=10132&&t<=10175||t>=10176&&t<=10180||10181===t||10182===t||t>=10183&&t<=10213||10214===t||10215===t||10216===t||10217===t||10218===t||10219===t||10220===t||10221===t||10222===t||10223===t||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||10627===t||10628===t||10629===t||10630===t||10631===t||10632===t||10633===t||10634===t||10635===t||10636===t||10637===t||10638===t||10639===t||10640===t||10641===t||10642===t||10643===t||10644===t||10645===t||10646===t||10647===t||10648===t||t>=10649&&t<=10711||10712===t||10713===t||10714===t||10715===t||t>=10716&&t<=10747||10748===t||10749===t||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||11158===t||t>=11159&&t<=11263||t>=11776&&t<=11777||11778===t||11779===t||11780===t||11781===t||t>=11782&&t<=11784||11785===t||11786===t||11787===t||11788===t||11789===t||t>=11790&&t<=11798||11799===t||t>=11800&&t<=11801||11802===t||11803===t||11804===t||11805===t||t>=11806&&t<=11807||11808===t||11809===t||11810===t||11811===t||11812===t||11813===t||11814===t||11815===t||11816===t||11817===t||t>=11818&&t<=11822||11823===t||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||11840===t||11841===t||11842===t||t>=11843&&t<=11855||t>=11856&&t<=11857||11858===t||t>=11859&&t<=11903||t>=12289&&t<=12291||12296===t||12297===t||12298===t||12299===t||12300===t||12301===t||12302===t||12303===t||12304===t||12305===t||t>=12306&&t<=12307||12308===t||12309===t||12310===t||12311===t||12312===t||12313===t||12314===t||12315===t||12316===t||12317===t||t>=12318&&t<=12319||12320===t||12336===t||64830===t||64831===t||t>=65093&&t<=65094}function re(t){t.forEach(function(t){if(delete t.location,function(t){return t.type===ut.select}(t)||function(t){return t.type===ut.plural}(t))for(var e in t.options)delete t.options[e].location,re(t.options[e].value);else(function(t){return t.type===ut.number})(t)&&function(t){return!(!t||"object"!=typeof t||t.type!==ht.number)}(t.style)||(function(t){return t.type===ut.date}(t)||function(t){return t.type===ut.time}(t))&&function(t){return!(!t||"object"!=typeof t||t.type!==ht.dateTime)}(t.style)?delete t.style.location:function(t){return t.type===ut.tag}(t)&&re(t.children)})}function ne(t){var e=t.icuString,r=t.shouldVisit,n=t.visitor,o=t.options,i=o.recurseIntoVisited,a=void 0===i||i,s=function(t,e){void 0===e&&(e={}),e=S({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var r=new Qt(t,e).parse();if(r.err){var n=SyntaxError(ct[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return(null==e?void 0:e.captureLocation)||re(r.val),r.val}(e,P(o,["recurseIntoVisited"]));return c(s),s;function c(t){t.map(u)}function u(t){var e=!1;r(t)&&(n(t),e=!0),e&&!a||(t.type===ut.select||t.type===ut.plural?Object.values(t.options).map(function(t){return t.value}).map(c):t.type===ut.tag&&c(t.children))}}var oe="_gt_",ie=new RegExp("^".concat(oe,"\\d+$")),ae=new RegExp("^".concat(oe,"$"));var se,ce={};function ue(){return se||(se=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.SKELETON_TYPE=ce.TYPE=void 0,ce.isLiteralElement=function(e){return e.type===t.literal},ce.isArgumentElement=function(e){return e.type===t.argument},ce.isNumberElement=function(e){return e.type===t.number},ce.isDateElement=function(e){return e.type===t.date},ce.isTimeElement=function(e){return e.type===t.time},ce.isSelectElement=function(e){return e.type===t.select},ce.isPluralElement=function(e){return e.type===t.plural},ce.isPoundElement=function(e){return e.type===t.pound},ce.isTagElement=function(e){return e.type===t.tag},ce.isNumberSkeleton=function(t){return!(!t||"object"!=typeof t||t.type!==e.number)},ce.isDateTimeSkeleton=function(t){return!(!t||"object"!=typeof t||t.type!==e.dateTime)},ce.createLiteralElement=function(e){return{type:t.literal,value:e}},ce.createNumberElement=function(e,r){return{type:t.number,value:e,style:r}},function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"}(t||(ce.TYPE=t={})),function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"}(e||(ce.SKELETON_TYPE=e={}))),ce;var t,e}var he=ue();function le(t){var e;return t.type===he.TYPE.select&&ie.test(t.value)&&!!t.options.other&&(0===t.options.other.value.length||t.options.other.value.length>0&&(null===(e=t.options.other.value[0])||void 0===e?void 0:e.type)===he.TYPE.literal)}function fe(t){var e;return t.type===he.TYPE.select&&ae.test(t.value)&&!!t.options.other&&(0===t.options.other.value.length||t.options.other.value.length>0&&(null===(e=t.options.other.value[0])||void 0===e?void 0:e.type)===he.TYPE.literal)}function pe(t){if(!t.includes(oe))return t;var e=[];ne({icuString:t,shouldVisit:fe,visitor:function(t){var r,n,o,i,a,s,c,u;e.push({start:null!==(n=null===(r=t.location)||void 0===r?void 0:r.start.offset)&&void 0!==n?n:0,end:null!==(i=null===(o=t.location)||void 0===o?void 0:o.end.offset)&&void 0!==i?i:0,otherStart:null!==(s=null===(a=t.options.other.location)||void 0===a?void 0:a.start.offset)&&void 0!==s?s:0,otherEnd:null!==(u=null===(c=t.options.other.location)||void 0===c?void 0:c.end.offset)&&void 0!==u?u:0})},options:{recurseIntoVisited:!1,captureLocation:!0}});for(var r=[],n=0,o=0;o<e.length;o++){var i=e[o],a=i.start,s=i.end,c=i.otherStart,u=i.otherEnd;r.push(t.slice(n,a)),r.push(t.slice(a,a+4+1)),r.push(String(o+1)),r.push(t.slice(a+4+1,c)),r.push("{}"),r.push(t.slice(u,s)),n=s}return r.push(t.slice(n,t.length)),r.join("")}var de,ye={},ve=function(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){var r=!1;try{r=this instanceof t}catch{}return r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:function(){return t[e]}})}),r}(ft),ge=function(){if(de)return ye;de=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.printAST=r,ye.doPrintAST=n,ye.printDateTimeSkeleton=a;var t=ve,e=ue();function r(t){return n(t,!1)}function n(s,c){var u=s.map(function(u,h){return(0,e.isLiteralElement)(u)?function(t,e,r,n){var i=t.value;return r||"'"!==i[0]||(i="''".concat(i.slice(1))),n||"'"!==i[i.length-1]||(i="".concat(i.slice(0,i.length-1),"''")),i=o(i),e?i.replace("#","'#'"):i}(u,c,0===h,h===s.length-1):(0,e.isArgumentElement)(u)?function(t){var e=t.value;return"{".concat(e,"}")}(u):(0,e.isDateElement)(u)||(0,e.isTimeElement)(u)||(0,e.isNumberElement)(u)?function(t){return"{".concat(t.value,", ").concat(e.TYPE[t.type]).concat(t.style?", ".concat("string"==typeof(r=t.style)?o(r):r.type===e.SKELETON_TYPE.dateTime?"::".concat(a(r)):"::".concat(r.tokens.map(i).join(" "))):"","}");var r}(u):(0,e.isPluralElement)(u)?function(e){var r="cardinal"===e.pluralType?"plural":"selectordinal",o=[e.value,r,t.__spreadArray([e.offset?"offset:".concat(e.offset):""],Object.keys(e.options).map(function(t){return"".concat(t,"{").concat(n(e.options[t].value,!0),"}")}),!0).filter(Boolean).join(" ")].join(",");return"{".concat(o,"}")}(u):(0,e.isSelectElement)(u)?function(t){var e=[t.value,"select",Object.keys(t.options).map(function(e){return"".concat(e,"{").concat(n(t.options[e].value,!1),"}")}).join(" ")].join(",");return"{".concat(e,"}")}(u):(0,e.isPoundElement)(u)?"#":(0,e.isTagElement)(u)?function(t){return"<".concat(t.value,">").concat(r(t.children),"</").concat(t.value,">")}(u):void 0});return u.join("")}function o(t){return t.replace(/([{}](?:[\s\S]*[{}])?)/,"'$1'")}function i(t){var e=t.stem,r=t.options;return 0===r.length?e:"".concat(e).concat(r.map(function(t){return"/".concat(t)}).join(""))}function a(t){return t.pattern}return ye}();var Ee=function(){return Ee=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Ee.apply(this,arguments)};function be(t){if(void 0!==t){if(null===t)return"null";if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);if(Array.isArray(t)){for(var e="[",r=0;r<t.length;r++)r&&(e+=","),e+=be(t[r])||"null";return e+"]"}for(var n="",o=0,i=Object.keys(t).sort();o<i.length;o++){var a=i[o],s=be(t[a]);s&&(n&&(n+=","),n+=JSON.stringify(a)+":"+s)}return"{"+n+"}"}}function me(t){var e;return null!==(e=be(t))&&void 0!==e?e:""}function _e(t){return function(t){if(a(t),l)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=f[t[r]];return e}(H(function(t){if("string"!=typeof t)throw new TypeError("string expected");return new Uint8Array((new TextEncoder).encode(t))}(t))).slice(0,16)}function Te(t,e){var r,n=t.source,o=t.context,i=t.id,a=t.maxChars,s=t.dataFormat;return void 0===e&&(e=_e),r="JSX"===s?Be(n):n,e(me(Ee(Ee(Ee(Ee({source:r},i&&{id:i}),o&&{context:o}),null!=a&&{maxChars:Math.abs(a)}),s&&{dataFormat:s})))}"function"==typeof SuppressedError&&SuppressedError;var He=function(t){if(t&&"object"==typeof t){var e={};if("c"in t&&t.c&&(e.c=Be(t.c)),"d"in t){var r=null==t?void 0:t.d;(null==r?void 0:r.b)&&(e.b=Object.fromEntries(Object.entries(r.b).map(function(t){return[t[0],Be(t[1])]}))),(null==r?void 0:r.t)&&(e.t=r.t)}return function(t){var e=t;if(e&&"object"==typeof e&&"string"==typeof e.k){var r=Object.keys(e);if(1===r.length)return!0;if(2===r.length){if("number"==typeof e.i)return!0;if("string"==typeof e.v)return!0}if(3===r.length&&"string"==typeof e.v&&"number"==typeof e.i)return!0}return!1}(t)?Ee({k:t.k},t.v&&{v:t.v}):e}return t};function Be(t){return Array.isArray(t)?t.map(He):He(t)}var Ae=function(t,e){return Ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},Ae(t,e)};function Le(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Ae(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var we=function(){return we=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},we.apply(this,arguments)};function Se(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function s(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(a,s)}c((n=n.apply(t,e||[])).next())})}function Pe(t,e){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function Ce(t,e,r){for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var Ie,Oe,Me=function(t){console.warn(t)},Re=function(t){console.error(t)};function Ne(t){return t.loadTranslations?Ie.CUSTOM:t.cacheUrl?Ie.REMOTE:void 0!==t.cacheUrl&&t.cacheUrl!==B||!t.projectId?Ie.DISABLED:Ie.GT_REMOTE}function Ue(t){return void 0!==t.runtimeUrl&&"https://runtime2.gtx.dev"!==t.runtimeUrl||!t.projectId||!t.devApiKey&&!t.apiKey?t.runtimeUrl?Oe.CUSTOM:Oe.DISABLED:Oe.GT}function Ge(t){return Ne(t)===Ie.GT_REMOTE||Ue(t)===Oe.GT}!function(t){t.GT_REMOTE="gt-remote",t.REMOTE="remote",t.CUSTOM="custom",t.DISABLED="disabled"}(Ie||(Ie={})),function(t){t.GT="gt",t.CUSTOM="custom",t.DISABLED="disabled"}(Oe||(Oe={}));var De=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="fallback-storage-adapter",e.storage={},e}return Le(e,t),e.prototype.getItem=function(t){return this.storage[t]},e.prototype.setItem=function(t,e){this.storage[t]=e},e.prototype.removeItem=function(t){delete this.storage[t]},e}(function(){});function ke(t){var e=this,r=function(t){var e=t.cacheUrl,r=void 0===e?B:e,n=t.projectId,o=t._versionId,i=t._branchId,a=o?"/".concat(o):"",s=i?"?branchId=".concat(i):"";return"".concat(r,"/").concat(n,"/[locale]")+a+s}(t);return function(n){return Se(e,void 0,void 0,function(){var e,o;return Pe(this,function(a){switch(a.label){case 0:return n=i(n,t.customMapping),e=r.replace("[locale]",n),[4,fetch(e)];case 1:if(!(o=a.sent()).ok)throw new Error("Failed to load translations from ".concat(e));return[4,o.json()];case 2:return[2,a.sent()]}})})}}var je=function(){function t(t,e){this.cache={},this.fallbackPromises={},this.cache=structuredClone(t),this.onHit=null==e?void 0:e.onHit,this.onMiss=null==e?void 0:e.onMiss}return t.prototype.setCache=function(t,e){this.cache[t]=e},t.prototype.getCache=function(t){var e=this.genKey(t);return this.cache[e]},t.prototype.getInternalCache=function(){return this.cache},t.prototype.missCache=function(t){return Se(this,void 0,void 0,function(){var e,r,n;return Pe(this,function(o){switch(o.label){case 0:return e=this.genKey(t),void 0===this.fallbackPromises[e]?[3,2]:[4,this.fallbackPromises[e]];case 1:return[2,o.sent()];case 2:r=this.fallback(t),this.fallbackPromises[e]=r,o.label=3;case 3:return o.trys.push([3,,5,6]),[4,r];case 4:return n=o.sent(),this.cache[e]=n,[2,n];case 5:return delete this.fallbackPromises[e],[7];case 6:return[2]}})})},t}(),xe=function(t){function e(e){var r=e.init,n=e.translateMany,o=e.lifecycle,i=t.call(this,r,o)||this;return i._queue=[],i._batchTimer=null,i._activeRequests=0,i._translateMany=n,i}return Le(e,t),e.prototype.get=function(t){var e=this.getCache(t);return null!=e&&this.onHit&&this.onHit({inputKey:t,cacheKey:this.genKey(t),cacheValue:e,outputValue:e}),e},e.prototype.miss=function(t){return Se(this,void 0,void 0,function(){var e;return Pe(this,function(r){switch(r.label){case 0:return[4,this.missCache(t)];case 1:return null!=(e=r.sent())&&this.onMiss&&this.onMiss({inputKey:t,cacheKey:this.genKey(t),cacheValue:e,outputValue:e}),[2,e]}})})},e.prototype.genKey=function(t){return e=t.message,r=t.options,Te(we(we(we(we({source:"ICU"===r.$format?pe(e):e},(null==r?void 0:r.$context)&&{context:r.$context}),(null==r?void 0:r.$id)&&{id:r.$id}),"$maxChars"in r&&null!=r.$maxChars&&{$maxChars:Math.abs(r.$maxChars)}),{dataFormat:r.$format}));var e,r},e.prototype.fallback=function(t){var e=this._enqueueTranslation(t);return this._queue.length>=25?this._flushNow():this._scheduleBatch(),e},e.prototype._flushNow=function(){this._batchTimer&&(clearTimeout(this._batchTimer),this._batchTimer=null),this._drainQueue()},e.prototype._scheduleBatch=function(){var t=this;this._batchTimer||(this._batchTimer=setTimeout(function(){t._batchTimer=null,t._drainQueue()},50))},e.prototype._drainQueue=function(){for(;this._queue.length>0&&this._activeRequests<100;){var t=this._queue.splice(0,25);this._sendBatchRequest(t)}this._queue.length>0&&this._scheduleBatch()},e.prototype._enqueueTranslation=function(t){var e=this,r=this.genKey(t),n=t.options;return new Promise(function(o,i){e._queue.push({key:r,source:t.message,metadata:we(we(we(we({},(null==n?void 0:n.$context)&&{context:n.$context}),(null==n?void 0:n.$id)&&{id:n.$id}),"$maxChars"in n&&null!=n.$maxChars&&{$maxChars:Math.abs(n.$maxChars)}),{dataFormat:n.$format}),resolve:function(t){return o(t)},reject:i})})},e.prototype._sendBatchRequest=function(t){return Se(this,void 0,void 0,function(){var e,r;return Pe(this,function(n){switch(n.label){case 0:return this._activeRequests++,e=function(t){return t.reduce(function(t,e){return t[e.key]={source:e.source,metadata:e.metadata},t},{})}(t),[4,this._sendBatchRequestWithErrorHandling(t,e)];case 1:return(r=n.sent())&&this._handleTranslationResponse(t,r),this._activeRequests--,[2]}})})},e.prototype._sendBatchRequestWithErrorHandling=function(t,e){return Se(this,void 0,void 0,function(){var r,n,o;return Pe(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this._translateMany(e)];case 1:return[2,i.sent()];case 2:for(r=i.sent(),n=0,o=t;n<o.length;n++)o[n].reject(r);return[2,void 0];case 3:return[2]}})})},e.prototype._handleTranslationResponse=function(t,e){for(var r=0,n=t;r<n.length;r++){var o=n[r],i=o.key,a=e[i];if(a&&a.success){var s=a.translation;this.setCache(i,s),o.resolve(s)}else o.reject(null==a?void 0:a.error)}},e}(je),Fe=function(t){function e(e){var r=e.init,n=void 0===r?{}:r,o=e.ttl,i=e.loadTranslations,a=e.createTranslateMany,s=e.lifecycle,c=s.onLocalesCacheHit,u=s.onLocalesCacheMiss,h=s.onTranslationsCacheHit,l=s.onTranslationsCacheMiss,f=t.call(this,n,{onHit:c,onMiss:u})||this;return f.ttl=6e4,f.ttl=null===o?-1:null!=o?o:6e4,f._translationLoader=i,f._createTranslateMany=a,f._onTranslationsCacheHit=h,f._onTranslationsCacheMiss=l,f}return Le(e,t),e.prototype.get=function(t){var e=this.getCache(t);if(e&&!(e.expiresAt>0&&e.expiresAt<Date.now())){var r=e.translationsCache;return null!=r&&this.onHit&&this.onHit({inputKey:t,cacheKey:this.genKey(t),cacheValue:e,outputValue:r}),r}},e.prototype.miss=function(t){return Se(this,void 0,void 0,function(){var e,r;return Pe(this,function(n){switch(n.label){case 0:return[4,this.missCache(t)];case 1:return e=n.sent(),null!=(r=e.translationsCache)&&this.onMiss&&this.onMiss({inputKey:t,cacheKey:this.genKey(t),cacheValue:e,outputValue:r}),[2,r]}})})},e.prototype.genKey=function(t){return t},e.prototype.fallback=function(t){return Se(this,void 0,void 0,function(){var e,r,n,o;return Pe(this,function(i){switch(i.label){case 0:return e=this._translationLoader(t),r=this.ttl<0?this.ttl:Date.now()+this.ttl,n=xe.bind,o={},[4,e];case 1:return[2,{translationsCache:new(n.apply(xe,[void 0,(o.init=i.sent(),o.lifecycle=this._createTranslationsCacheLifecycle(t),o.translateMany=this._createTranslateMany(t),o)])),expiresAt:r}]}})})},e.prototype._createTranslationsCacheLifecycle=function(t){var e=this;return{onHit:this._onTranslationsCacheHit?function(r){return e._onTranslationsCacheHit(we({locale:t},r))}:void 0,onMiss:this._onTranslationsCacheMiss?function(r){return e._onTranslationsCacheMiss(we({locale:t},r))}:void 0}},e}(je);function Ke(t){var e=t.onLocalesCacheHit,r=t.onLocalesCacheMiss,n=t.onTranslationsCacheHit,o=t.onTranslationsCacheMiss;return{onLocalesCacheHit:function(t){null==e||e({locale:t.inputKey,value:t.outputValue.getInternalCache()})},onLocalesCacheMiss:function(t){null==r||r({locale:t.inputKey,value:t.outputValue.getInternalCache()})},onTranslationsCacheHit:function(t){null==n||n({locale:t.locale,hash:t.cacheKey,value:t.outputValue})},onTranslationsCacheMiss:function(t){null==o||o({locale:t.locale,hash:t.cacheKey,value:t.outputValue})}}}var Ve=function(){function t(t){var e,r,i,a,s,c=this;this.resolveTranslationSync=function(t,e){return c.lookupTranslation(t,e)},function(t,e,r){if(void 0===r&&(r=!0),t.forEach(function(t){switch(t.type){case"error":Re(e+t.message);break;case"warning":Me(e+t.message)}}),r&&t.some(function(t){return"error"===t.type}))throw new Error("Validation errors occurred")}(function(t){var e=[];return e.push.apply(e,function(t){var e=[],r=t.projectId,n=t.loadTranslations;switch(Ne(t)){case Ie.REMOTE:case Ie.GT_REMOTE:r||e.push({type:"warning",message:"projectId is required when loading translations from a remote store"});break;case Ie.CUSTOM:n||e.push({type:"error",message:"loadTranslations is required when loading translations from a custom loader"});case Ie.DISABLED:}return e}(t)),e.push.apply(e,function(t){var e=[];switch(Ue(t)){case Oe.CUSTOM:case Oe.GT:t.projectId||e.push({type:"warning",message:"projectId is required"}),t.devApiKey||t.apiKey||e.push({type:"warning",message:"devApiKey or apiKey is required"});case Oe.DISABLED:}return e}(t)),e.push.apply(e,function(t){var e=[];if(!Ge(t))return e;var r=t.defaultLocale,n=t.locales,i=t.customMapping;return new Set(Ce(Ce([],r?[r]:[]),n||[])).forEach(function(t){o(t,i)||e.push({type:"error",message:"Invalid locale: ".concat(t)})}),e}(t)),e}(t),"I18nManager: "),this.config=(a=Ge(i=t),s=function(t){var e=t.defaultLocale,r=t.locales,n=t.customMapping;return{defaultLocale:e,locales:Array.from(new Set(Ce([e],r))),customMapping:n||{}}}({defaultLocale:i.defaultLocale||A,locales:i.locales||[A],customMapping:i.customMapping}),we({environment:i.environment||"production",enableI18n:void 0===i.enableI18n||i.enableI18n,projectId:i.projectId,devApiKey:i.devApiKey,apiKey:i.apiKey,runtimeUrl:i.runtimeUrl,_versionId:i._versionId},a?function(t){var e=n(t.defaultLocale),r=t.locales.map(function(e){var r,o,i,a;return("string"==typeof(null===(r=t.customMapping)||void 0===r?void 0:r[e])?null===(o=t.customMapping)||void 0===o?void 0:o[e]:null===(a=null===(i=t.customMapping)||void 0===i?void 0:i[e])||void 0===a?void 0:a.code)?e:n(e)}),o=Object.fromEntries(Object.entries(t.customMapping||{}).map(function(t){var e=t[0],r=t[1];return[e,"string"==typeof r?n(r):we(we({},r),r.code?{code:n(r.code)}:{})]}));return{defaultLocale:e,locales:r,customMapping:o}}(s):s)),this.storeAdapter=null!==(e=t.storeAdapter)&&void 0!==e?e:new De;var u,h=function(t){return function(t){var e=t.type,r=t.remoteTranslationLoaderParams,n=t.loadTranslations;e===Ie.DISABLED&&Me("I18nManager: No translation loader found. No translations will be loaded.");var o=r.cacheUrl,i=r.projectId,a=r._versionId,s=r._branchId,c=r.customMapping;switch(e){case Ie.REMOTE:case Ie.GT_REMOTE:return ke({cacheUrl:o||"",projectId:i||"",_versionId:a,_branchId:s,customMapping:c});case Ie.CUSTOM:return n;case Ie.DISABLED:return function(){var t=this;return function(e){return Se(t,void 0,void 0,function(){return Pe(this,function(t){return[2,{}]})})}}()}}({loadTranslations:t.loadTranslations,type:Ne(t),remoteTranslationLoaderParams:{cacheUrl:t.cacheUrl,projectId:t.projectId,_versionId:t._versionId,_branchId:t._branchId,customMapping:t.customMapping}})}(t),l=(u=this.getGTClassClean(),function(t){return function(e){return u.translateMany(e,{targetLocale:t},12e3)}});this.localesCache=new Fe({loadTranslations:h,createTranslateMany:l,lifecycle:Ke(null!==(r=t.lifecycle)&&void 0!==r?r:{})})}return t.prototype.getAdapterType=function(){return this.storeAdapter.type},t.prototype.getLocale=function(){return this.storeAdapter.getItem("locale")||(Me("getLocale() invoked outside of translation context, falling back to default locale"),this.config.defaultLocale)},t.prototype.setLocale=function(t){try{this.validateLocale(t);var e=this.getGTClass();this.storeAdapter.setItem("locale",e.determineLocale(t))}catch(t){this.handleError(t)}},t.prototype.getDefaultLocale=function(){return this.config.defaultLocale},t.prototype.getLocales=function(){return this.config.locales},t.prototype.getVersionId=function(){return this.config._versionId},t.prototype.getGTClass=function(){return this.getGTClassClean(this.getLocale())},t.prototype.isTranslationEnabled=function(){return this.config.enableI18n},t.prototype.getTranslationLoader=function(){var t=this;return function(e){return t.loadTranslations(e)}},t.prototype.loadTranslations=function(){return Se(this,arguments,void 0,function(t){var e,r;return void 0===t&&(t=this.getLocale()),Pe(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),this.validateLocale(t),this.requiresTranslation(t)?(e=this.localesCache.get(t))?[3,2]:[4,this.localesCache.miss(t)]:[2,{}];case 1:e=n.sent(),n.label=2;case 2:return[2,e.getInternalCache()];case 3:return r=n.sent(),this.handleError(r),[2,{}];case 4:return[2]}})})},t.prototype.lookupTranslation=function(t,e){var r;try{var n=null!==(r=e.$locale)&&void 0!==r?r:this.getLocale();if(this.validateLocale(n),!this.requiresTranslation(n))return t;var o=this.localesCache.get(n);if(!o)return;return o.get({message:t,options:e})}catch(t){return void this.handleError(t)}},t.prototype.lookupTranslationWithFallback=function(t,e){return Se(this,void 0,void 0,function(){var r,n,o,i,a;return Pe(this,function(s){switch(s.label){case 0:return s.trys.push([0,5,,6]),r=null!==(a=e.$locale)&&void 0!==a?a:this.getLocale(),this.validateLocale(r),this.requiresTranslation(r)?(n=this.localesCache.get(r))?[3,2]:[4,this.localesCache.miss(r)]:[2,t];case 1:n=s.sent(),s.label=2;case 2:return null!=(o=n.get({message:t,options:e}))?[3,4]:[4,n.miss({message:t,options:e})];case 3:o=s.sent(),s.label=4;case 4:return[2,o];case 5:return i=s.sent(),this.handleError(i),[2,void 0];case 6:return[2]}})})},t.prototype.getLookupTranslation=function(){return Se(this,arguments,void 0,function(t,e){var r,n,o;return void 0===t&&(t=this.getLocale()),void 0===e&&(e=[]),Pe(this,function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),this.validateLocale(t),this.requiresTranslation(t)?(r=function(t,e){return t.filter(function(t){return null==t.options.$locale||t.options.$locale===e})}(e,t),r.length!==e.length&&Me("I18nManager: getLookupTranslation(): prefetchEntries must all be the same locale, ignoring all entries that are not for ".concat(t)),(n=this.localesCache.get(t))?[3,2]:[4,this.localesCache.miss(t)]):[2,function(t){return t}];case 1:n=i.sent(),i.label=2;case 2:return n?[4,Promise.all(r.filter(function(t){return null==n.get(t)}).map(function(t){return n.miss(t)}))]:[2,function(){}];case 3:return i.sent(),[2,function(t,e){return n.get({message:t,options:e})}];case 4:return o=i.sent(),this.handleError(o),[2,function(t){return t}];case 5:return[2]}})})},t.prototype.getTranslations=function(){return Se(this,arguments,void 0,function(t){return void 0===t&&(t=this.getLocale()),Pe(this,function(e){try{return this.validateLocale(t),[2,this.loadTranslations(t)]}catch(t){return this.handleError(t),[2,{}]}return[2]})})},t.prototype.getTranslationResolver=function(){return Se(this,arguments,void 0,function(t){return void 0===t&&(t=this.getLocale()),Pe(this,function(e){return[2,this.getLookupTranslation(t)]})})},t.prototype.requiresTranslation=function(t){void 0===t&&(t=this.getLocale());var e=this.getDefaultLocale(),r=this.getGTClass(),n=this.getLocales();return this.isTranslationEnabled()&&r.requiresTranslation(e,t,n)},t.prototype.requiresDialectTranslation=function(t){void 0===t&&(t=this.getLocale());var e=this.getDefaultLocale(),r=this.getGTClass();return this.requiresTranslation(t)&&r.isSameLanguage(e,t)},t.prototype.handleError=function(t){if("development"===this.config.environment)throw t;Re("I18nManager: "+t)},t.prototype.validateLocale=function(t){var e=this.getGTClass();if(!e.isValidLocale(t)||!e.determineLocale(t))throw new Error("I18nManager: validateLocale(): locale ".concat(t," is not valid"))},t.prototype.getGTClassClean=function(t){return new e({sourceLocale:this.config.defaultLocale,targetLocale:t,locales:this.config.locales,customMapping:this.config.customMapping,projectId:this.config.projectId,baseUrl:this.config.runtimeUrl||void 0,apiKey:this.config.apiKey,devApiKey:this.config.devApiKey})},t}(),$e=void 0;function Xe(){return $e||(Me("getI18nManager(): Translation failed because I18nManager not initialized."),$e=new Ve({defaultLocale:A,locales:[A]})),$e}var Ye=function(t){return'String interpolation failed for message: "'.concat(t,'".')};function qe(e,n){var o,i;if(!e)return e;var a=n.$_fallback,s=function(t){return Object.fromEntries(Object.entries(t).filter(function(t){var e=t[0];return"$id"!==e&&"$context"!==e&&"$maxChars"!==e&&"$hash"!==e&&"$_hash"!==e&&"$_source"!==e&&"$_fallback"!==e&&"$format"!==e&&"$_locales"!==e&&"$locale"!==e}))}(n);try{var c=function(t){if(!t.includes(oe))return{};var e=1,r={};return ne({icuString:t,shouldVisit:fe,visitor:function(t){var n;r[t.value+e]=t.options.other.value.length?null===(n=t.options.other.value[0])||void 0===n?void 0:n.value:"",e+=1},options:{recurseIntoVisited:!1}}),r}(a||""),u=function(t,e,n,o){try{return r(t,{variables:e,locales:n,dataFormat:o})}catch(e){return Me(Ye(t)),t}}(Object.keys(c).length?function(t){if(!t.includes(oe))return t;var e=ne({icuString:t,shouldVisit:le,visitor:function(t){t.type=he.TYPE.argument,delete t.options},options:{recurseIntoVisited:!1}});return ge.printAST(e)}(e):e,we(we(we({},s),c),((o={})[oe]="other",o)),null!==(i=n.$locale)&&void 0!==i?i:n.$_locales,n.$format);return t(u,{maxChars:n.$maxChars})}catch(o){return Me(Ye(e)),null!=n.$_fallback?qe(n.$_fallback,we(we({},n),{$_fallback:void 0})):t(e,{maxChars:n.$maxChars})}}function We(t){var e=t.source,r=t.target,n=t.options,o=Xe();return null!=r?Ze(r,we({$locale:o.getLocale(),$_fallback:e},n)):Ze(e,we({$locale:o.getDefaultLocale()},n))}function Ze(e,r){var n;switch(null!==(n=r.$format)&&void 0!==n?n:"STRING"){case"ICU":return qe(e,r);case"I18NEXT":case"STRING":return function(e,r){var n;return t(e,{locales:null!==(n=r.$locale)&&void 0!==n?n:r.$_locales,maxChars:r.$maxChars})}(e,r);default:return e}}function Qe(t,e){return we({$format:e},t)}var Je=function(t,e){return void 0===e&&(e={}),function(t,e){var r=Qe(e,"STRING"),n=Xe().lookupTranslation(t,r);if(null!=n)return We({source:t,target:n,options:r})}(t,we({$format:"ICU"},e))},ze=function(t,e){return void 0===e&&(e={}),function(t,e){var r=Qe(e,"STRING");return We({source:t,target:Xe().lookupTranslation(t,r),options:r})}(t,we({$format:"ICU"},e))};globalThis.t=(t,...e)=>{var r;return"undefined"==typeof window&&console.warn(`gt-react Warning: Translation failed for t("${"string"==typeof(r=t)?r:"`"+(null==r?void 0:r.join("${}"))+"`"}") because it was used outside of a browser environment. Falling back to original message.`),"string"==typeof t?ze(t,e.at(0)):function(t,e){const r=function(t,e){return t.map((t,r)=>{var n;return t+(null!==(n=e[r])&&void 0!==n?n:"")}).join("")}(t,e),n=Je(r);if(n)return n;const{message:o,variables:i}=function(t,e){const r=[],n={};let o=0;for(let i=0;i<t.length;i++)if(r.push(t[i]),i<e.length){const t=o.toString();r.push(`{${t}}`),n[t]=e[i],o++}return{message:r.join(""),variables:n}}(t,e);return ze(o,i)}(t,e)};
1
+ import{formatCutoff as e,formatMessage as t,GT as r,isValidLocale as n,standardizeLocale as o,resolveCanonicalLocale as i}from"generaltranslation";function s(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 r=0;r<e.length;r++)r&&(t+=","),t+=s(e[r])||"null";return t+"]"}const t=Object.keys(e).sort();let r="";for(const n of t){const t=s(e[n]);t&&(r&&(r+=","),r+=JSON.stringify(n)+":"+t)}return"{"+r+"}"}function a(e){return s(e)??""}var c=function(e,t){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},c(e,t)};function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};function u(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function f(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function p(e,t){return function(r,n){t(r,n,e)}}function d(e,t,r,n,o,i){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,c=n.kind,h="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?n.static?e:e.prototype:null,u=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var d={};for(var g in n)d[g]="access"===g?{}:n[g];for(var g in n.access)d.access[g]=n.access[g];d.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(s(e||null))};var m=(0,r[p])("accessor"===c?{get:u.get,set:u.set}:u[h],d);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(a=s(m.get))&&(u.get=a),(a=s(m.set))&&(u.set=a),(a=s(m.init))&&o.unshift(a)}else(a=s(m))&&("field"===c?o.unshift(a):u[h]=a)}l&&Object.defineProperty(l,n.name,u),f=!0}function g(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function m(e){return"symbol"==typeof e?e:"".concat(e)}function y(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function E(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function b(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}c((n=n.apply(e,t||[])).next())})}function _(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}var v=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function T(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||v(t,e,r)}function H(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function B(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function L(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(B(arguments[t]));return e}function w(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n}function A(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function P(e){return this instanceof P?(this.v=e,this):new P(e)}function C(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",function(e){return function(t){return Promise.resolve(t).then(e,h)}}),n[Symbol.asyncIterator]=function(){return this},n;function s(e,t){o[e]&&(n[e]=function(t){return new Promise(function(r,n){i.push([e,t,r,n])>1||a(e,t)})},t&&(n[e]=t(n[e])))}function a(e,t){try{(r=o[e](t)).value instanceof P?Promise.resolve(r.value.v).then(c,h):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function c(e){a("next",e)}function h(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function S(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:P(e[n](t)),done:!1}:o?o(t):t}:o}}function I(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=H(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){(function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)})(n,o,(t=e[r](t)).done,t.value)})}}}function M(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var O=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},R=function(e){return R=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},R(e)};function N(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=R(e),n=0;n<r.length;n++)"default"!==r[n]&&v(t,e,r[n]);return O(t,e),t}function U(e){return e&&e.__esModule?e:{default:e}}function G(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function D(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function k(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 j(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var x="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function F(e){function t(t){e.error=e.hasError?new x(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function o(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(i).then(o,function(e){return t(e),o()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function K(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,r,n,o,i){return r?t?".jsx":".js":!n||o&&i?n+o+"."+i.toLowerCase()+"js":e}):e}var $,V,X,Y={__extends:h,__assign:l,__rest:u,__decorate:f,__param:p,__esDecorate:d,__runInitializers:g,__propKey:m,__setFunctionName:y,__metadata:E,__awaiter:b,__generator:_,__createBinding:v,__exportStar:T,__values:H,__read:B,__spread:L,__spreadArrays:w,__spreadArray:A,__await:P,__asyncGenerator:C,__asyncDelegator:S,__asyncValues:I,__makeTemplateObject:M,__importStar:N,__importDefault:U,__classPrivateFieldGet:G,__classPrivateFieldSet:D,__classPrivateFieldIn:k,__addDisposableResource:j,__disposeResources:F,__rewriteRelativeImportExtension:K},q=Object.freeze({__proto__:null,__addDisposableResource:j,get __assign(){return l},__asyncDelegator:S,__asyncGenerator:C,__asyncValues:I,__await:P,__awaiter:b,__classPrivateFieldGet:G,__classPrivateFieldIn:k,__classPrivateFieldSet:D,__createBinding:v,__decorate:f,__disposeResources:F,__esDecorate:d,__exportStar:T,__extends:h,__generator:_,__importDefault:U,__importStar:N,__makeTemplateObject:M,__metadata:E,__param:p,__propKey:m,__read:B,__rest:u,__rewriteRelativeImportExtension:K,__runInitializers:g,__setFunctionName:y,__spread:L,__spreadArray:A,__spreadArrays:w,__values:H,default:Y});!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"}($||($={})),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"}(V||(V={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(X||(X={}));var W=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Z=/(?:[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 Q(e){var t={};return e.replace(Z,function(e){var r=e.length;switch(e[0]){case"G":t.era=4===r?"long":5===r?"narrow":"short";break;case"y":t.year=2===r?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===r?"long":5===r?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var J=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function z(e){return e.replace(/^(.*?)-/,"")}var ee=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,te=/^(@+)?(\+|#+)?[rs]?$/g,re=/(\*)(0+)|(#+)(0+)|(0+)/g,ne=/^(0+)$/;function oe(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(te,function(e,r,n){return"string"!=typeof n?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):"+"===n?t.minimumSignificantDigits=r.length:"#"===r[0]?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""}),t}function ie(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 se(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if("+!"===r?(t.signDisplay="always",e=e.slice(2)):"+?"===r&&(t.signDisplay="exceptZero",e=e.slice(2)),!ne.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function ae(e){var t=ie(e);return t||{}}function ce(e){for(var t={},r=0,n=e;r<n.length;r++){var o=n[r];switch(o.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=o.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=z(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=l(l(l({},t),{notation:"scientific"}),o.options.reduce(function(e,t){return l(l({},e),ae(t))},{}));continue;case"engineering":t=l(l(l({},t),{notation:"engineering"}),o.options.reduce(function(e,t){return l(l({},e),ae(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(re,function(e,r,n,o,i,s){if(r)t.minimumIntegerDigits=n.length;else{if(o&&i)throw new Error("We currently do not support maximum integer digits");if(s)throw new Error("We currently do not support exact integer digits")}return""});continue}if(ne.test(o.stem))t.minimumIntegerDigits=o.stem.length;else if(ee.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(ee,function(e,r,n,o,i,s){return"*"===n?t.minimumFractionDigits=r.length:o&&"#"===o[0]?t.maximumFractionDigits=o.length:i&&s?(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length+s.length):(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length),""});var i=o.options[0];"w"===i?t=l(l({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=l(l({},t),oe(i)))}else if(te.test(o.stem))t=l(l({},t),oe(o.stem));else{var s=ie(o.stem);s&&(t=l(l({},t),s));var a=se(o.stem);a&&(t=l(l({},t),a))}}return t}var he,le={"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 ue(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r,n=e.language;return"root"!==n&&(r=e.maximize().region),(le[r||""]||le[n||""]||le["".concat(n,"-001")]||le["001"])[0]}var fe=new RegExp("^".concat(W.source,"*")),pe=new RegExp("".concat(W.source,"*$"));function de(e,t){return{start:e,end:t}}var ge=!!String.prototype.startsWith&&"_a".startsWith("a",1),me=!!String.fromCodePoint,ye=!!Object.fromEntries,Ee=!!String.prototype.codePointAt,be=!!String.prototype.trimStart,_e=!!String.prototype.trimEnd,ve=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Te=!0;try{Te="a"===(null===(he=Se("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===he?void 0:he[0])}catch(e){Te=!1}var He,Be=ge?function(e,t,r){return e.startsWith(t,r)}:function(e,t,r){return e.slice(r,r+t.length)===t},Le=me?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r,n="",o=e.length,i=0;o>i;){if((r=e[i++])>1114111)throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},we=ye?Object.fromEntries:function(e){for(var t={},r=0,n=e;r<n.length;r++){var o=n[r],i=o[0],s=o[1];t[i]=s}return t},Ae=Ee?function(e,t){return e.codePointAt(t)}:function(e,t){var r=e.length;if(!(t<0||t>=r)){var n,o=e.charCodeAt(t);return o<55296||o>56319||t+1===r||(n=e.charCodeAt(t+1))<56320||n>57343?o:n-56320+(o-55296<<10)+65536}},Pe=be?function(e){return e.trimStart()}:function(e){return e.replace(fe,"")},Ce=_e?function(e){return e.trimEnd()}:function(e){return e.replace(pe,"")};function Se(e,t){return new RegExp(e,t)}if(Te){var Ie=Se("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");He=function(e,t){var r;return Ie.lastIndex=t,null!==(r=Ie.exec(e)[1])&&void 0!==r?r:""}}else He=function(e,t){for(var r=[];;){var n=Ae(e,t);if(void 0===n||Ne(n)||Ue(n))break;r.push(n),t+=n>=65536?2:1}return Le.apply(void 0,r)};var Me=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,r){for(var n=[];!this.isEOF();){var o=this.char();if(123===o){if((i=this.parseArgument(e,r)).err)return i;n.push(i.val)}else{if(125===o&&e>0)break;if(35!==o||"plural"!==t&&"selectordinal"!==t){if(60===o&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error($.UNMATCHED_CLOSING_TAG,de(this.clonePosition(),this.clonePosition()))}if(60===o&&!this.ignoreTag&&Oe(this.peek()||0)){if((i=this.parseTag(e,t)).err)return i;n.push(i.val)}else{var i;if((i=this.parseLiteral(e,t)).err)return i;n.push(i.val)}}else{var s=this.clonePosition();this.bump(),n.push({type:V.pound,location:de(s,this.clonePosition())})}}}return{val:n,err:null}},e.prototype.parseTag=function(e,t){var r=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:V.literal,value:"<".concat(n,"/>"),location:de(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(e+1,t,!0);if(o.err)return o;var i=o.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Oe(this.char()))return this.error($.INVALID_TAG,de(s,this.clonePosition()));var a=this.clonePosition();return n!==this.parseTagName()?this.error($.UNMATCHED_CLOSING_TAG,de(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:V.tag,value:n,children:i,location:de(r,this.clonePosition())},err:null}:this.error($.INVALID_TAG,de(s,this.clonePosition())))}return this.error($.UNCLOSED_TAG,de(r,this.clonePosition()))}return this.error($.INVALID_TAG,de(r,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&Re(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var r=this.clonePosition(),n="";;){var o=this.tryParseQuote(t);if(o)n+=o;else{var i=this.tryParseUnquoted(e,t);if(i)n+=i;else{var s=this.tryParseLeftAngleBracket();if(!s)break;n+=s}}}var a=de(r,this.clonePosition());return{val:{type:V.literal,value:n,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(Oe(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(39===r){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(r);this.bump()}return Le.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var r=this.char();return 60===r||123===r||35===r&&("plural"===t||"selectordinal"===t)||125===r&&e>0?null:(this.bump(),Le(r))},e.prototype.parseArgument=function(e,t){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error($.EXPECT_ARGUMENT_CLOSING_BRACE,de(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error($.EMPTY_ARGUMENT,de(r,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error($.MALFORMED_ARGUMENT,de(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error($.EXPECT_ARGUMENT_CLOSING_BRACE,de(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:V.argument,value:n,location:de(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error($.EXPECT_ARGUMENT_CLOSING_BRACE,de(r,this.clonePosition())):this.parseArgumentOptions(e,t,n,r);default:return this.error($.MALFORMED_ARGUMENT,de(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),r=He(this.message,t),n=t+r.length;return this.bumpTo(n),{value:r,location:de(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,r,n){var o,i=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(s){case"":return this.error($.EXPECT_ARGUMENT_TYPE,de(i,a));case"number":case"date":case"time":this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition();if((E=this.parseSimpleArgStyleIfPossible()).err)return E;if(0===(d=Ce(E.val)).length)return this.error($.EXPECT_ARGUMENT_STYLE,de(this.clonePosition(),this.clonePosition()));c={style:d,styleLocation:de(h,this.clonePosition())}}if((b=this.tryParseArgumentClose(n)).err)return b;var u=de(n,this.clonePosition());if(c&&Be(null==c?void 0:c.style,"::",0)){var f=Pe(c.style.slice(2));if("number"===s)return(E=this.parseNumberSkeletonFromString(f,c.styleLocation)).err?E:{val:{type:V.number,value:r,location:u,style:E.val},err:null};if(0===f.length)return this.error($.EXPECT_DATE_TIME_SKELETON,u);var p=f;this.locale&&(p=function(e,t){for(var r="",n=0;n<e.length;n++){var o=e.charAt(n);if("j"===o){for(var i=0;n+1<e.length&&e.charAt(n+1)===o;)i++,n++;var s=1+(1&i),a=i<2?1:3+(i>>1),c=ue(t);for("H"!=c&&"k"!=c||(a=0);a-- >0;)r+="a";for(;s-- >0;)r=c+r}else r+="J"===o?"H":o}return r}(f,this.locale));var d={type:X.dateTime,pattern:p,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?Q(p):{}};return{val:{type:"date"===s?V.date:V.time,value:r,location:u,style:d},err:null}}return{val:{type:"number"===s?V.number:"date"===s?V.date:V.time,value:r,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 g=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error($.EXPECT_SELECT_ARGUMENT_OPTIONS,de(g,l({},g)));this.bumpSpace();var m=this.parseIdentifierIfPossible(),y=0;if("select"!==s&&"offset"===m.value){if(!this.bumpIf(":"))return this.error($.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,de(this.clonePosition(),this.clonePosition()));var E;if(this.bumpSpace(),(E=this.tryParseDecimalInteger($.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,$.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return E;this.bumpSpace(),m=this.parseIdentifierIfPossible(),y=E.val}var b,_=this.tryParsePluralOrSelectOptions(e,s,t,m);if(_.err)return _;if((b=this.tryParseArgumentClose(n)).err)return b;var v=de(n,this.clonePosition());return"select"===s?{val:{type:V.select,value:r,options:we(_.val),location:v},err:null}:{val:{type:V.plural,value:r,options:we(_.val),offset:y,pluralType:"plural"===s?"cardinal":"ordinal",location:v},err:null};default:return this.error($.INVALID_ARGUMENT_TYPE,de(i,a))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error($.EXPECT_ARGUMENT_CLOSING_BRACE,de(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error($.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,de(r,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var r=[];try{r=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],r=0,n=e.split(J).filter(function(e){return e.length>0});r<n.length;r++){var o=n[r].split("/");if(0===o.length)throw new Error("Invalid number skeleton");for(var i=o[0],s=o.slice(1),a=0,c=s;a<c.length;a++)if(0===c[a].length)throw new Error("Invalid number skeleton");t.push({stem:i,options:s})}return t}(e)}catch(e){return this.error($.INVALID_NUMBER_SKELETON,t)}return{val:{type:X.number,tokens:r,location:t,parsedOptions:this.shouldParseSkeletons?ce(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,r,n){for(var o,i=!1,s=[],a=new Set,c=n.value,h=n.location;;){if(0===c.length){var l=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var u=this.tryParseDecimalInteger($.EXPECT_PLURAL_ARGUMENT_SELECTOR,$.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;h=de(l,this.clonePosition()),c=this.message.slice(l.offset,this.offset())}if(a.has(c))return this.error("select"===t?$.DUPLICATE_SELECT_ARGUMENT_SELECTOR:$.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);"other"===c&&(i=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?$.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:$.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,de(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(e+1,t,r);if(p.err)return p;var d=this.tryParseArgumentClose(f);if(d.err)return d;s.push([c,{value:p.val,location:de(f,this.clonePosition())}]),a.add(c),this.bumpSpace(),c=(o=this.parseIdentifierIfPossible()).value,h=o.location}return 0===s.length?this.error("select"===t?$.EXPECT_SELECT_ARGUMENT_SELECTOR:$.EXPECT_PLURAL_ARGUMENT_SELECTOR,de(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error($.MISSING_OTHER_CLAUSE,de(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,i=0;!this.isEOF();){var s=this.char();if(!(s>=48&&s<=57))break;o=!0,i=10*i+(s-48),this.bump()}var a=de(n,this.clonePosition());return o?ve(i*=r)?{val:i,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=Ae(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(Be(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),r=this.message.indexOf(e,t);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Ne(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),r=this.message.charCodeAt(t+(e>=65536?2:1));return null!=r?r:null},e}();function Oe(e){return e>=97&&e<=122||e>=65&&e<=90}function Re(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 Ne(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function Ue(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 Ge(e){e.forEach(function(e){if(delete e.location,function(e){return e.type===V.select}(e)||function(e){return e.type===V.plural}(e))for(var t in e.options)delete e.options[t].location,Ge(e.options[t].value);else(function(e){return e.type===V.number})(e)&&function(e){return!(!e||"object"!=typeof e||e.type!==X.number)}(e.style)?delete e.style.location:!function(e){return e.type===V.date}(e)&&!function(e){return e.type===V.time}(e)||!function(e){return!(!e||"object"!=typeof e||e.type!==X.dateTime)}(e.style)?function(e){return e.type===V.tag}(e)&&Ge(e.children):delete e.style.location})}function De(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){var r=!1;try{r=this instanceof e}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var ke,je={};function xe(){if(ke)return je;var e,t;return ke=1,Object.defineProperty(je,"__esModule",{value:!0}),je.SKELETON_TYPE=je.TYPE=void 0,je.isLiteralElement=function(t){return t.type===e.literal},je.isArgumentElement=function(t){return t.type===e.argument},je.isNumberElement=function(t){return t.type===e.number},je.isDateElement=function(t){return t.type===e.date},je.isTimeElement=function(t){return t.type===e.time},je.isSelectElement=function(t){return t.type===e.select},je.isPluralElement=function(t){return t.type===e.plural},je.isPoundElement=function(t){return t.type===e.pound},je.isTagElement=function(t){return t.type===e.tag},je.isNumberSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.number)},je.isDateTimeSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==t.dateTime)},je.createLiteralElement=function(t){return{type:e.literal,value:t}},je.createNumberElement=function(t,r){return{type:e.number,value:t,style:r}},function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(e||(je.TYPE=e={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(t||(je.SKELETON_TYPE=t={})),je}var Fe,Ke=xe(),$e={},Ve=De(q);var Xe=function(){if(Fe)return $e;Fe=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.printAST=r,$e.doPrintAST=n,$e.printDateTimeSkeleton=s;var e=Ve,t=xe();function r(e){return n(e,!1)}function n(a,c){var h=a.map(function(h,l){return(0,t.isLiteralElement)(h)?function(e,t,r,n){var i=e.value,s=i;r||"'"!==s[0]||(s="''".concat(s.slice(1)));n||"'"!==s[s.length-1]||(s="".concat(s.slice(0,s.length-1),"''"));return s=o(s),t?s.replace("#","'#'"):s}(h,c,0===l,l===a.length-1):(0,t.isArgumentElement)(h)?function(e){var t=e.value;return"{".concat(t,"}")}(h):(0,t.isDateElement)(h)||(0,t.isTimeElement)(h)||(0,t.isNumberElement)(h)?function(e){return"{".concat(e.value,", ").concat(t.TYPE[e.type]).concat(e.style?", ".concat((r=e.style,"string"==typeof r?o(r):r.type===t.SKELETON_TYPE.dateTime?"::".concat(s(r)):"::".concat(r.tokens.map(i).join(" ")))):"","}");var r}(h):(0,t.isPluralElement)(h)?function(t){var r="cardinal"===t.pluralType?"plural":"selectordinal",o=[t.value,r,e.__spreadArray([t.offset?"offset:".concat(t.offset):""],Object.keys(t.options).map(function(e){return"".concat(e,"{").concat(n(t.options[e].value,!0),"}")}),!0).filter(Boolean).join(" ")].join(",");return"{".concat(o,"}")}(h):(0,t.isSelectElement)(h)?function(e){var t=[e.value,"select",Object.keys(e.options).map(function(t){return"".concat(t,"{").concat(n(e.options[t].value,!1),"}")}).join(" ")].join(",");return"{".concat(t,"}")}(h):(0,t.isPoundElement)(h)?"#":(0,t.isTagElement)(h)?function(e){return"<".concat(e.value,">").concat(r(e.children),"</").concat(e.value,">")}(h):void 0});return h.join("")}function o(e){return e.replace(/([{}](?:[\s\S]*[{}])?)/,"'$1'")}function i(e){var t=e.stem,r=e.options;return 0===r.length?t:"".concat(t).concat(r.map(function(e){return"/".concat(e)}).join(""))}function s(e){return e.pattern}return $e}();function Ye(e,t,r=""){const n=(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(!n||void 0!==t){const t=(r&&`"${r}" `)+"expected Uint8Array"+""+", got "+(n?`length=${i}`:"type="+typeof e);if(!n)throw new TypeError(t);throw new RangeError(t)}return e}function qe(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 We(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Ze(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Qe(e,t){return e<<32-t|e>>>t}const Je=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),ze=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function et(e,t={}){const r=(t,r)=>e(r).update(t).digest(),n=e(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.canXOF=n.canXOF,r.create=t=>e(t),Object.assign(r,t),Object.freeze(r)}const tt=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function rt(e,t,r){return e&t^~e&r}function nt(e,t,r){return e&t^e&r^t&r}class ot{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,r,n){this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(e),this.view=Ze(this.buffer)}update(e){qe(this),Ye(e);const{view:t,buffer:r,blockLen:n}=this,o=e.length;for(let i=0;i<o;){const s=Math.min(n-this.pos,o-i);if(s===n){const t=Ze(e);for(;n<=o-i;i+=n)this.process(t,i);continue}r.set(e.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){qe(this),function(e,t){Ye(e,void 0,"digestInto() output");const r=t.outputLen;if(e.length<r)throw new RangeError('"digestInto() output" expected to be of length >='+r)}(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:i}=this;t[i++]=128,We(this.buffer.subarray(i)),this.padOffset>n-i&&(this.process(r,0),i=0);for(let e=i;e<n;e++)t[e]=0;r.setBigUint64(n-8,BigInt(8*this.length),o),this.process(r,0);const s=Ze(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=a/4,h=this.get();if(c>h.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)s.setUint32(4*e,h[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||=new this.constructor,e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:i,pos:s}=this;return e.destroyed=i,e.finished=o,e.length=n,e.pos=s,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}const it=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),st=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]),at=new Uint32Array(64);class ct extends ot{constructor(e){super(64,e,8,!1)}get(){const{A:e,B:t,C:r,D:n,E:o,F:i,G:s,H:a}=this;return[e,t,r,n,o,i,s,a]}set(e,t,r,n,o,i,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|i,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)at[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=at[e-15],r=at[e-2],n=Qe(t,7)^Qe(t,18)^t>>>3,o=Qe(r,17)^Qe(r,19)^r>>>10;at[e]=o+at[e-7]+n+at[e-16]|0}let{A:r,B:n,C:o,D:i,E:s,F:a,G:c,H:h}=this;for(let e=0;e<64;e++){const t=h+(Qe(s,6)^Qe(s,11)^Qe(s,25))+rt(s,a,c)+st[e]+at[e]|0,l=(Qe(r,2)^Qe(r,13)^Qe(r,22))+nt(r,n,o)|0;h=c,c=a,a=s,s=i+t|0,i=o,o=n,n=r,r=t+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,i=i+this.D|0,s=s+this.E|0,a=a+this.F|0,c=c+this.G|0,h=h+this.H|0,this.set(r,n,o,i,s,a,c,h)}roundClean(){We(at)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),We(this.buffer)}}class ht extends ct{A=0|it[0];B=0|it[1];C=0|it[2];D=0|it[3];E=0|it[4];F=0|it[5];G=0|it[6];H=0|it[7];constructor(){super(32)}}const lt=et(()=>new ht,tt(1)),ut="en",ft="https://cdn.gtx.dev";function pt({icuString:e,shouldVisit:t,visitor:r,options:{recurseIntoVisited:n=!0,...o}}){const i=function(e,t){void 0===t&&(t={}),t=l({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Me(e,t).parse();if(r.err){var n=SyntaxError($[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return(null==t?void 0:t.captureLocation)||Ge(r.val),r.val}(e,o);return s(i),i;function s(e){e.map(a)}function a(e){let o=!1;t(e)&&(r(e),o=!0),o&&!n||(e.type===V.select||e.type===V.plural?Object.values(e.options).map(e=>e.value).map(s):e.type===V.tag&&s(e.children))}}const dt="_gt_",gt=new RegExp(`^${dt}\\d+$`),mt=new RegExp(`^${dt}$`);function yt(e){return e.type===Ke.TYPE.select&&gt.test(e.value)&&!!e.options.other&&(0===e.options.other.value.length||e.options.other.value.length>0&&e.options.other.value[0]?.type===Ke.TYPE.literal)}function Et(e){return e.type===Ke.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===Ke.TYPE.literal)}function bt(e){if(!e.includes("_gt_"))return e;const t=[];pt({icuString:e,shouldVisit:Et,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 r=[];let n=0;for(let o=0;o<t.length;o++){const{start:i,end:s,otherStart:a,otherEnd:c}=t[o];r.push(e.slice(n,i)),r.push(e.slice(i,i+4+1)),r.push(String(o+1)),r.push(e.slice(i+4+1,a)),r.push("{}"),r.push(e.slice(c,s)),n=s}return r.push(e.slice(n,e.length)),r.join("")}var _t={warn(e){console.warn(e)},error(e){console.error(e)},info(e){console.info(e)},debug(e){console.debug(e)}};const vt=e=>`String interpolation failed for message: "${e}".`;function Tt(r,n){if(!r)return r;const o=n.$_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))}(n);try{const a=function(e){if(!e.includes("_gt_"))return{};let t=1;const r={};return pt({icuString:e,shouldVisit:Et,visitor:function(e){r[e.value+t]=e.options.other.value.length?e.options.other.value[0]?.value:"",t+=1},options:{recurseIntoVisited:!1}}),r}(o||"");return e(function(e,r,n,o){try{return t(e,{variables:r,locales:n,dataFormat:o})}catch{return _t.warn(vt(e)),e}}(Object.keys(a).length?(s=r).includes("_gt_")?Xe.printAST(pt({icuString:s,shouldVisit:yt,visitor:function(e){e.type=Ke.TYPE.argument,delete e.options},options:{recurseIntoVisited:!1}})):s:r,{...i,...a,[dt]:"other"},n.$locale??n.$_locales,n.$format),{maxChars:n.$maxChars})}catch{return _t.warn(vt(r)),null!=n.$_fallback?Tt(n.$_fallback,{...n,$_fallback:void 0}):e(r,{maxChars:n.$maxChars})}var s}function Ht(e){return function(e){if(Ye(e),Je)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=ze[e[r]];return t}(lt(function(e){if("string"!=typeof e)throw new TypeError("string expected");return new Uint8Array((new TextEncoder).encode(e))}(e))).slice(0,16)}const Bt=e=>{if(e&&"object"==typeof e){const t={};if("c"in e&&e.c&&(t.c=Lt(e.c)),"d"in e){const r=e?.d;r?.b&&(t.b=Object.fromEntries(Object.entries(r.b).map(([e,t])=>[e,Lt(t)]))),r?.t&&(t.t=r.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 Lt(e){return Array.isArray(e)?e.map(Bt):Bt(e)}function wt(e){return e.loadTranslations?"custom":e.cacheUrl?"remote":void 0!==e.cacheUrl&&e.cacheUrl!==ft||!e.projectId?"disabled":"gt-remote"}function At(e){return void 0!==e.runtimeUrl&&"https://runtime2.gtx.dev"!==e.runtimeUrl||!e.projectId||!e.devApiKey&&!e.apiKey?e.runtimeUrl?"custom":"disabled":"gt"}function Pt(e){return"gt-remote"===wt(e)||"gt"===At(e)}function Ct(e){const t=[];return t.push(...function(e){const t=[],{projectId:r,loadTranslations:n}=e;switch(wt(e)){case"remote":case"gt-remote":r||t.push({type:"warning",message:"projectId is required when loading translations from a remote store"});break;case"custom":n||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(At(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(!Pt(e))return t;const{defaultLocale:r,locales:o,customMapping:i}=e;return new Set([...r?[r]:[],...o||[]]).forEach(e=>{n(e,i)||t.push({type:"error",message:`Invalid locale: ${e}`})}),t}(e)),t}var St=class{};var It=class extends St{constructor(...e){super(...e),this.type="fallback-storage-adapter",this.storage={}}getItem(e){return this.storage[e]}setItem(e,t){this.storage[e]=t}removeItem(e){delete this.storage[e]}};function Mt(e){const t=function(e){const{cacheUrl:t=ft,projectId:r,_versionId:n,_branchId:o}=e;return`${t}/${r}/[locale]`+(n?`/${n}`:"")+(o?`?branchId=${o}`:"")}(e);return async r=>{r=i(r,e.customMapping);const n=t.replace("[locale]",r),o=await fetch(n);if(!o.ok)throw new Error(`Failed to load translations from ${n}`);return await o.json()}}var Ot=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 r=this.fallback(e);this.fallbackPromises[t]=r;try{const e=await r;return this.cache[t]=e,e}finally{delete this.fallbackPromises[t]}}};function Rt(e,t){return function({source:e,context:t,id:r,maxChars:n,dataFormat:o},i=Ht){let s;return s="JSX"===o?Lt(e):e,i(a({source:s,...r&&{id:r},...t&&{context:t},...null!=n&&{maxChars:Math.abs(n)},...o&&{dataFormat:o}}))}({source:"ICU"===t.$format?bt(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})}var Nt=class extends Ot{constructor({init:e,translateMany:t,lifecycle:r}){super(e,r),this._queue=[],this._batchTimer=null,this._activeRequests=0,this._translateMany=t}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 Rt(e.message,e.options)}fallback(e){const t=this._enqueueTranslation(e);return this._queue.length>=25?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()},50))}_drainQueue(){for(;this._queue.length>0&&this._activeRequests<100;){const e=this._queue.splice(0,25);this._sendBatchRequest(e)}this._queue.length>0&&this._scheduleBatch()}_enqueueTranslation(e){const t=this.genKey(e),r=e.options;return new Promise((n,o)=>{this._queue.push({key:t,source:e.message,metadata:{...r?.$context&&{context:r.$context},...r?.$id&&{id:r.$id},..."$maxChars"in r&&null!=r.$maxChars&&{$maxChars:Math.abs(r.$maxChars)},dataFormat:r.$format},resolve:e=>n(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),r=await this._sendBatchRequestWithErrorHandling(e,t);r&&this._handleTranslationResponse(e,r),this._activeRequests--}async _sendBatchRequestWithErrorHandling(e,t){try{return await this._translateMany(t)}catch(t){for(const r of e)r.reject(t);return}}_handleTranslationResponse(e,t){for(const r of e){const{key:e}=r,n=t[e];if(n&&n.success){const t=n.translation;this.setCache(e,t),r.resolve(t)}else r.reject(n?.error)}}};var Ut=class extends Ot{constructor({init:e={},ttl:t,loadTranslations:r,createTranslateMany:n,lifecycle:{onLocalesCacheHit:o,onLocalesCacheMiss:i,onTranslationsCacheHit:s,onTranslationsCacheMiss:a}}){super(e,{onHit:o,onMiss:i}),this.ttl=6e4,this.ttl=null===t?-1:t??6e4,this._translationLoader=r,this._createTranslateMany=n,this._onTranslationsCacheHit=s,this._onTranslationsCacheMiss=a}get(e){const t=this.getCache(e);if(!t||t.expiresAt>0&&t.expiresAt<Date.now())return;const r=t.translationsCache;return null!=r&&this.onHit&&this.onHit({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:r}),r}async miss(e){const t=await this.missCache(e),r=t.translationsCache;return null!=r&&this.onMiss&&this.onMiss({inputKey:e,cacheKey:this.genKey(e),cacheValue:t,outputValue:r}),r}genKey(e){return e}async fallback(e){const t=this._translationLoader(e),r=this.ttl<0?this.ttl:Date.now()+this.ttl;return{translationsCache:new Nt({init:await t,lifecycle:this._createTranslationsCacheLifecycle(e),translateMany:this._createTranslateMany(e)}),expiresAt:r}}_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 Gt({onLocalesCacheHit:e,onLocalesCacheMiss:t,onTranslationsCacheHit:r,onTranslationsCacheMiss:n}){return{onLocalesCacheHit:t=>{e?.({locale:t.inputKey,value:t.outputValue.getInternalCache()})},onLocalesCacheMiss:e=>{t?.({locale:e.inputKey,value:e.outputValue.getInternalCache()})},onTranslationsCacheHit:e=>{r?.({locale:e.locale,hash:e.cacheKey,value:e.outputValue})},onTranslationsCacheMiss:e=>{n?.({locale:e.locale,hash:e.cacheKey,value:e.outputValue})}}}var Dt=class{constructor(e){this.resolveTranslationSync=(e,t)=>this.lookupTranslation(e,t),function(e,t="",r=!0){if(e.forEach(e=>{switch(e.type){case"error":_t.error(t+e.message);break;case"warning":_t.warn(t+e.message)}}),r&&e.some(e=>"error"===e.type))throw new Error("Validation errors occurred")}(Ct(e),"I18nManager: "),this.config=function(e){const t=Pt(e),r=function({defaultLocale:e,locales:t,customMapping:r}){return{defaultLocale:e,locales:Array.from(new Set([e,...t])),customMapping:r||{}}}({defaultLocale:e.defaultLocale||ut,locales:e.locales||[ut],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,_versionId:e._versionId,...t?kt(r):r}}(e),this.storeAdapter=e.storeAdapter??new It;const t=function(e){return function({type:e,remoteTranslationLoaderParams:t,loadTranslations:r}){"disabled"===e&&_t.warn("I18nManager: No translation loader found. No translations will be loaded.");const{cacheUrl:n,projectId:o,_versionId:i,_branchId:s,customMapping:a}=t;switch(e){case"remote":case"gt-remote":return Mt({cacheUrl:n||"",projectId:o||"",_versionId:i,_branchId:s,customMapping:a});case"custom":return r;case"disabled":return async e=>({})}}({loadTranslations:e.loadTranslations,type:wt(e),remoteTranslationLoaderParams:{cacheUrl:e.cacheUrl,projectId:e.projectId,_versionId:e._versionId,_branchId:e._branchId,customMapping:e.customMapping}})}(e),r=(n=this.getGTClassClean(),o=12e3,e=>t=>n.translateMany(t,{targetLocale:e},o));var n,o;this.localesCache=new Ut({loadTranslations:t,createTranslateMany:r,lifecycle:Gt(e.lifecycle??{})})}getAdapterType(){return this.storeAdapter.type}getLocale(){const e=this.storeAdapter.getItem("locale");return e||(_t.warn("getLocale() invoked outside of translation context, falling back to default locale"),this.config.defaultLocale)}setLocale(e){try{this.validateLocale(e);const t=this.getGTClass();this.storeAdapter.setItem("locale",t.determineLocale(e))}catch(e){this.handleError(e)}}getDefaultLocale(){return this.config.defaultLocale}getLocales(){return this.config.locales}getVersionId(){return this.config._versionId}getGTClass(){return this.getGTClassClean(this.getLocale())}isTranslationEnabled(){return this.config.enableI18n}getTranslationLoader(){return e=>this.loadTranslations(e)}async loadTranslations(e=this.getLocale()){try{if(this.validateLocale(e),!this.requiresTranslation(e))return{};let t=this.localesCache.get(e);return t||(t=await this.localesCache.miss(e)),t.getInternalCache()}catch(e){return this.handleError(e),{}}}lookupTranslation(e,t){try{const r=t.$locale??this.getLocale();if(this.validateLocale(r),!this.requiresTranslation(r))return e;const n=this.localesCache.get(r);if(!n)return;return n.get({message:e,options:t})}catch(e){return void this.handleError(e)}}async lookupTranslationWithFallback(e,t){try{const r=t.$locale??this.getLocale();if(this.validateLocale(r),!this.requiresTranslation(r))return e;let n=this.localesCache.get(r);n||(n=await this.localesCache.miss(r));let o=n.get({message:e,options:t});return null==o&&(o=await n.miss({message:e,options:t})),o}catch(e){return void this.handleError(e)}}async getLookupTranslation(e=this.getLocale(),t=[]){try{if(this.validateLocale(e),!this.requiresTranslation(e))return e=>e;const r=function(e,t){return e.filter(e=>null==e.options.$locale||e.options.$locale===t)}(t,e);r.length!==t.length&&_t.warn(`I18nManager: getLookupTranslation(): prefetchEntries must all be the same locale, ignoring all entries that are not for ${e}`);let n=this.localesCache.get(e);return n||(n=await this.localesCache.miss(e)),n?(await Promise.all(r.filter(e=>null==n.get(e)).map(e=>n.miss(e))),(e,t)=>n.get({message:e,options:t})):()=>{}}catch(e){return this.handleError(e),e=>e}}async getTranslations(e=this.getLocale()){try{return this.validateLocale(e),this.loadTranslations(e)}catch(e){return this.handleError(e),{}}}async getTranslationResolver(e=this.getLocale()){return this.getLookupTranslation(e)}requiresTranslation(e=this.getLocale()){const t=this.getDefaultLocale(),r=this.getGTClass(),n=this.getLocales();return this.isTranslationEnabled()&&r.requiresTranslation(t,e,n)}requiresDialectTranslation(e=this.getLocale()){const t=this.getDefaultLocale(),r=this.getGTClass();return this.requiresTranslation(e)&&r.isSameLanguage(t,e)}handleError(e){if("development"===this.config.environment)throw e;_t.error("I18nManager: "+e)}validateLocale(e){const t=this.getGTClass();if(!t.isValidLocale(e)||!t.determineLocale(e))throw new Error(`I18nManager: validateLocale(): locale ${e} is not valid`)}getGTClassClean(e){return new r({sourceLocale:this.config.defaultLocale,targetLocale:e,locales:this.config.locales,customMapping:this.config.customMapping,projectId:this.config.projectId,baseUrl:this.config.runtimeUrl||void 0,apiKey:this.config.apiKey,devApiKey:this.config.devApiKey})}};function kt(e){return{defaultLocale:o(e.defaultLocale),locales:e.locales.map(t=>("string"==typeof e.customMapping?.[t]?e.customMapping?.[t]:e.customMapping?.[t]?.code)?t:o(t)),customMapping:Object.fromEntries(Object.entries(e.customMapping||{}).map(([e,t])=>[e,"string"==typeof t?o(t):{...t,...t.code?{code:o(t.code)}:{}}]))}}let jt;function xt(){return jt||(_t.warn("getI18nManager(): Translation failed because I18nManager not initialized."),jt=new Dt({defaultLocale:ut,locales:[ut]})),jt}function Ft({source:e,target:t,options:r}){const n=xt();return null!=t?Kt(t,{$locale:n.getLocale(),$_fallback:e,...r}):Kt(e,{$locale:n.getDefaultLocale(),...r})}function Kt(t,r){switch(r.$format??"STRING"){case"ICU":return Tt(t,r);case"I18NEXT":case"STRING":return function(t,r){return e(t,{locales:r.$locale??r.$_locales,maxChars:r.$maxChars})}(t,r);default:return t}}function $t(e,t){return{$format:t,...e}}const Vt=(e,t={})=>function(e,t){const r=$t(t,"STRING"),n=xt().lookupTranslation(e,r);if(null!=n)return Ft({source:e,target:n,options:r})}(e,{$format:"ICU",...t}),Xt=(e,t={})=>function(e,t){const r=$t(t,"STRING");return Ft({source:e,target:xt().lookupTranslation(e,r),options:r})}(e,{$format:"ICU",...t});globalThis.t=(e,...t)=>{var r;return"undefined"==typeof window&&console.warn(`gt-react 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?Xt(e,t.at(0)):function(e,t){const r=function(e,t){return e.map((e,r)=>{var n;return e+(null!==(n=t[r])&&void 0!==n?n:"")}).join("")}(e,t),n=Vt(r);if(n)return n;const{message:o,variables:i}=function(e,t){const r=[],n={};let o=0;for(let i=0;i<e.length;i++)if(r.push(e[i]),i<t.length){const e=o.toString();r.push(`{${e}}`),n[e]=t[i],o++}return{message:r.join(""),variables:n}}(e,t);return Xt(o,i)}(e,t)};
2
2
  //# sourceMappingURL=macros.esm.min.mjs.map