UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

1 lines 32.2 kB
export const __rspack_esm_id=31484;export const __rspack_esm_ids=[31484];export const __webpack_modules__={45558(e,t,r){r.d(t,{Im:()=>E,tv:()=>y,Tu:()=>I,eW:()=>H,oF:()=>B,N1:()=>S,N6:()=>P,jA:()=>_,Jp:()=>T,xm:()=>A,Qh:()=>d,qg:()=>Y});r(44114),r(18111),r(7588),r(18237),r(45367),r(92731),r(17642),r(58004),r(33853),r(45876),r(32475),r(15024),r(31698),r(22489);const s=/(?:[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 n(e){const t={};return e.replace(s,e=>{const 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}const i=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function h(e){return e.replace(/^(.*?)-/,"")}const o=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,a=/^(@+)?(\+|#+)?[rs]?$/g,c=/(\*)(0+)|(#+)(0+)|(0+)/g,u=/^(0+)$/;function l(e){const t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(a,function(e,r,s){return"string"!=typeof s?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):"+"===s?t.minimumSignificantDigits=r.length:"#"===r[0]?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+("string"==typeof s?s.length:0)),""}),t}function p(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 f(e){let 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){const r=e.slice(0,2);if("+!"===r?(t.signDisplay="always",e=e.slice(2)):"+?"===r&&(t.signDisplay="exceptZero",e=e.slice(2)),!u.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function m(e){const t=p(e);return t||{}}function b(e){let t={};for(const r of e){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=h(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={...t,notation:"scientific",...r.options.reduce((e,t)=>({...e,...m(t)}),{})};continue;case"engineering":t={...t,notation:"engineering",...r.options.reduce((e,t)=>({...e,...m(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(r.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(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(c,function(e,r,s,n,i,h){if(r)t.minimumIntegerDigits=s.length;else{if(n&&i)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""});continue}if(u.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(o.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(o,function(e,r,s,n,i,h){return"*"===s?t.minimumFractionDigits=r.length:n&&"#"===n[0]?t.maximumFractionDigits=n.length:i&&h?(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length+h.length):(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length),""});const e=r.options[0];"w"===e?t={...t,trailingZeroDisplay:"stripIfInteger"}:e&&(t={...t,...l(e)});continue}if(a.test(r.stem)){t={...t,...l(r.stem)};continue}const e=p(r.stem);e&&(t={...t,...e});const s=f(r.stem);s&&(t={...t,...s})}return t}let g=function(e){return 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",e}({});function H(e){return 0===e.type}function E(e){return 1===e.type}function B(e){return 2===e.type}function y(e){return 3===e.type}function d(e){return 4===e.type}function T(e){return 5===e.type}function P(e){return 6===e.type}function _(e){return 7===e.type}function A(e){return 8===e.type}function S(e){return!(!e||"object"!=typeof e||0!==e.type)}function I(e){return!(!e||"object"!=typeof e||1!==e.type)}const L=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,N={"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"],GS:["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"],"ku-SY":["H","hB"],"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 C(e){let 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")}const r=e.language;let s;return"root"!==r&&(s=e.maximize().region),(N[s||""]||N[r||""]||N[`${r}-001`]||N["001"])[0]}const M=new RegExp(`^${L.source}*`),v=new RegExp(`${L.source}*$`);function w(e,t){return{start:e,end:t}}const R=!!Object.fromEntries,O=!!String.prototype.trimStart,D=!!String.prototype.trimEnd,U=R?Object.fromEntries:function(e){const t={};for(const[r,s]of e)t[r]=s;return t},G=O?function(e){return e.trimStart()}:function(e){return e.replace(M,"")},F=D?function(e){return e.trimEnd()}:function(e){return e.replace(v,"")},k=new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");var x=class{parse(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)}parseMessage(e,t,r){let s=[];for(;!this.isEOF();){const n=this.char();if(123===n){const t=this.parseArgument(e,r);if(t.err)return t;s.push(t.val)}else{if(125===n&&e>0)break;if(35!==n||"plural"!==t&&"selectordinal"!==t){if(60===n&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(26,w(this.clonePosition(),this.clonePosition()))}if(60===n&&!this.ignoreTag&&V(this.peek()||0)){const r=this.parseTag(e,t);if(r.err)return r;s.push(r.val)}else{const r=this.parseLiteral(e,t);if(r.err)return r;s.push(r.val)}}else{const e=this.clonePosition();this.bump(),s.push({type:7,location:w(e,this.clonePosition())})}}}return{val:s,err:null}}parseTag(e,t){const r=this.clonePosition();this.bump();const s=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:0,value:`<${s}/>`,location:w(r,this.clonePosition())},err:null};if(this.bumpIf(">")){const n=this.parseMessage(e+1,t,!0);if(n.err)return n;const i=n.val,h=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!V(this.char()))return this.error(23,w(h,this.clonePosition()));const e=this.clonePosition();return s!==this.parseTagName()?this.error(26,w(e,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:8,value:s,children:i,location:w(r,this.clonePosition())},err:null}:this.error(23,w(h,this.clonePosition())))}return this.error(27,w(r,this.clonePosition()))}return this.error(23,w(r,this.clonePosition()))}parseTagName(){const e=this.offset();for(this.bump();!this.isEOF()&&K(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){const r=this.clonePosition();let s="";for(;;){const r=this.tryParseQuote(t);if(r){s+=r;continue}const n=this.tryParseUnquoted(e,t);if(n){s+=n;continue}const i=this.tryParseLeftAngleBracket();if(!i)break;s+=i}return{val:{type:0,value:s,location:w(r,this.clonePosition())},err:null}}tryParseLeftAngleBracket(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(V(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e}tryParseQuote(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();const t=[this.char()];for(this.bump();!this.isEOF();){const e=this.char();if(39===e){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(e);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;const r=this.char();return 60===r||123===r||35===r&&("plural"===t||"selectordinal"===t)||125===r&&e>0?null:(this.bump(),String.fromCodePoint(r))}parseArgument(e,t){const r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,w(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error(2,w(r,this.clonePosition()));let s=this.parseIdentifierIfPossible().value;if(!s)return this.error(3,w(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,w(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:s,location:w(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,w(r,this.clonePosition())):this.parseArgumentOptions(e,t,s,r);default:return this.error(3,w(r,this.clonePosition()))}}parseIdentifierIfPossible(){const e=this.clonePosition(),t=this.offset(),r=(s=this.message,n=t,k.lastIndex=n,k.exec(s)[1]??"");var s,n;const i=t+r.length;return this.bumpTo(i),{value:r,location:w(e,this.clonePosition())}}parseArgumentOptions(e,t,r,s){let i=this.clonePosition(),h=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(h){case"":return this.error(4,w(i,o));case"number":case"date":case"time":{this.bumpSpace();let e=null;if(this.bumpIf(",")){this.bumpSpace();const t=this.clonePosition(),r=this.parseSimpleArgStyleIfPossible();if(r.err)return r;const s=F(r.val);if(0===s.length)return this.error(6,w(this.clonePosition(),this.clonePosition()));e={style:s,styleLocation:w(t,this.clonePosition())}}const t=this.tryParseArgumentClose(s);if(t.err)return t;const i=w(s,this.clonePosition());if(e&&e.style.startsWith("::")){let t=G(e.style.slice(2));if("number"===h){const s=this.parseNumberSkeletonFromString(t,e.styleLocation);return s.err?s:{val:{type:2,value:r,location:i,style:s.val},err:null}}{if(0===t.length)return this.error(10,i);let s=t;this.locale&&(s=function(e,t){let r="";for(let s=0;s<e.length;s++){const n=e.charAt(s);if("j"===n){let i=0;for(;s+1<e.length&&e.charAt(s+1)===n;)i++,s++;let h=1+(1&i),o=i<2?1:3+(i>>1),a="a",c=C(t);for("H"!=c&&"k"!=c||(o=0);o-- >0;)r+=a;for(;h-- >0;)r=c+r}else r+="J"===n?"H":n}return r}(t,this.locale));return{val:{type:"date"===h?3:4,value:r,location:i,style:{type:1,pattern:s,location:e.styleLocation,parsedOptions:this.shouldParseSkeletons?n(s):{}}},err:null}}}return{val:{type:"number"===h?2:"date"===h?3:4,value:r,location:i,style:e?.style??null},err:null}}case"plural":case"selectordinal":case"select":{const n=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(12,w(n,{...n}));this.bumpSpace();let i=this.parseIdentifierIfPossible(),o=0;if("select"!==h&&"offset"===i.value){if(!this.bumpIf(":"))return this.error(13,w(this.clonePosition(),this.clonePosition()));this.bumpSpace();const e=this.tryParseDecimalInteger(13,14);if(e.err)return e;this.bumpSpace(),i=this.parseIdentifierIfPossible(),o=e.val}const a=this.tryParsePluralOrSelectOptions(e,h,t,i);if(a.err)return a;const c=this.tryParseArgumentClose(s);if(c.err)return c;const u=w(s,this.clonePosition());return"select"===h?{val:{type:5,value:r,options:U(a.val),location:u},err:null}:{val:{type:6,value:r,options:U(a.val),offset:o,pluralType:"plural"===h?"cardinal":"ordinal",location:u},err:null}}default:return this.error(5,w(i,o))}}tryParseArgumentClose(e){return this.isEOF()||125!==this.char()?this.error(1,w(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0;const t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let e=this.clonePosition();if(!this.bumpUntil("'"))return this.error(11,w(e,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}}parseNumberSkeletonFromString(e,t){let r=[];try{r=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");const t=e.split(i).filter(e=>e.length>0),r=[];for(const e of t){let t=e.split("/");if(0===t.length)throw new Error("Invalid number skeleton");const[s,...n]=t;for(const e of n)if(0===e.length)throw new Error("Invalid number skeleton");r.push({stem:s,options:n})}return r}(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:r,location:t,parsedOptions:this.shouldParseSkeletons?b(r):{}},err:null}}tryParsePluralOrSelectOptions(e,t,r,s){let n=!1;const i=[],h=new Set;let{value:o,location:a}=s;for(;;){if(0===o.length){const e=this.clonePosition();if("select"===t||!this.bumpIf("="))break;{const t=this.tryParseDecimalInteger(16,19);if(t.err)return t;a=w(e,this.clonePosition()),o=this.message.slice(e.offset,this.offset())}}if(h.has(o))return this.error("select"===t?21:20,a);"other"===o&&(n=!0),this.bumpSpace();const s=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?17:18,w(this.clonePosition(),this.clonePosition()));const c=this.parseMessage(e+1,t,r);if(c.err)return c;const u=this.tryParseArgumentClose(s);if(u.err)return u;i.push([o,{value:c.val,location:w(s,this.clonePosition())}]),h.add(o),this.bumpSpace(),({value:o,location:a}=this.parseIdentifierIfPossible())}return 0===i.length?this.error("select"===t?15:16,w(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!n?this.error(22,w(this.clonePosition(),this.clonePosition())):{val:i,err:null}}tryParseDecimalInteger(e,t){let r=1;const s=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);let n=!1,i=0;for(;!this.isEOF();){const e=this.char();if(!(e>=48&&e<=57))break;n=!0,i=10*i+(e-48),this.bump()}const h=w(s,this.clonePosition());return n?(i*=r,Number.isSafeInteger(i)?{val:i,err:null}:this.error(t,h)):this.error(e,h)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){const e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");const t=this.message.codePointAt(e);if(void 0===t)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;const 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)}bumpIf(e){if(this.message.startsWith(e,this.offset())){for(let t=0;t<e.length;t++)this.bump();return!0}return!1}bumpUntil(e){const t=this.offset(),r=this.message.indexOf(e,t);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){const t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&X(this.char());)this.bump()}peek(){if(this.isEOF())return null;const e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null}constructor(e,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}};function V(e){return e>=97&&e<=122||e>=65&&e<=90}function K(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 X(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function W(e){e.forEach(e=>{if(delete e.location,T(e)||P(e))for(const t in e.options)delete e.options[t].location,W(e.options[t].value);else B(e)&&S(e.style)||(y(e)||d(e))&&I(e.style)?delete e.style.location:A(e)&&W(e.children)})}function Y(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};const r=new x(e,t).parse();if(r.err){const e=SyntaxError(g[r.err.kind]);throw e.location=r.err.location,e.originalMessage=r.err.message,e}return t?.captureLocation||W(r.val),r.val}},90103(e,t,r){r.a(e,async function(e,s){try{r.d(t,{IntlMessageFormat:()=>f});var n,i=r(74487),h=(r(44114),r(18111),r(61701),r(18237),r(40603)),o=r(45558),a=e([i]);i=(a.then?(await a)():a)[0];var c=class extends Error{toString(){return`[formatjs Error: ${this.code}] ${this.message}`}constructor(e,t,r){super(e),this.code=t,this.originalMessage=r}},u=class extends c{constructor(e,t,r,s){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(r).join('", "')}"`,"INVALID_VALUE",s)}},l=class extends c{constructor(e,t,r){super(`Value for "${e}" must be of type ${t}`,"INVALID_VALUE",r)}},p=class extends c{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,"MISSING_VALUE",t)}};function m(e){return"function"==typeof e}function b(e,t,r,s,n,i,h){if(1===e.length&&(0,o.eW)(e[0]))return[{type:0,value:e[0].value}];const a=[];for(const f of e){if((0,o.eW)(f)){a.push({type:0,value:f.value});continue}if((0,o.jA)(f)){"number"==typeof i&&a.push({type:0,value:r.getNumberFormat(t).format(i)});continue}const{value:e}=f;if(!n||!(e in n))throw new p(e,h);let g=n[e];if((0,o.Im)(f))g&&"string"!=typeof g&&"number"!=typeof g&&"bigint"!=typeof g||(g="string"==typeof g||"number"==typeof g||"bigint"==typeof g?String(g):""),a.push({type:"string"==typeof g?0:1,value:g});else{if((0,o.tv)(f)){const e="string"==typeof f.style?s.date[f.style]:(0,o.Tu)(f.style)?f.style.parsedOptions:void 0;a.push({type:0,value:r.getDateTimeFormat(t,e).format(g)});continue}if((0,o.Qh)(f)){const e="string"==typeof f.style?s.time[f.style]:(0,o.Tu)(f.style)?f.style.parsedOptions:s.time.medium;a.push({type:0,value:r.getDateTimeFormat(t,e).format(g)});continue}if((0,o.oF)(f)){const e="string"==typeof f.style?s.number[f.style]:(0,o.N1)(f.style)?f.style.parsedOptions:void 0;if(e&&e.scale){const t=e.scale||1;if("bigint"==typeof g){if(!Number.isInteger(t))throw new TypeError(`Cannot apply fractional scale ${t} to bigint value. Scale must be an integer when formatting bigint.`);g*=BigInt(t)}else g*=t}a.push({type:0,value:r.getNumberFormat(t,e).format(g)});continue}if((0,o.xm)(f)){const{children:e,value:o}=f,c=n[o];if(!m(c))throw new l(o,"function",h);let u=c(b(e,t,r,s,n,i).map(e=>e.value));Array.isArray(u)||(u=[u]),a.push(...u.map(e=>({type:"string"==typeof e?0:1,value:e})))}if((0,o.Jp)(f)){const e=g,i=(Object.prototype.hasOwnProperty.call(f.options,e)?f.options[e]:void 0)||f.options.other;if(!i)throw new u(f.value,g,Object.keys(f.options),h);a.push(...b(i.value,t,r,s,n));continue}if((0,o.N6)(f)){const e=`=${g}`;let i=Object.prototype.hasOwnProperty.call(f.options,e)?f.options[e]:void 0;if(!i){if(!Intl.PluralRules)throw new c('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',"MISSING_INTL_API",h);const e="bigint"==typeof g?Number(g):g,s=r.getPluralRules(t,{type:f.pluralType}).select(e-(f.offset||0));i=(Object.prototype.hasOwnProperty.call(f.options,s)?f.options[s]:void 0)||f.options.other}if(!i)throw new u(f.value,g,Object.keys(f.options),h);const o="bigint"==typeof g?Number(g):g;a.push(...b(i.value,t,r,s,n,o-(f.offset||0)));continue}}}return(f=a).length<2?f:f.reduce((e,t)=>{const r=e[e.length-1];return r&&0===r.type&&0===t.type?r.value+=t.value:e.push(t),e},[]);var f}function g(e){return{create:()=>({get:t=>e[t],set(t,r){e[t]=r}})}}function H(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:(0,h.B)((...e)=>new Intl.NumberFormat(...e),{cache:g(e.number),strategy:h.W.variadic}),getDateTimeFormat:(0,h.B)((...e)=>new Intl.DateTimeFormat(...e),{cache:g(e.dateTime),strategy:h.W.variadic}),getPluralRules:(0,h.B)((...e)=>new Intl.PluralRules(...e),{cache:g(e.pluralRules),strategy:h.W.variadic})}}var f=(n=class e{static get defaultLocale(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale}constructor(t,r=e.defaultLocale,s,n){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=e=>{const t=this.formatToParts(e);if(1===t.length)return t[0].value;const r=t.reduce((e,t)=>(e.length&&0===t.type&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e),[]);return r.length<=1?r[0]||"":r},this.formatToParts=e=>b(this.ast,this.locales,this.formatters,this.formats,e,void 0,this.message),this.resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}),this.getAst=()=>this.ast,this.locales=r,this.resolvedLocale=e.resolveLocale(r),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...r}=n||{};this.ast=e.__parse(t,{...r,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");var i,h;this.formats=(i=e.formats,(h=s)?Object.keys(i).reduce((e,t)=>{var r,s;return e[t]=(r=i[t],(s=h[t])?{...r,...s,...Object.keys(r).reduce((e,t)=>(e[t]={...r[t],...s[t]},e),{})}:r),e},{...i}):i),this.formatters=n&&n.formatters||H(this.formatterCache)}},n.memoizedDefaultLocale=null,n.resolveLocale=e=>{if(void 0===Intl.Locale)return;const t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])},n.__parse=o.qg,n.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},n);s()}catch(E){s(E)}})}};