UNPKG

obs-webrtc-server

Version:

Web server allowing browsers connected to it to share their camera/microphone/screen, which are automatically added as sources in OBS Studio and can be recorded individually.

1 lines 155 kB
var ea=Object.defineProperty;var ta=(e,t,n)=>t in e?ea(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ye=(e,t,n)=>(ta(e,typeof t!="symbol"?t+"":t,n),n),Jn=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var U=(e,t,n)=>(Jn(e,t,"read from private field"),n?n.call(e):t.get(e)),le=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},me=(e,t,n,i)=>(Jn(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);var Tr=(e,t,n,i)=>({set _(r){me(e,t,r,n)},get _(){return U(e,t,i)}}),_e=(e,t,n)=>(Jn(e,t,"access private method"),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();const na="Audio delay: {delay} ms",ia="Audio device:",ra="Audio device {num}",oa="{size} B",sa="Connection...",aa="Default",la="Default",ua="Disconnected!",fa="Recording on the emitter",ca="Exit full screen",ha="Full screen",da="{size} GB",ma="{value} h",va="{size} kB",pa="Live",ga="{size} MB",_a="{value} min",ba="No audio",ya="No video",wa="Persistent storage",Ea="Recording on the receiver",Sa="Recording",Aa="Round trip time: {value} ms",Ta="Save",Ia="{value} s",Da="Share screen",Ca="Share video/audio devices",Oa="{usage} / {quota} used",Ha="Stop sharing",Pa="Switch to full screen",Na="Video delay: {delay} ms",Ra="Video device:",La="Video device {num}",Ma="Volatile storage",Ba={audioDelay:na,audioDevice:ia,audioDeviceNum:ra,byte:oa,connecting:sa,defaultAudioDevice:aa,defaultVideoDevice:la,delete:"Delete",disconnected:ua,emitterRecording:fa,exitFullScreen:ca,fullScreen:ha,gigabyte:da,hours:ma,kilobyte:va,live:pa,megabyte:ga,minutes:_a,noAudio:ba,noVideo:ya,persistentStorage:wa,receiverRecording:Ea,recording:Sa,roundTripTime:Aa,save:Ta,seconds:Ia,shareScreen:Da,shareVideoAudioDevices:Ca,spaceAvailable:Oa,stopSharing:Ha,switchToFullScreen:Pa,videoDelay:Na,videoDevice:Ra,videoDeviceNum:La,volatileStorage:Ma},ka="Retardo de audio: {delay} ms",xa="Dispositivo de audio:",Ua="Dispositivo de audio {num}",za="{size} B",Fa="Conexión...",$a="Por defecto",Ga="Por defecto",Va="¡Desconectado!",ja="Grabación en el emisor",Xa="Salir de la pantalla completa",qa="Pantalla completa",Wa="{size} GB",Za="{value} h",Ja="{size} kB",Ya="En directo",Qa="{size} MB",Ka="{value} min",el="Sin audio",tl="Sin video",nl="Almacenamiento persistente",il="Grabación en el receptor",rl="Grabación",ol="Tiempo de ida y vuelta: {value} ms",sl="Guardar",al="{value} s",ll="Compartir pantalla",ul="Compartir dispositivos de video/audio",fl="{usage} / {quota} utilizados",cl="Deja de compartir",hl="Pasar a pantalla completa",dl="Retraso de video: {delay} ms",ml="Dispositivo de vídeo:",vl="Dispositivo de vídeo {num}",pl="Almacenamiento volátil",gl={audioDelay:ka,audioDevice:xa,audioDeviceNum:Ua,byte:za,connecting:Fa,defaultAudioDevice:$a,defaultVideoDevice:Ga,delete:"Borrar",disconnected:Va,emitterRecording:ja,exitFullScreen:Xa,fullScreen:qa,gigabyte:Wa,hours:Za,kilobyte:Ja,live:Ya,megabyte:Qa,minutes:Ka,noAudio:el,noVideo:tl,persistentStorage:nl,receiverRecording:il,recording:rl,roundTripTime:ol,save:sl,seconds:al,shareScreen:ll,shareVideoAudioDevices:ul,spaceAvailable:fl,stopSharing:cl,switchToFullScreen:hl,videoDelay:dl,videoDevice:ml,videoDeviceNum:vl,volatileStorage:pl},_l="Délai audio: {delay} ms",bl="Périphérique audio:",yl="Périphérique audio {num}",wl="{size} o",El="Connexion...",Sl="Par défaut",Al="Par défaut",Tl="Déconnecté!",Il="Enregistrement sur l'émetteur",Dl="Quitter le plein écran",Cl="Plein écran",Ol="{size} Go",Hl="{value} h",Pl="{size} ko",Nl="En direct",Rl="{size} Mo",Ll="{value} min",Ml="Pas de son",Bl="Pas de vidéo",kl="Stockage persistant",xl="Enregistrement sur le récepteur",Ul="Enregistrement",zl="Temps aller-retour : {value} ms",Fl="Sauvegarder",$l="{value} s",Gl="Partager l'écran",Vl="Partager les périphériques vidéo/audio",jl="{usage} / {quota} utilisés",Xl="Arrêter de partager",ql="Passer en plein écran",Wl="Délai vidéo: {delay} ms",Zl="Périphérique vidéo:",Jl="Périphérique vidéo {num}",Yl="Stockage volatil",Ql={audioDelay:_l,audioDevice:bl,audioDeviceNum:yl,byte:wl,connecting:El,defaultAudioDevice:Sl,defaultVideoDevice:Al,delete:"Supprimer",disconnected:Tl,emitterRecording:Il,exitFullScreen:Dl,fullScreen:Cl,gigabyte:Ol,hours:Hl,kilobyte:Pl,live:Nl,megabyte:Rl,minutes:Ll,noAudio:Ml,noVideo:Bl,persistentStorage:kl,receiverRecording:xl,recording:Ul,roundTripTime:zl,save:Fl,seconds:$l,shareScreen:Gl,shareVideoAudioDevices:Vl,spaceAvailable:jl,stopSharing:Xl,switchToFullScreen:ql,videoDelay:Wl,videoDevice:Zl,videoDeviceNum:Jl,volatileStorage:Yl};function Z(){}function Kl(e,t){for(const n in t)e[n]=t[n];return e}function Fo(e){return e()}function Ir(){return Object.create(null)}function xe(e){e.forEach(Fo)}function gt(e){return typeof e=="function"}function pe(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function eu(e){return Object.keys(e).length===0}function $o(e,...t){if(e==null){for(const i of t)i(void 0);return Z}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ie(e,t,n){e.$$.on_destroy.push($o(t,n))}function ai(e,t,n,i){if(e){const r=Go(e,t,n,i);return e[0](r)}}function Go(e,t,n,i){return e[1]&&i?Kl(n.ctx.slice(),e[1](i(t))):n.ctx}function li(e,t,n,i){if(e[2]&&i){const r=e[2](i(n));if(t.dirty===void 0)return r;if(typeof r=="object"){const o=[],s=Math.max(t.dirty.length,r.length);for(let a=0;a<s;a+=1)o[a]=t.dirty[a]|r[a];return o}return t.dirty|r}return t.dirty}function ui(e,t,n,i,r,o){if(r){const s=Go(t,n,i,o);e.p(s,r)}}function fi(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let i=0;i<n;i++)t[i]=-1;return t}return-1}function tu(e){return e&&gt(e.destroy)?e.destroy:Z}function v(e,t){e.appendChild(t)}function A(e,t,n){e.insertBefore(t,n||null)}function S(e){e.parentNode&&e.parentNode.removeChild(e)}function Wt(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function w(e){return document.createElement(e)}function nu(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function L(e){return document.createTextNode(e)}function k(){return L(" ")}function we(){return L("")}function ce(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function Ft(e){return function(t){return t.preventDefault(),e.call(this,t)}}function y(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function iu(e){return Array.from(e.childNodes)}function F(e,t){t=""+t,e.data!==t&&(e.data=t)}function nt(e,t){e.value=t??""}function un(e,t,n){for(let i=0;i<e.options.length;i+=1){const r=e.options[i];if(r.__value===t){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Dr(e){const t=e.querySelector(":checked");return t&&t.__value}class ke{constructor(t=!1){Ye(this,"is_svg",!1);Ye(this,"e");Ye(this,"n");Ye(this,"t");Ye(this,"a");this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,n,i=null){this.e||(this.is_svg?this.e=nu(n.nodeName):this.e=w(n.nodeType===11?"TEMPLATE":n.nodeName),this.t=n.tagName!=="TEMPLATE"?n:n.content,this.c(t)),this.i(i)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(t){for(let n=0;n<this.n.length;n+=1)A(this.t,this.n[n],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(S)}}let ki;function Vt(e){ki=e}function Vo(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach(i=>i.call(this,t))}const Et=[],Tt=[];let It=[];const ci=[],ru=Promise.resolve();let hi=!1;function ou(){hi||(hi=!0,ru.then(jo))}function Zt(e){It.push(e)}function cn(e){ci.push(e)}const Yn=new Set;let yt=0;function jo(){if(yt!==0)return;const e=ki;do{try{for(;yt<Et.length;){const t=Et[yt];yt++,Vt(t),su(t.$$)}}catch(t){throw Et.length=0,yt=0,t}for(Vt(null),Et.length=0,yt=0;Tt.length;)Tt.pop()();for(let t=0;t<It.length;t+=1){const n=It[t];Yn.has(n)||(Yn.add(n),n())}It.length=0}while(Et.length);for(;ci.length;)ci.pop()();hi=!1,Yn.clear(),Vt(e)}function su(e){if(e.fragment!==null){e.update(),xe(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Zt)}}function au(e){const t=[],n=[];It.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),It=t}const hn=new Set;let ft;function Me(){ft={r:0,c:[],p:ft}}function Be(){ft.r||xe(ft.c),ft=ft.p}function P(e,t){e&&e.i&&(hn.delete(e),e.i(t))}function x(e,t,n,i){if(e&&e.o){if(hn.has(e))return;hn.add(e),ft.c.push(()=>{hn.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function ze(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function dn(e,t,n){const i=e.$$.props[t];i!==void 0&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function oe(e){e&&e.c()}function te(e,t,n){const{fragment:i,after_update:r}=e.$$;i&&i.m(t,n),Zt(()=>{const o=e.$$.on_mount.map(Fo).filter(gt);e.$$.on_destroy?e.$$.on_destroy.push(...o):xe(o),e.$$.on_mount=[]}),r.forEach(Zt)}function ne(e,t){const n=e.$$;n.fragment!==null&&(au(n.after_update),xe(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function lu(e,t){e.$$.dirty[0]===-1&&(Et.push(e),ou(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function be(e,t,n,i,r,o,s,a=[-1]){const l=ki;Vt(e);const u=e.$$={fragment:null,ctx:[],props:o,update:Z,not_equal:r,bound:Ir(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:Ir(),dirty:a,skip_bound:!1,root:t.target||l.$$.root};s&&s(u.root);let f=!1;if(u.ctx=n?n(e,t.props||{},(h,c,...d)=>{const m=d.length?d[0]:c;return u.ctx&&r(u.ctx[h],u.ctx[h]=m)&&(!u.skip_bound&&u.bound[h]&&u.bound[h](m),f&&lu(e,h)),c}):[],u.update(),f=!0,xe(u.before_update),u.fragment=i?i(u.ctx):!1,t.target){if(t.hydrate){const h=iu(t.target);u.fragment&&u.fragment.l(h),h.forEach(S)}else u.fragment&&u.fragment.c();t.intro&&P(e.$$.fragment),te(e,t.target,t.anchor),jo()}Vt(l)}class ye{constructor(){Ye(this,"$$");Ye(this,"$$set")}$destroy(){ne(this,1),this.$destroy=Z}$on(t,n){if(!gt(n))return Z;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!eu(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const uu="4",wt=[];function fu(e,t){return{subscribe:Rn(e,t).subscribe}}function Rn(e,t=Z){let n;const i=new Set;function r(a){if(pe(e,a)&&(e=a,n)){const l=!wt.length;for(const u of i)u[1](),wt.push(u,e);if(l){for(let u=0;u<wt.length;u+=2)wt[u][0](wt[u+1]);wt.length=0}}}function o(a){r(a(e))}function s(a,l=Z){const u=[a,l];return i.add(u),i.size===1&&(n=t(r,o)||Z),a(e),()=>{i.delete(u),i.size===0&&n&&(n(),n=null)}}return{set:r,update:o,subscribe:s}}function kt(e,t,n){const i=!Array.isArray(e),r=i?[e]:e;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const o=t.length<2;return fu(n,(s,a)=>{let l=!1;const u=[];let f=0,h=Z;const c=()=>{if(f)return;h();const m=t(i?u[0]:u,s,a);o?s(m):h=gt(m)?m:Z},d=r.map((m,p)=>$o(m,_=>{u[p]=_,f&=~(1<<p),l&&c()},()=>{f|=1<<p}));return l=!0,c(),function(){xe(d),h(),l=!1}})}function Xo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cu=function(t){return hu(t)&&!du(t)};function hu(e){return!!e&&typeof e=="object"}function du(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||pu(e)}var mu=typeof Symbol=="function"&&Symbol.for,vu=mu?Symbol.for("react.element"):60103;function pu(e){return e.$$typeof===vu}function gu(e){return Array.isArray(e)?[]:{}}function Jt(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ht(gu(e),e,t):e}function _u(e,t,n){return e.concat(t).map(function(i){return Jt(i,n)})}function bu(e,t){if(!t.customMerge)return Ht;var n=t.customMerge(e);return typeof n=="function"?n:Ht}function yu(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Cr(e){return Object.keys(e).concat(yu(e))}function qo(e,t){try{return t in e}catch{return!1}}function wu(e,t){return qo(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Eu(e,t,n){var i={};return n.isMergeableObject(e)&&Cr(e).forEach(function(r){i[r]=Jt(e[r],n)}),Cr(t).forEach(function(r){wu(e,r)||(qo(e,r)&&n.isMergeableObject(t[r])?i[r]=bu(r,n)(e[r],t[r],n):i[r]=Jt(t[r],n))}),i}function Ht(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||_u,n.isMergeableObject=n.isMergeableObject||cu,n.cloneUnlessOtherwiseSpecified=Jt;var i=Array.isArray(t),r=Array.isArray(e),o=i===r;return o?i?n.arrayMerge(e,t,n):Eu(e,t,n):Jt(t,n)}Ht.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(i,r){return Ht(i,r,n)},{})};var Su=Ht,Au=Su;const Tu=Xo(Au);var di=function(e,t){return di=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},di(e,t)};function Ln(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");di(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Y=function(){return Y=Object.assign||function(t){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Y.apply(this,arguments)};function Qn(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,o;i<r;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}var G;(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"})(G||(G={}));var ue;(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"})(ue||(ue={}));var Pt;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Pt||(Pt={}));function Or(e){return e.type===ue.literal}function Iu(e){return e.type===ue.argument}function Wo(e){return e.type===ue.number}function Zo(e){return e.type===ue.date}function Jo(e){return e.type===ue.time}function Yo(e){return e.type===ue.select}function Qo(e){return e.type===ue.plural}function Du(e){return e.type===ue.pound}function Ko(e){return e.type===ue.tag}function es(e){return!!(e&&typeof e=="object"&&e.type===Pt.number)}function mi(e){return!!(e&&typeof e=="object"&&e.type===Pt.dateTime)}var ts=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Cu=/(?:[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 Ou(e){var t={};return e.replace(Cu,function(n){var i=n.length;switch(n[0]){case"G":t.era=i===4?"long":i===5?"narrow":"short";break;case"y":t.year=i===2?"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"][i-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][i-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=i===4?"short":i===5?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-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"][i-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][i-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][i-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][i-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"][i-1];break;case"s":t.second=["numeric","2-digit"][i-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=i<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 Hu=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Pu(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Hu).filter(function(c){return c.length>0}),n=[],i=0,r=t;i<r.length;i++){var o=r[i],s=o.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var a=s[0],l=s.slice(1),u=0,f=l;u<f.length;u++){var h=f[u];if(h.length===0)throw new Error("Invalid number skeleton")}n.push({stem:a,options:l})}return n}function Nu(e){return e.replace(/^(.*?)-/,"")}var Hr=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,ns=/^(@+)?(\+|#+)?[rs]?$/g,Ru=/(\*)(0+)|(#+)(0+)|(0+)/g,is=/^(0+)$/;function Pr(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(ns,function(n,i,r){return typeof r!="string"?(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length):r==="+"?t.minimumSignificantDigits=i.length:i[0]==="#"?t.maximumSignificantDigits=i.length:(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length+(typeof r=="string"?r.length:0)),""}),t}function rs(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 Lu(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!is.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Nr(e){var t={},n=rs(e);return n||t}function Mu(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.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=Nu(r.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=Y(Y(Y({},t),{notation:"scientific"}),r.options.reduce(function(l,u){return Y(Y({},l),Nr(u))},{}));continue;case"engineering":t=Y(Y(Y({},t),{notation:"engineering"}),r.options.reduce(function(l,u){return Y(Y({},l),Nr(u))},{}));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(r.options[0]);continue;case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(Ru,function(l,u,f,h,c,d){if(u)t.minimumIntegerDigits=f.length;else{if(h&&c)throw new Error("We currently do not support maximum integer digits");if(d)throw new Error("We currently do not support exact integer digits")}return""});continue}if(is.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(Hr.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(Hr,function(l,u,f,h,c,d){return f==="*"?t.minimumFractionDigits=u.length:h&&h[0]==="#"?t.maximumFractionDigits=h.length:c&&d?(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length+d.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var o=r.options[0];o==="w"?t=Y(Y({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=Y(Y({},t),Pr(o)));continue}if(ns.test(r.stem)){t=Y(Y({},t),Pr(r.stem));continue}var s=rs(r.stem);s&&(t=Y(Y({},t),s));var a=Lu(r.stem);a&&(t=Y(Y({},t),a))}return t}var fn={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function Bu(e,t){for(var n="",i=0;i<e.length;i++){var r=e.charAt(i);if(r==="j"){for(var o=0;i+1<e.length&&e.charAt(i+1)===r;)o++,i++;var s=1+(o&1),a=o<2?1:3+(o>>1),l="a",u=ku(t);for((u=="H"||u=="k")&&(a=0);a-- >0;)n+=l;for(;s-- >0;)n=u+n}else r==="J"?n+="H":n+=r}return n}function ku(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,i;n!=="root"&&(i=e.maximize().region);var r=fn[i||""]||fn[n||""]||fn["".concat(n,"-001")]||fn["001"];return r[0]}var Kn,xu=new RegExp("^".concat(ts.source,"*")),Uu=new RegExp("".concat(ts.source,"*$"));function X(e,t){return{start:e,end:t}}var zu=!!String.prototype.startsWith,Fu=!!String.fromCodePoint,$u=!!Object.fromEntries,Gu=!!String.prototype.codePointAt,Vu=!!String.prototype.trimStart,ju=!!String.prototype.trimEnd,Xu=!!Number.isSafeInteger,qu=Xu?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},vi=!0;try{var Wu=ss("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");vi=((Kn=Wu.exec("a"))===null||Kn===void 0?void 0:Kn[0])==="a"}catch{vi=!1}var Rr=zu?function(t,n,i){return t.startsWith(n,i)}:function(t,n,i){return t.slice(i,i+n.length)===n},pi=Fu?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i="",r=t.length,o=0,s;r>o;){if(s=t[o++],s>1114111)throw RangeError(s+" is not a valid code point");i+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return i},Lr=$u?Object.fromEntries:function(t){for(var n={},i=0,r=t;i<r.length;i++){var o=r[i],s=o[0],a=o[1];n[s]=a}return n},os=Gu?function(t,n){return t.codePointAt(n)}:function(t,n){var i=t.length;if(!(n<0||n>=i)){var r=t.charCodeAt(n),o;return r<55296||r>56319||n+1===i||(o=t.charCodeAt(n+1))<56320||o>57343?r:(r-55296<<10)+(o-56320)+65536}},Zu=Vu?function(t){return t.trimStart()}:function(t){return t.replace(xu,"")},Ju=ju?function(t){return t.trimEnd()}:function(t){return t.replace(Uu,"")};function ss(e,t){return new RegExp(e,t)}var gi;if(vi){var Mr=ss("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");gi=function(t,n){var i;Mr.lastIndex=n;var r=Mr.exec(t);return(i=r[1])!==null&&i!==void 0?i:""}}else gi=function(t,n){for(var i=[];;){var r=os(t,n);if(r===void 0||as(r)||ef(r))break;i.push(r),n+=r>=65536?2:1}return pi.apply(void 0,i)};var Yu=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,i){for(var r=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(t,i);if(s.err)return s;r.push(s.val)}else{if(o===125&&t>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),r.push({type:ue.pound,location:X(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(G.UNMATCHED_CLOSING_TAG,X(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&_i(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;r.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;r.push(s.val)}}}return{val:r,err:null}},e.prototype.parseTag=function(t,n){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:ue.literal,value:"<".concat(r,"/>"),location:X(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,n,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!_i(this.char()))return this.error(G.INVALID_TAG,X(a,this.clonePosition()));var l=this.clonePosition(),u=this.parseTagName();return r!==u?this.error(G.UNMATCHED_CLOSING_TAG,X(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ue.tag,value:r,children:s,location:X(i,this.clonePosition())},err:null}:this.error(G.INVALID_TAG,X(a,this.clonePosition())))}else return this.error(G.UNCLOSED_TAG,X(i,this.clonePosition()))}else return this.error(G.INVALID_TAG,X(i,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Ku(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var i=this.clonePosition(),r="";;){var o=this.tryParseQuote(n);if(o){r+=o;continue}var s=this.tryParseUnquoted(t,n);if(s){r+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){r+=a;continue}break}var l=X(i,this.clonePosition());return{val:{type:ue.literal,value:r,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Qu(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var i=this.char();if(i===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(i);this.bump()}return pi.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(n==="plural"||n==="selectordinal")||i===125&&t>0?null:(this.bump(),pi(i))},e.prototype.parseArgument=function(t,n){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(G.EXPECT_ARGUMENT_CLOSING_BRACE,X(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(G.EMPTY_ARGUMENT,X(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(G.MALFORMED_ARGUMENT,X(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(G.EXPECT_ARGUMENT_CLOSING_BRACE,X(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:ue.argument,value:r,location:X(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(G.EXPECT_ARGUMENT_CLOSING_BRACE,X(i,this.clonePosition())):this.parseArgumentOptions(t,n,r,i);default:return this.error(G.MALFORMED_ARGUMENT,X(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),i=gi(this.message,n),r=n+i.length;this.bumpTo(r);var o=this.clonePosition(),s=X(t,o);return{value:i,location:s}},e.prototype.parseArgumentOptions=function(t,n,i,r){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(a){case"":return this.error(G.EXPECT_ARGUMENT_TYPE,X(s,l));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),h=this.parseSimpleArgStyleIfPossible();if(h.err)return h;var c=Ju(h.val);if(c.length===0)return this.error(G.EXPECT_ARGUMENT_STYLE,X(this.clonePosition(),this.clonePosition()));var d=X(f,this.clonePosition());u={style:c,styleLocation:d}}var m=this.tryParseArgumentClose(r);if(m.err)return m;var p=X(r,this.clonePosition());if(u&&Rr(u==null?void 0:u.style,"::",0)){var _=Zu(u.style.slice(2));if(a==="number"){var h=this.parseNumberSkeletonFromString(_,u.styleLocation);return h.err?h:{val:{type:ue.number,value:i,location:p,style:h.val},err:null}}else{if(_.length===0)return this.error(G.EXPECT_DATE_TIME_SKELETON,p);var b=_;this.locale&&(b=Bu(_,this.locale));var c={type:Pt.dateTime,pattern:b,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?Ou(b):{}},T=a==="date"?ue.date:ue.time;return{val:{type:T,value:i,location:p,style:c},err:null}}}return{val:{type:a==="number"?ue.number:a==="date"?ue.date:ue.time,value:i,location:p,style:(o=u==null?void 0:u.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var B=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(G.EXPECT_SELECT_ARGUMENT_OPTIONS,X(B,Y({},B)));this.bumpSpace();var D=this.parseIdentifierIfPossible(),I=0;if(a!=="select"&&D.value==="offset"){if(!this.bumpIf(":"))return this.error(G.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,X(this.clonePosition(),this.clonePosition()));this.bumpSpace();var h=this.tryParseDecimalInteger(G.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,G.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(h.err)return h;this.bumpSpace(),D=this.parseIdentifierIfPossible(),I=h.val}var R=this.tryParsePluralOrSelectOptions(t,a,n,D);if(R.err)return R;var m=this.tryParseArgumentClose(r);if(m.err)return m;var C=X(r,this.clonePosition());return a==="select"?{val:{type:ue.select,value:i,options:Lr(R.val),location:C},err:null}:{val:{type:ue.plural,value:i,options:Lr(R.val),offset:I,pluralType:a==="plural"?"cardinal":"ordinal",location:C},err:null}}default:return this.error(G.INVALID_ARGUMENT_TYPE,X(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(G.EXPECT_ARGUMENT_CLOSING_BRACE,X(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(G.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,X(r,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var i=[];try{i=Pu(t)}catch{return this.error(G.INVALID_NUMBER_SKELETON,n)}return{val:{type:Pt.number,tokens:i,location:n,parsedOptions:this.shouldParseSkeletons?Mu(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,i,r){for(var o,s=!1,a=[],l=new Set,u=r.value,f=r.location;;){if(u.length===0){var h=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var c=this.tryParseDecimalInteger(G.EXPECT_PLURAL_ARGUMENT_SELECTOR,G.INVALID_PLURAL_ARGUMENT_SELECTOR);if(c.err)return c;f=X(h,this.clonePosition()),u=this.message.slice(h.offset,this.offset())}else break}if(l.has(u))return this.error(n==="select"?G.DUPLICATE_SELECT_ARGUMENT_SELECTOR:G.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);u==="other"&&(s=!0),this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?G.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:G.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,X(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(t+1,n,i);if(m.err)return m;var p=this.tryParseArgumentClose(d);if(p.err)return p;a.push([u,{value:m.val,location:X(d,this.clonePosition())}]),l.add(u),this.bumpSpace(),o=this.parseIdentifierIfPossible(),u=o.value,f=o.location}return a.length===0?this.error(n==="select"?G.EXPECT_SELECT_ARGUMENT_SELECTOR:G.EXPECT_PLURAL_ARGUMENT_SELECTOR,X(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(G.MISSING_OTHER_CLAUSE,X(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var i=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var l=X(r,this.clonePosition());return o?(s*=i,qu(s)?{val:s,err:null}:this.error(n,l)):this.error(t,l)},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 t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=os(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Rr(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),i=this.message.indexOf(t,n);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},e.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 n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&as(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),i=this.message.charCodeAt(n+(t>=65536?2:1));return i??null},e}();function _i(e){return e>=97&&e<=122||e>=65&&e<=90}function Qu(e){return _i(e)||e===47}function Ku(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||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 as(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ef(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||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||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||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||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function bi(e){e.forEach(function(t){if(delete t.location,Yo(t)||Qo(t))for(var n in t.options)delete t.options[n].location,bi(t.options[n].value);else Wo(t)&&es(t.style)||(Zo(t)||Jo(t))&&mi(t.style)?delete t.style.location:Ko(t)&&bi(t.children)})}function tf(e,t){t===void 0&&(t={}),t=Y({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Yu(e,t).parse();if(n.err){var i=SyntaxError(G[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return t!=null&&t.captureLocation||bi(n.val),n.val}function ei(e,t){var n=t&&t.cache?t.cache:lf,i=t&&t.serializer?t.serializer:af,r=t&&t.strategy?t.strategy:rf;return r(e,{cache:n,serializer:i})}function nf(e){return e==null||typeof e=="number"||typeof e=="boolean"}function ls(e,t,n,i){var r=nf(i)?i:n(i),o=t.get(r);return typeof o>"u"&&(o=e.call(this,i),t.set(r,o)),o}function us(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),o=t.get(r);return typeof o>"u"&&(o=e.apply(this,i),t.set(r,o)),o}function xi(e,t,n,i,r){return n.bind(t,e,i,r)}function rf(e,t){var n=e.length===1?ls:us;return xi(e,this,n,t.cache.create(),t.serializer)}function of(e,t){return xi(e,this,us,t.cache.create(),t.serializer)}function sf(e,t){return xi(e,this,ls,t.cache.create(),t.serializer)}var af=function(){return JSON.stringify(arguments)};function Ui(){this.cache=Object.create(null)}Ui.prototype.get=function(e){return this.cache[e]};Ui.prototype.set=function(e,t){this.cache[e]=t};var lf={create:function(){return new Ui}},ti={variadic:of,monadic:sf},Nt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Nt||(Nt={}));var Mn=function(e){Ln(t,e);function t(n,i,r){var o=e.call(this,n)||this;return o.code=i,o.originalMessage=r,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Br=function(e){Ln(t,e);function t(n,i,r,o){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(i,'". Options are "').concat(Object.keys(r).join('", "'),'"'),Nt.INVALID_VALUE,o)||this}return t}(Mn),uf=function(e){Ln(t,e);function t(n,i,r){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(i),Nt.INVALID_VALUE,r)||this}return t}(Mn),ff=function(e){Ln(t,e);function t(n,i){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(i,'"'),Nt.MISSING_VALUE,i)||this}return t}(Mn),Ee;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ee||(Ee={}));function cf(e){return e.length<2?e:e.reduce(function(t,n){var i=t[t.length-1];return!i||i.type!==Ee.literal||n.type!==Ee.literal?t.push(n):i.value+=n.value,t},[])}function hf(e){return typeof e=="function"}function mn(e,t,n,i,r,o,s){if(e.length===1&&Or(e[0]))return[{type:Ee.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var f=u[l];if(Or(f)){a.push({type:Ee.literal,value:f.value});continue}if(Du(f)){typeof o=="number"&&a.push({type:Ee.literal,value:n.getNumberFormat(t).format(o)});continue}var h=f.value;if(!(r&&h in r))throw new ff(h,s);var c=r[h];if(Iu(f)){(!c||typeof c=="string"||typeof c=="number")&&(c=typeof c=="string"||typeof c=="number"?String(c):""),a.push({type:typeof c=="string"?Ee.literal:Ee.object,value:c});continue}if(Zo(f)){var d=typeof f.style=="string"?i.date[f.style]:mi(f.style)?f.style.parsedOptions:void 0;a.push({type:Ee.literal,value:n.getDateTimeFormat(t,d).format(c)});continue}if(Jo(f)){var d=typeof f.style=="string"?i.time[f.style]:mi(f.style)?f.style.parsedOptions:i.time.medium;a.push({type:Ee.literal,value:n.getDateTimeFormat(t,d).format(c)});continue}if(Wo(f)){var d=typeof f.style=="string"?i.number[f.style]:es(f.style)?f.style.parsedOptions:void 0;d&&d.scale&&(c=c*(d.scale||1)),a.push({type:Ee.literal,value:n.getNumberFormat(t,d).format(c)});continue}if(Ko(f)){var m=f.children,p=f.value,_=r[p];if(!hf(_))throw new uf(p,"function",s);var b=mn(m,t,n,i,r,o),T=_(b.map(function(I){return I.value}));Array.isArray(T)||(T=[T]),a.push.apply(a,T.map(function(I){return{type:typeof I=="string"?Ee.literal:Ee.object,value:I}}))}if(Yo(f)){var B=f.options[c]||f.options.other;if(!B)throw new Br(f.value,c,Object.keys(f.options),s);a.push.apply(a,mn(B.value,t,n,i,r));continue}if(Qo(f)){var B=f.options["=".concat(c)];if(!B){if(!Intl.PluralRules)throw new