@kong-ui-public/misc-widgets 0.5.16 → 0.5.17
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.
- package/dist/misc-widgets.es.js +543 -552
- package/dist/misc-widgets.umd.js +10 -10
- package/package.json +2 -2
package/dist/misc-widgets.umd.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
(function(M,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],v):(M=typeof globalThis<"u"?globalThis:M||self,v(M["kong-ui-public-misc-widgets"]={},M.Vue))})(this,function(M,v){"use strict";var W=function(t,r){return W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},W(t,r)};function N(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");W(t,r);function e(){this.constructor=t}t.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}var b=function(){return b=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++){r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},b.apply(this,arguments)};function Kt(t,r){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(e[n[i]]=t[n[i]]);return e}function O(t,r,e){if(e||arguments.length===2)for(var n=0,i=r.length,o;n<i;n++)(o||!(n in r))&&(o||(o=Array.prototype.slice.call(r,0,n)),o[n]=r[n]);return t.concat(o||Array.prototype.slice.call(r))}var d=function(){return d=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++){r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},d.apply(this,arguments)},m;(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"})(m||(m={}));var y;(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"})(y||(y={}));var F;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(F||(F={}));function st(t){return t.type===y.literal}function Zt(t){return t.type===y.argument}function ht(t){return t.type===y.number}function ut(t){return t.type===y.date}function ct(t){return t.type===y.time}function lt(t){return t.type===y.select}function ft(t){return t.type===y.plural}function Yt(t){return t.type===y.pound}function mt(t){return t.type===y.tag}function pt(t){return!!(t&&typeof t=="object"&&t.type===F.number)}function q(t){return!!(t&&typeof t=="object"&&t.type===F.dateTime)}var gt=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Wt=/(?:[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 qt(t){var r={};return t.replace(Wt,function(e){var n=e.length;switch(e[0]){case"G":r.era=n===4?"long":n===5?"narrow":"short";break;case"y":r.year=n===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":r.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":r.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":r.weekday=n===4?"short":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][n-4];break;case"a":r.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":r.hourCycle="h12",r.hour=["numeric","2-digit"][n-1];break;case"H":r.hourCycle="h23",r.hour=["numeric","2-digit"][n-1];break;case"K":r.hourCycle="h11",r.hour=["numeric","2-digit"][n-1];break;case"k":r.hourCycle="h24",r.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":r.minute=["numeric","2-digit"][n-1];break;case"s":r.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":r.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),r}var zt=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Qt(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var r=t.split(zt).filter(function(f){return f.length>0}),e=[],n=0,i=r;n<i.length;n++){var o=i[n],a=o.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var s=a[0],c=a.slice(1),u=0,h=c;u<h.length;u++){var l=h[u];if(l.length===0)throw new Error("Invalid number skeleton")}e.push({stem:s,options:c})}return e}function Jt(t){return t.replace(/^(.*?)-/,"")}var bt=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Et=/^(@+)?(\+|#+)?[rs]?$/g,$t=/(\*)(0+)|(#+)(0+)|(0+)/g,yt=/^(0+)$/;function dt(t){var r={};return t[t.length-1]==="r"?r.roundingPriority="morePrecision":t[t.length-1]==="s"&&(r.roundingPriority="lessPrecision"),t.replace(Et,function(e,n,i){return typeof i!="string"?(r.minimumSignificantDigits=n.length,r.maximumSignificantDigits=n.length):i==="+"?r.minimumSignificantDigits=n.length:n[0]==="#"?r.maximumSignificantDigits=n.length:(r.minimumSignificantDigits=n.length,r.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),r}function vt(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 tr(t){var r;if(t[0]==="E"&&t[1]==="E"?(r={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(r={notation:"scientific"},t=t.slice(1)),r){var e=t.slice(0,2);if(e==="+!"?(r.signDisplay="always",t=t.slice(2)):e==="+?"&&(r.signDisplay="exceptZero",t=t.slice(2)),!yt.test(t))throw new Error("Malformed concise eng/scientific notation");r.minimumIntegerDigits=t.length}return r}function Tt(t){var r={},e=vt(t);return e||r}function rr(t){for(var r={},e=0,n=t;e<n.length;e++){var i=n[e];switch(i.stem){case"percent":case"%":r.style="percent";continue;case"%x100":r.style="percent",r.scale=100;continue;case"currency":r.style="currency",r.currency=i.options[0];continue;case"group-off":case",_":r.useGrouping=!1;continue;case"precision-integer":case".":r.maximumFractionDigits=0;continue;case"measure-unit":case"unit":r.style="unit",r.unit=Jt(i.options[0]);continue;case"compact-short":case"K":r.notation="compact",r.compactDisplay="short";continue;case"compact-long":case"KK":r.notation="compact",r.compactDisplay="long";continue;case"scientific":r=d(d(d({},r),{notation:"scientific"}),i.options.reduce(function(c,u){return d(d({},c),Tt(u))},{}));continue;case"engineering":r=d(d(d({},r),{notation:"engineering"}),i.options.reduce(function(c,u){return d(d({},c),Tt(u))},{}));continue;case"notation-simple":r.notation="standard";continue;case"unit-width-narrow":r.currencyDisplay="narrowSymbol",r.unitDisplay="narrow";continue;case"unit-width-short":r.currencyDisplay="code",r.unitDisplay="short";continue;case"unit-width-full-name":r.currencyDisplay="name",r.unitDisplay="long";continue;case"unit-width-iso-code":r.currencyDisplay="symbol";continue;case"scale":r.scale=parseFloat(i.options[0]);continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace($t,function(c,u,h,l,f,p){if(u)r.minimumIntegerDigits=h.length;else{if(l&&f)throw new Error("We currently do not support maximum integer digits");if(p)throw new Error("We currently do not support exact integer digits")}return""});continue}if(yt.test(i.stem)){r.minimumIntegerDigits=i.stem.length;continue}if(bt.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(bt,function(c,u,h,l,f,p){return h==="*"?r.minimumFractionDigits=u.length:l&&l[0]==="#"?r.maximumFractionDigits=l.length:f&&p?(r.minimumFractionDigits=f.length,r.maximumFractionDigits=f.length+p.length):(r.minimumFractionDigits=u.length,r.maximumFractionDigits=u.length),""});var o=i.options[0];o==="w"?r=d(d({},r),{trailingZeroDisplay:"stripIfInteger"}):o&&(r=d(d({},r),dt(o)));continue}if(Et.test(i.stem)){r=d(d({},r),dt(i.stem));continue}var a=vt(i.stem);a&&(r=d(d({},r),a));var s=tr(i.stem);s&&(r=d(d({},r),s))}return r}var x={"001":["H","h"],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"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],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"],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","hB","h","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"],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"],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"],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","h","K"],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"],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"],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"],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","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","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"],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"],TL:["H","hB","hb","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"],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"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","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"],"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 er(t,r){for(var e="",n=0;n<t.length;n++){var i=t.charAt(n);if(i==="j"){for(var o=0;n+1<t.length&&t.charAt(n+1)===i;)o++,n++;var a=1+(o&1),s=o<2?1:3+(o>>1),c="a",u=nr(r);for((u=="H"||u=="k")&&(s=0);s-- >0;)e+=c;for(;a-- >0;)e=u+e}else i==="J"?e+="H":e+=i}return e}function nr(t){var r=t.hourCycle;if(r===void 0&&t.hourCycles&&t.hourCycles.length&&(r=t.hourCycles[0]),r)switch(r){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var e=t.language,n;e!=="root"&&(n=t.maximize().region);var i=x[n||""]||x[e||""]||x["".concat(e,"-001")]||x["001"];return i[0]}var z,ir=new RegExp("^".concat(gt.source,"*")),or=new RegExp("".concat(gt.source,"*$"));function g(t,r){return{start:t,end:r}}var ar=!!String.prototype.startsWith,sr=!!String.fromCodePoint,hr=!!Object.fromEntries,ur=!!String.prototype.codePointAt,cr=!!String.prototype.trimStart,lr=!!String.prototype.trimEnd,fr=!!Number.isSafeInteger,mr=fr?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Q=!0;try{var pr=At("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Q=((z=pr.exec("a"))===null||z===void 0?void 0:z[0])==="a"}catch{Q=!1}var _t=ar?function(t,r,e){return t.startsWith(r,e)}:function(t,r,e){return t.slice(e,e+r.length)===r},J=sr?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e="",n=t.length,i=0,o;n>i;){if(o=t[i++],o>1114111)throw RangeError(o+" is not a valid code point");e+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return e},St=hr?Object.fromEntries:function(t){for(var r={},e=0,n=t;e<n.length;e++){var i=n[e],o=i[0],a=i[1];r[o]=a}return r},Ht=ur?function(t,r){return t.codePointAt(r)}:function(t,r){var e=t.length;if(!(r<0||r>=e)){var n=t.charCodeAt(r),i;return n<55296||n>56319||r+1===e||(i=t.charCodeAt(r+1))<56320||i>57343?n:(n-55296<<10)+(i-56320)+65536}},gr=cr?function(t){return t.trimStart()}:function(t){return t.replace(ir,"")},br=lr?function(t){return t.trimEnd()}:function(t){return t.replace(or,"")};function At(t,r){return new RegExp(t,r)}var $;if(Q){var Bt=At("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");$=function(t,r){var e;Bt.lastIndex=r;var n=Bt.exec(t);return(e=n[1])!==null&&e!==void 0?e:""}}else $=function(t,r){for(var e=[];;){var n=Ht(t,r);if(n===void 0||It(n)||vr(n))break;e.push(n),r+=n>=65536?2:1}return J.apply(void 0,e)};var Er=function(){function t(r,e){e===void 0&&(e={}),this.message=r,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(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(r,e,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var a=this.parseArgument(r,n);if(a.err)return a;i.push(a.val)}else{if(o===125&&r>0)break;if(o===35&&(e==="plural"||e==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:y.pound,location:g(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(m.UNMATCHED_CLOSING_TAG,g(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&tt(this.peek()||0)){var a=this.parseTag(r,e);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(r,e);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},t.prototype.parseTag=function(r,e){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:y.literal,value:"<".concat(i,"/>"),location:g(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(r+1,e,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!tt(this.char()))return this.error(m.INVALID_TAG,g(s,this.clonePosition()));var c=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(m.UNMATCHED_CLOSING_TAG,g(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:y.tag,value:i,children:a,location:g(n,this.clonePosition())},err:null}:this.error(m.INVALID_TAG,g(s,this.clonePosition())))}else return this.error(m.UNCLOSED_TAG,g(n,this.clonePosition()))}else return this.error(m.INVALID_TAG,g(n,this.clonePosition()))},t.prototype.parseTagName=function(){var r=this.offset();for(this.bump();!this.isEOF()&&dr(this.char());)this.bump();return this.message.slice(r,this.offset())},t.prototype.parseLiteral=function(r,e){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(e);if(o){i+=o;continue}var a=this.tryParseUnquoted(r,e);if(a){i+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var c=g(n,this.clonePosition());return{val:{type:y.literal,value:i,location:c},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!yr(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(r){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(r==="plural"||r==="selectordinal")break;return null;default:return null}this.bump();var e=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)e.push(39),this.bump();else{this.bump();break}else e.push(n);this.bump()}return J.apply(void 0,e)},t.prototype.tryParseUnquoted=function(r,e){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(e==="plural"||e==="selectordinal")||n===125&&r>0?null:(this.bump(),J(n))},t.prototype.parseArgument=function(r,e){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,g(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(m.EMPTY_ARGUMENT,g(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(m.MALFORMED_ARGUMENT,g(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,g(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:y.argument,value:i,location:g(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,g(n,this.clonePosition())):this.parseArgumentOptions(r,e,i,n);default:return this.error(m.MALFORMED_ARGUMENT,g(n,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var r=this.clonePosition(),e=this.offset(),n=$(this.message,e),i=e+n.length;this.bumpTo(i);var o=this.clonePosition(),a=g(r,o);return{value:n,location:a}},t.prototype.parseArgumentOptions=function(r,e,n,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(m.EXPECT_ARGUMENT_TYPE,g(a,c));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),l=this.parseSimpleArgStyleIfPossible();if(l.err)return l;var f=br(l.val);if(f.length===0)return this.error(m.EXPECT_ARGUMENT_STYLE,g(this.clonePosition(),this.clonePosition()));var p=g(h,this.clonePosition());u={style:f,styleLocation:p}}var T=this.tryParseArgumentClose(i);if(T.err)return T;var E=g(i,this.clonePosition());if(u&&_t(u==null?void 0:u.style,"::",0)){var _=gr(u.style.slice(2));if(s==="number"){var l=this.parseNumberSkeletonFromString(_,u.styleLocation);return l.err?l:{val:{type:y.number,value:n,location:E,style:l.val},err:null}}else{if(_.length===0)return this.error(m.EXPECT_DATE_TIME_SKELETON,E);var S=_;this.locale&&(S=er(_,this.locale));var f={type:F.dateTime,pattern:S,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?qt(S):{}},I=s==="date"?y.date:y.time;return{val:{type:I,value:n,location:E,style:f},err:null}}}return{val:{type:s==="number"?y.number:s==="date"?y.date:y.time,value:n,location:E,style:(o=u==null?void 0:u.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var H=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(m.EXPECT_SELECT_ARGUMENT_OPTIONS,g(H,d({},H)));this.bumpSpace();var V=this.parseIdentifierIfPossible(),U=0;if(s!=="select"&&V.value==="offset"){if(!this.bumpIf(":"))return this.error(m.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,g(this.clonePosition(),this.clonePosition()));this.bumpSpace();var l=this.tryParseDecimalInteger(m.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,m.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(l.err)return l;this.bumpSpace(),V=this.parseIdentifierIfPossible(),U=l.val}var Y=this.tryParsePluralOrSelectOptions(r,s,e,V);if(Y.err)return Y;var T=this.tryParseArgumentClose(i);if(T.err)return T;var Xt=g(i,this.clonePosition());return s==="select"?{val:{type:y.select,value:n,options:St(Y.val),location:Xt},err:null}:{val:{type:y.plural,value:n,options:St(Y.val),offset:U,pluralType:s==="plural"?"cardinal":"ordinal",location:Xt},err:null}}default:return this.error(m.INVALID_ARGUMENT_TYPE,g(a,c))}},t.prototype.tryParseArgumentClose=function(r){return this.isEOF()||this.char()!==125?this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,g(r,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var r=0,e=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(m.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,g(i,this.clonePosition()));this.bump();break}case 123:{r+=1,this.bump();break}case 125:{if(r>0)r-=1;else return{val:this.message.slice(e.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(e.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(r,e){var n=[];try{n=Qt(r)}catch{return this.error(m.INVALID_NUMBER_SKELETON,e)}return{val:{type:F.number,tokens:n,location:e,parsedOptions:this.shouldParseSkeletons?rr(n):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(r,e,n,i){for(var o,a=!1,s=[],c=new Set,u=i.value,h=i.location;;){if(u.length===0){var l=this.clonePosition();if(e!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(m.EXPECT_PLURAL_ARGUMENT_SELECTOR,m.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;h=g(l,this.clonePosition()),u=this.message.slice(l.offset,this.offset())}else break}if(c.has(u))return this.error(e==="select"?m.DUPLICATE_SELECT_ARGUMENT_SELECTOR:m.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);u==="other"&&(a=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error(e==="select"?m.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:m.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,g(this.clonePosition(),this.clonePosition()));var T=this.parseMessage(r+1,e,n);if(T.err)return T;var E=this.tryParseArgumentClose(p);if(E.err)return E;s.push([u,{value:T.val,location:g(p,this.clonePosition())}]),c.add(u),this.bumpSpace(),o=this.parseIdentifierIfPossible(),u=o.value,h=o.location}return s.length===0?this.error(e==="select"?m.EXPECT_SELECT_ARGUMENT_SELECTOR:m.EXPECT_PLURAL_ARGUMENT_SELECTOR,g(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(m.MISSING_OTHER_CLAUSE,g(this.clonePosition(),this.clonePosition())):{val:s,err:null}},t.prototype.tryParseDecimalInteger=function(r,e){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)o=!0,a=a*10+(s-48),this.bump();else break}var c=g(i,this.clonePosition());return o?(a*=n,mr(a)?{val:a,err:null}:this.error(e,c)):this.error(r,c)},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 r=this.position.offset;if(r>=this.message.length)throw Error("out of bound");var e=Ht(this.message,r);if(e===void 0)throw Error("Offset ".concat(r," is at invalid UTF-16 code unit boundary"));return e},t.prototype.error=function(r,e){return{val:null,err:{kind:r,message:this.message,location:e}}},t.prototype.bump=function(){if(!this.isEOF()){var r=this.char();r===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=r<65536?1:2)}},t.prototype.bumpIf=function(r){if(_t(this.message,r,this.offset())){for(var e=0;e<r.length;e++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(r){var e=this.offset(),n=this.message.indexOf(r,e);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(r){if(this.offset()>r)throw Error("targetOffset ".concat(r," must be greater than or equal to the current offset ").concat(this.offset()));for(r=Math.min(r,this.message.length);;){var e=this.offset();if(e===r)break;if(e>r)throw Error("targetOffset ".concat(r," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&It(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var r=this.char(),e=this.offset(),n=this.message.charCodeAt(e+(r>=65536?2:1));return n??null},t}();function tt(t){return t>=97&&t<=122||t>=65&&t<=90}function yr(t){return tt(t)||t===47}function dr(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||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 It(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function vr(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===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>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||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||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===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>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===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>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||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||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function rt(t){t.forEach(function(r){if(delete r.location,lt(r)||ft(r))for(var e in r.options)delete r.options[e].location,rt(r.options[e].value);else ht(r)&&pt(r.style)||(ut(r)||ct(r))&&q(r.style)?delete r.style.location:mt(r)&&rt(r.children)})}function Tr(t,r){r===void 0&&(r={}),r=d({shouldParseSkeletons:!0,requiresOtherClause:!0},r);var e=new Er(t,r).parse();if(e.err){var n=SyntaxError(m[e.err.kind]);throw n.location=e.err.location,n.originalMessage=e.err.message,n}return r!=null&&r.captureLocation||rt(e.val),e.val}function L(t,r){var e=r&&r.cache?r.cache:Ir,n=r&&r.serializer?r.serializer:Br,i=r&&r.strategy?r.strategy:Sr;return i(t,{cache:e,serializer:n})}function _r(t){return t==null||typeof t=="number"||typeof t=="boolean"}function Nt(t,r,e,n){var i=_r(n)?n:e(n),o=r.get(i);return typeof o>"u"&&(o=t.call(this,n),r.set(i,o)),o}function Lt(t,r,e){var n=Array.prototype.slice.call(arguments,3),i=e(n),o=r.get(i);return typeof o>"u"&&(o=t.apply(this,n),r.set(i,o)),o}function et(t,r,e,n,i){return e.bind(r,t,n,i)}function Sr(t,r){var e=t.length===1?Nt:Lt;return et(t,this,e,r.cache.create(),r.serializer)}function Hr(t,r){return et(t,this,Lt,r.cache.create(),r.serializer)}function Ar(t,r){return et(t,this,Nt,r.cache.create(),r.serializer)}var Br=function(){return JSON.stringify(arguments)};function nt(){this.cache=Object.create(null)}nt.prototype.get=function(t){return this.cache[t]},nt.prototype.set=function(t,r){this.cache[t]=r};var Ir={create:function(){return new nt}},P={variadic:Hr,monadic:Ar},R;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(R||(R={}));var C=function(t){N(r,t);function r(e,n,i){var o=t.call(this,e)||this;return o.code=n,o.originalMessage=i,o}return r.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},r}(Error),Pt=function(t){N(r,t);function r(e,n,i,o){return t.call(this,'Invalid values for "'.concat(e,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),R.INVALID_VALUE,o)||this}return r}(C),Nr=function(t){N(r,t);function r(e,n,i){return t.call(this,'Value for "'.concat(e,'" must be of type ').concat(n),R.INVALID_VALUE,i)||this}return r}(C),Lr=function(t){N(r,t);function r(e,n){return t.call(this,'The intl string context variable "'.concat(e,'" was not provided to the string "').concat(n,'"'),R.MISSING_VALUE,n)||this}return r}(C),A;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(A||(A={}));function Pr(t){return t.length<2?t:t.reduce(function(r,e){var n=r[r.length-1];return!n||n.type!==A.literal||e.type!==A.literal?r.push(e):n.value+=e.value,r},[])}function Rr(t){return typeof t=="function"}function X(t,r,e,n,i,o,a){if(t.length===1&&st(t[0]))return[{type:A.literal,value:t[0].value}];for(var s=[],c=0,u=t;c<u.length;c++){var h=u[c];if(st(h)){s.push({type:A.literal,value:h.value});continue}if(Yt(h)){typeof o=="number"&&s.push({type:A.literal,value:e.getNumberFormat(r).format(o)});continue}var l=h.value;if(!(i&&l in i))throw new Lr(l,a);var f=i[l];if(Zt(h)){(!f||typeof f=="string"||typeof f=="number")&&(f=typeof f=="string"||typeof f=="number"?String(f):""),s.push({type:typeof f=="string"?A.literal:A.object,value:f});continue}if(ut(h)){var p=typeof h.style=="string"?n.date[h.style]:q(h.style)?h.style.parsedOptions:void 0;s.push({type:A.literal,value:e.getDateTimeFormat(r,p).format(f)});continue}if(ct(h)){var p=typeof h.style=="string"?n.time[h.style]:q(h.style)?h.style.parsedOptions:n.time.medium;s.push({type:A.literal,value:e.getDateTimeFormat(r,p).format(f)});continue}if(ht(h)){var p=typeof h.style=="string"?n.number[h.style]:pt(h.style)?h.style.parsedOptions:void 0;p&&p.scale&&(f=f*(p.scale||1)),s.push({type:A.literal,value:e.getNumberFormat(r,p).format(f)});continue}if(mt(h)){var T=h.children,E=h.value,_=i[E];if(!Rr(_))throw new Nr(E,"function",a);var S=X(T,r,e,n,i,o),I=_(S.map(function(U){return U.value}));Array.isArray(I)||(I=[I]),s.push.apply(s,I.map(function(U){return{type:typeof U=="string"?A.literal:A.object,value:U}}))}if(lt(h)){var H=h.options[f]||h.options.other;if(!H)throw new Pt(h.value,f,Object.keys(h.options),a);s.push.apply(s,X(H.value,r,e,n,i));continue}if(ft(h)){var H=h.options["=".concat(f)];if(!H){if(!Intl.PluralRules)throw new C(`Intl.PluralRules is not available in this environment.
|
|
1
|
+
(function(C,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],y):(C=typeof globalThis<"u"?globalThis:C||self,y(C["kong-ui-public-misc-widgets"]={},C.Vue))})(this,function(C,y){"use strict";var Y=function(t,r){return Y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},Y(t,r)};function N(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");Y(t,r);function e(){this.constructor=t}t.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}var m=function(){return m=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++){r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},m.apply(this,arguments)};function Xt(t,r){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(e[n[i]]=t[n[i]]);return e}function R(t,r,e){if(e||arguments.length===2)for(var n=0,i=r.length,o;n<i;n++)(o||!(n in r))&&(o||(o=Array.prototype.slice.call(r,0,n)),o[n]=r[n]);return t.concat(o||Array.prototype.slice.call(r))}var p;(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"})(p||(p={}));var d;(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"})(d||(d={}));var U;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(U||(U={}));function at(t){return t.type===d.literal}function Kt(t){return t.type===d.argument}function st(t){return t.type===d.number}function ht(t){return t.type===d.date}function ut(t){return t.type===d.time}function ct(t){return t.type===d.select}function lt(t){return t.type===d.plural}function Zt(t){return t.type===d.pound}function ft(t){return t.type===d.tag}function mt(t){return!!(t&&typeof t=="object"&&t.type===U.number)}function W(t){return!!(t&&typeof t=="object"&&t.type===U.dateTime)}var pt=/[ \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 Wt(t){var r={};return t.replace(Yt,function(e){var n=e.length;switch(e[0]){case"G":r.era=n===4?"long":n===5?"narrow":"short";break;case"y":r.year=n===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":r.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":r.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":r.weekday=n===4?"short":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][n-4];break;case"a":r.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":r.hourCycle="h12",r.hour=["numeric","2-digit"][n-1];break;case"H":r.hourCycle="h23",r.hour=["numeric","2-digit"][n-1];break;case"K":r.hourCycle="h11",r.hour=["numeric","2-digit"][n-1];break;case"k":r.hourCycle="h24",r.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":r.minute=["numeric","2-digit"][n-1];break;case"s":r.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":r.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),r}var qt=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function zt(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var r=t.split(qt).filter(function(f){return f.length>0}),e=[],n=0,i=r;n<i.length;n++){var o=i[n],a=o.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var s=a[0],c=a.slice(1),u=0,h=c;u<h.length;u++){var l=h[u];if(l.length===0)throw new Error("Invalid number skeleton")}e.push({stem:s,options:c})}return e}function Qt(t){return t.replace(/^(.*?)-/,"")}var gt=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,bt=/^(@+)?(\+|#+)?[rs]?$/g,Jt=/(\*)(0+)|(#+)(0+)|(0+)/g,Et=/^(0+)$/;function dt(t){var r={};return t[t.length-1]==="r"?r.roundingPriority="morePrecision":t[t.length-1]==="s"&&(r.roundingPriority="lessPrecision"),t.replace(bt,function(e,n,i){return typeof i!="string"?(r.minimumSignificantDigits=n.length,r.maximumSignificantDigits=n.length):i==="+"?r.minimumSignificantDigits=n.length:n[0]==="#"?r.maximumSignificantDigits=n.length:(r.minimumSignificantDigits=n.length,r.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),r}function yt(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 $t(t){var r;if(t[0]==="E"&&t[1]==="E"?(r={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(r={notation:"scientific"},t=t.slice(1)),r){var e=t.slice(0,2);if(e==="+!"?(r.signDisplay="always",t=t.slice(2)):e==="+?"&&(r.signDisplay="exceptZero",t=t.slice(2)),!Et.test(t))throw new Error("Malformed concise eng/scientific notation");r.minimumIntegerDigits=t.length}return r}function vt(t){var r={},e=yt(t);return e||r}function tr(t){for(var r={},e=0,n=t;e<n.length;e++){var i=n[e];switch(i.stem){case"percent":case"%":r.style="percent";continue;case"%x100":r.style="percent",r.scale=100;continue;case"currency":r.style="currency",r.currency=i.options[0];continue;case"group-off":case",_":r.useGrouping=!1;continue;case"precision-integer":case".":r.maximumFractionDigits=0;continue;case"measure-unit":case"unit":r.style="unit",r.unit=Qt(i.options[0]);continue;case"compact-short":case"K":r.notation="compact",r.compactDisplay="short";continue;case"compact-long":case"KK":r.notation="compact",r.compactDisplay="long";continue;case"scientific":r=m(m(m({},r),{notation:"scientific"}),i.options.reduce(function(c,u){return m(m({},c),vt(u))},{}));continue;case"engineering":r=m(m(m({},r),{notation:"engineering"}),i.options.reduce(function(c,u){return m(m({},c),vt(u))},{}));continue;case"notation-simple":r.notation="standard";continue;case"unit-width-narrow":r.currencyDisplay="narrowSymbol",r.unitDisplay="narrow";continue;case"unit-width-short":r.currencyDisplay="code",r.unitDisplay="short";continue;case"unit-width-full-name":r.currencyDisplay="name",r.unitDisplay="long";continue;case"unit-width-iso-code":r.currencyDisplay="symbol";continue;case"scale":r.scale=parseFloat(i.options[0]);continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Jt,function(c,u,h,l,f,g){if(u)r.minimumIntegerDigits=h.length;else{if(l&&f)throw new Error("We currently do not support maximum integer digits");if(g)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Et.test(i.stem)){r.minimumIntegerDigits=i.stem.length;continue}if(gt.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(gt,function(c,u,h,l,f,g){return h==="*"?r.minimumFractionDigits=u.length:l&&l[0]==="#"?r.maximumFractionDigits=l.length:f&&g?(r.minimumFractionDigits=f.length,r.maximumFractionDigits=f.length+g.length):(r.minimumFractionDigits=u.length,r.maximumFractionDigits=u.length),""});var o=i.options[0];o==="w"?r=m(m({},r),{trailingZeroDisplay:"stripIfInteger"}):o&&(r=m(m({},r),dt(o)));continue}if(bt.test(i.stem)){r=m(m({},r),dt(i.stem));continue}var a=yt(i.stem);a&&(r=m(m({},r),a));var s=$t(i.stem);s&&(r=m(m({},r),s))}return r}var V={"001":["H","h"],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"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],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"],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","hB","h","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"],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"],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"],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","h","K"],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"],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"],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"],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","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","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"],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"],TL:["H","hB","hb","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"],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"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","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"],"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 rr(t,r){for(var e="",n=0;n<t.length;n++){var i=t.charAt(n);if(i==="j"){for(var o=0;n+1<t.length&&t.charAt(n+1)===i;)o++,n++;var a=1+(o&1),s=o<2?1:3+(o>>1),c="a",u=er(r);for((u=="H"||u=="k")&&(s=0);s-- >0;)e+=c;for(;a-- >0;)e=u+e}else i==="J"?e+="H":e+=i}return e}function er(t){var r=t.hourCycle;if(r===void 0&&t.hourCycles&&t.hourCycles.length&&(r=t.hourCycles[0]),r)switch(r){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var e=t.language,n;e!=="root"&&(n=t.maximize().region);var i=V[n||""]||V[e||""]||V["".concat(e,"-001")]||V["001"];return i[0]}var q,nr=new RegExp("^".concat(pt.source,"*")),ir=new RegExp("".concat(pt.source,"*$"));function b(t,r){return{start:t,end:r}}var or=!!String.prototype.startsWith,ar=!!String.fromCodePoint,sr=!!Object.fromEntries,hr=!!String.prototype.codePointAt,ur=!!String.prototype.trimStart,cr=!!String.prototype.trimEnd,lr=!!Number.isSafeInteger,fr=lr?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},z=!0;try{var mr=St("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");z=((q=mr.exec("a"))===null||q===void 0?void 0:q[0])==="a"}catch{z=!1}var Tt=or?function(t,r,e){return t.startsWith(r,e)}:function(t,r,e){return t.slice(e,e+r.length)===r},Q=ar?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e="",n=t.length,i=0,o;n>i;){if(o=t[i++],o>1114111)throw RangeError(o+" is not a valid code point");e+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return e},_t=sr?Object.fromEntries:function(t){for(var r={},e=0,n=t;e<n.length;e++){var i=n[e],o=i[0],a=i[1];r[o]=a}return r},Ht=hr?function(t,r){return t.codePointAt(r)}:function(t,r){var e=t.length;if(!(r<0||r>=e)){var n=t.charCodeAt(r),i;return n<55296||n>56319||r+1===e||(i=t.charCodeAt(r+1))<56320||i>57343?n:(n-55296<<10)+(i-56320)+65536}},pr=ur?function(t){return t.trimStart()}:function(t){return t.replace(nr,"")},gr=cr?function(t){return t.trimEnd()}:function(t){return t.replace(ir,"")};function St(t,r){return new RegExp(t,r)}var J;if(z){var At=St("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");J=function(t,r){var e;At.lastIndex=r;var n=At.exec(t);return(e=n[1])!==null&&e!==void 0?e:""}}else J=function(t,r){for(var e=[];;){var n=Ht(t,r);if(n===void 0||Bt(n)||yr(n))break;e.push(n),r+=n>=65536?2:1}return Q.apply(void 0,e)};var br=function(){function t(r,e){e===void 0&&(e={}),this.message=r,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(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(r,e,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var a=this.parseArgument(r,n);if(a.err)return a;i.push(a.val)}else{if(o===125&&r>0)break;if(o===35&&(e==="plural"||e==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:d.pound,location:b(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(p.UNMATCHED_CLOSING_TAG,b(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&$(this.peek()||0)){var a=this.parseTag(r,e);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(r,e);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},t.prototype.parseTag=function(r,e){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:d.literal,value:"<".concat(i,"/>"),location:b(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(r+1,e,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!$(this.char()))return this.error(p.INVALID_TAG,b(s,this.clonePosition()));var c=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(p.UNMATCHED_CLOSING_TAG,b(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:d.tag,value:i,children:a,location:b(n,this.clonePosition())},err:null}:this.error(p.INVALID_TAG,b(s,this.clonePosition())))}else return this.error(p.UNCLOSED_TAG,b(n,this.clonePosition()))}else return this.error(p.INVALID_TAG,b(n,this.clonePosition()))},t.prototype.parseTagName=function(){var r=this.offset();for(this.bump();!this.isEOF()&&dr(this.char());)this.bump();return this.message.slice(r,this.offset())},t.prototype.parseLiteral=function(r,e){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(e);if(o){i+=o;continue}var a=this.tryParseUnquoted(r,e);if(a){i+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var c=b(n,this.clonePosition());return{val:{type:d.literal,value:i,location:c},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Er(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(r){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(r==="plural"||r==="selectordinal")break;return null;default:return null}this.bump();var e=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)e.push(39),this.bump();else{this.bump();break}else e.push(n);this.bump()}return Q.apply(void 0,e)},t.prototype.tryParseUnquoted=function(r,e){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(e==="plural"||e==="selectordinal")||n===125&&r>0?null:(this.bump(),Q(n))},t.prototype.parseArgument=function(r,e){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(p.EXPECT_ARGUMENT_CLOSING_BRACE,b(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(p.EMPTY_ARGUMENT,b(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(p.MALFORMED_ARGUMENT,b(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(p.EXPECT_ARGUMENT_CLOSING_BRACE,b(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:d.argument,value:i,location:b(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(p.EXPECT_ARGUMENT_CLOSING_BRACE,b(n,this.clonePosition())):this.parseArgumentOptions(r,e,i,n);default:return this.error(p.MALFORMED_ARGUMENT,b(n,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var r=this.clonePosition(),e=this.offset(),n=J(this.message,e),i=e+n.length;this.bumpTo(i);var o=this.clonePosition(),a=b(r,o);return{value:n,location:a}},t.prototype.parseArgumentOptions=function(r,e,n,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(p.EXPECT_ARGUMENT_TYPE,b(a,c));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),l=this.parseSimpleArgStyleIfPossible();if(l.err)return l;var f=gr(l.val);if(f.length===0)return this.error(p.EXPECT_ARGUMENT_STYLE,b(this.clonePosition(),this.clonePosition()));var g=b(h,this.clonePosition());u={style:f,styleLocation:g}}var v=this.tryParseArgumentClose(i);if(v.err)return v;var E=b(i,this.clonePosition());if(u&&Tt(u==null?void 0:u.style,"::",0)){var T=pr(u.style.slice(2));if(s==="number"){var l=this.parseNumberSkeletonFromString(T,u.styleLocation);return l.err?l:{val:{type:d.number,value:n,location:E,style:l.val},err:null}}else{if(T.length===0)return this.error(p.EXPECT_DATE_TIME_SKELETON,E);var _=T;this.locale&&(_=rr(T,this.locale));var f={type:U.dateTime,pattern:_,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?Wt(_):{}},B=s==="date"?d.date:d.time;return{val:{type:B,value:n,location:E,style:f},err:null}}}return{val:{type:s==="number"?d.number:s==="date"?d.date:d.time,value:n,location:E,style:(o=u==null?void 0:u.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var H=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(p.EXPECT_SELECT_ARGUMENT_OPTIONS,b(H,m({},H)));this.bumpSpace();var j=this.parseIdentifierIfPossible(),G=0;if(s!=="select"&&j.value==="offset"){if(!this.bumpIf(":"))return this.error(p.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,b(this.clonePosition(),this.clonePosition()));this.bumpSpace();var l=this.tryParseDecimalInteger(p.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,p.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(l.err)return l;this.bumpSpace(),j=this.parseIdentifierIfPossible(),G=l.val}var Z=this.tryParsePluralOrSelectOptions(r,s,e,j);if(Z.err)return Z;var v=this.tryParseArgumentClose(i);if(v.err)return v;var xt=b(i,this.clonePosition());return s==="select"?{val:{type:d.select,value:n,options:_t(Z.val),location:xt},err:null}:{val:{type:d.plural,value:n,options:_t(Z.val),offset:G,pluralType:s==="plural"?"cardinal":"ordinal",location:xt},err:null}}default:return this.error(p.INVALID_ARGUMENT_TYPE,b(a,c))}},t.prototype.tryParseArgumentClose=function(r){return this.isEOF()||this.char()!==125?this.error(p.EXPECT_ARGUMENT_CLOSING_BRACE,b(r,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var r=0,e=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(p.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,b(i,this.clonePosition()));this.bump();break}case 123:{r+=1,this.bump();break}case 125:{if(r>0)r-=1;else return{val:this.message.slice(e.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(e.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(r,e){var n=[];try{n=zt(r)}catch{return this.error(p.INVALID_NUMBER_SKELETON,e)}return{val:{type:U.number,tokens:n,location:e,parsedOptions:this.shouldParseSkeletons?tr(n):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(r,e,n,i){for(var o,a=!1,s=[],c=new Set,u=i.value,h=i.location;;){if(u.length===0){var l=this.clonePosition();if(e!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(p.EXPECT_PLURAL_ARGUMENT_SELECTOR,p.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;h=b(l,this.clonePosition()),u=this.message.slice(l.offset,this.offset())}else break}if(c.has(u))return this.error(e==="select"?p.DUPLICATE_SELECT_ARGUMENT_SELECTOR:p.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);u==="other"&&(a=!0),this.bumpSpace();var g=this.clonePosition();if(!this.bumpIf("{"))return this.error(e==="select"?p.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:p.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,b(this.clonePosition(),this.clonePosition()));var v=this.parseMessage(r+1,e,n);if(v.err)return v;var E=this.tryParseArgumentClose(g);if(E.err)return E;s.push([u,{value:v.val,location:b(g,this.clonePosition())}]),c.add(u),this.bumpSpace(),o=this.parseIdentifierIfPossible(),u=o.value,h=o.location}return s.length===0?this.error(e==="select"?p.EXPECT_SELECT_ARGUMENT_SELECTOR:p.EXPECT_PLURAL_ARGUMENT_SELECTOR,b(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(p.MISSING_OTHER_CLAUSE,b(this.clonePosition(),this.clonePosition())):{val:s,err:null}},t.prototype.tryParseDecimalInteger=function(r,e){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)o=!0,a=a*10+(s-48),this.bump();else break}var c=b(i,this.clonePosition());return o?(a*=n,fr(a)?{val:a,err:null}:this.error(e,c)):this.error(r,c)},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 r=this.position.offset;if(r>=this.message.length)throw Error("out of bound");var e=Ht(this.message,r);if(e===void 0)throw Error("Offset ".concat(r," is at invalid UTF-16 code unit boundary"));return e},t.prototype.error=function(r,e){return{val:null,err:{kind:r,message:this.message,location:e}}},t.prototype.bump=function(){if(!this.isEOF()){var r=this.char();r===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=r<65536?1:2)}},t.prototype.bumpIf=function(r){if(Tt(this.message,r,this.offset())){for(var e=0;e<r.length;e++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(r){var e=this.offset(),n=this.message.indexOf(r,e);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(r){if(this.offset()>r)throw Error("targetOffset ".concat(r," must be greater than or equal to the current offset ").concat(this.offset()));for(r=Math.min(r,this.message.length);;){var e=this.offset();if(e===r)break;if(e>r)throw Error("targetOffset ".concat(r," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&Bt(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var r=this.char(),e=this.offset(),n=this.message.charCodeAt(e+(r>=65536?2:1));return n??null},t}();function $(t){return t>=97&&t<=122||t>=65&&t<=90}function Er(t){return $(t)||t===47}function dr(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||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 Bt(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function yr(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===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>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||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||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===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>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===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>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||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||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function tt(t){t.forEach(function(r){if(delete r.location,ct(r)||lt(r))for(var e in r.options)delete r.options[e].location,tt(r.options[e].value);else st(r)&&mt(r.style)||(ht(r)||ut(r))&&W(r.style)?delete r.style.location:ft(r)&&tt(r.children)})}function vr(t,r){r===void 0&&(r={}),r=m({shouldParseSkeletons:!0,requiresOtherClause:!0},r);var e=new br(t,r).parse();if(e.err){var n=SyntaxError(p[e.err.kind]);throw n.location=e.err.location,n.originalMessage=e.err.message,n}return r!=null&&r.captureLocation||tt(e.val),e.val}function I(t,r){var e=r&&r.cache?r.cache:Br,n=r&&r.serializer?r.serializer:Ar,i=r&&r.strategy?r.strategy:_r;return i(t,{cache:e,serializer:n})}function Tr(t){return t==null||typeof t=="number"||typeof t=="boolean"}function Nt(t,r,e,n){var i=Tr(n)?n:e(n),o=r.get(i);return typeof o>"u"&&(o=t.call(this,n),r.set(i,o)),o}function It(t,r,e){var n=Array.prototype.slice.call(arguments,3),i=e(n),o=r.get(i);return typeof o>"u"&&(o=t.apply(this,n),r.set(i,o)),o}function rt(t,r,e,n,i){return e.bind(r,t,n,i)}function _r(t,r){var e=t.length===1?Nt:It;return rt(t,this,e,r.cache.create(),r.serializer)}function Hr(t,r){return rt(t,this,It,r.cache.create(),r.serializer)}function Sr(t,r){return rt(t,this,Nt,r.cache.create(),r.serializer)}var Ar=function(){return JSON.stringify(arguments)};function et(){this.cache=Object.create(null)}et.prototype.get=function(t){return this.cache[t]},et.prototype.set=function(t,r){this.cache[t]=r};var Br={create:function(){return new et}},L={variadic:Hr,monadic:Sr},P;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(P||(P={}));var O=function(t){N(r,t);function r(e,n,i){var o=t.call(this,e)||this;return o.code=n,o.originalMessage=i,o}return r.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},r}(Error),Lt=function(t){N(r,t);function r(e,n,i,o){return t.call(this,'Invalid values for "'.concat(e,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),P.INVALID_VALUE,o)||this}return r}(O),Nr=function(t){N(r,t);function r(e,n,i){return t.call(this,'Value for "'.concat(e,'" must be of type ').concat(n),P.INVALID_VALUE,i)||this}return r}(O),Ir=function(t){N(r,t);function r(e,n){return t.call(this,'The intl string context variable "'.concat(e,'" was not provided to the string "').concat(n,'"'),P.MISSING_VALUE,n)||this}return r}(O),S;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(S||(S={}));function Lr(t){return t.length<2?t:t.reduce(function(r,e){var n=r[r.length-1];return!n||n.type!==S.literal||e.type!==S.literal?r.push(e):n.value+=e.value,r},[])}function Pr(t){return typeof t=="function"}function x(t,r,e,n,i,o,a){if(t.length===1&&at(t[0]))return[{type:S.literal,value:t[0].value}];for(var s=[],c=0,u=t;c<u.length;c++){var h=u[c];if(at(h)){s.push({type:S.literal,value:h.value});continue}if(Zt(h)){typeof o=="number"&&s.push({type:S.literal,value:e.getNumberFormat(r).format(o)});continue}var l=h.value;if(!(i&&l in i))throw new Ir(l,a);var f=i[l];if(Kt(h)){(!f||typeof f=="string"||typeof f=="number")&&(f=typeof f=="string"||typeof f=="number"?String(f):""),s.push({type:typeof f=="string"?S.literal:S.object,value:f});continue}if(ht(h)){var g=typeof h.style=="string"?n.date[h.style]:W(h.style)?h.style.parsedOptions:void 0;s.push({type:S.literal,value:e.getDateTimeFormat(r,g).format(f)});continue}if(ut(h)){var g=typeof h.style=="string"?n.time[h.style]:W(h.style)?h.style.parsedOptions:n.time.medium;s.push({type:S.literal,value:e.getDateTimeFormat(r,g).format(f)});continue}if(st(h)){var g=typeof h.style=="string"?n.number[h.style]:mt(h.style)?h.style.parsedOptions:void 0;g&&g.scale&&(f=f*(g.scale||1)),s.push({type:S.literal,value:e.getNumberFormat(r,g).format(f)});continue}if(ft(h)){var v=h.children,E=h.value,T=i[E];if(!Pr(T))throw new Nr(E,"function",a);var _=x(v,r,e,n,i,o),B=T(_.map(function(G){return G.value}));Array.isArray(B)||(B=[B]),s.push.apply(s,B.map(function(G){return{type:typeof G=="string"?S.literal:S.object,value:G}}))}if(ct(h)){var H=h.options[f]||h.options.other;if(!H)throw new Lt(h.value,f,Object.keys(h.options),a);s.push.apply(s,x(H.value,r,e,n,i));continue}if(lt(h)){var H=h.options["=".concat(f)];if(!H){if(!Intl.PluralRules)throw new O(`Intl.PluralRules is not available in this environment.
|
|
2
2
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
-
`,
|
|
3
|
+
`,P.MISSING_INTL_API,a);var j=e.getPluralRules(r,{type:h.pluralType}).select(f-(h.offset||0));H=h.options[j]||h.options.other}if(!H)throw new Lt(h.value,f,Object.keys(h.options),a);s.push.apply(s,x(H.value,r,e,n,i,f-(h.offset||0)));continue}}return Lr(s)}function Rr(t,r){return r?m(m(m({},t||{}),r||{}),Object.keys(t).reduce(function(e,n){return e[n]=m(m({},t[n]),r[n]||{}),e},{})):t}function Or(t,r){return r?Object.keys(t).reduce(function(e,n){return e[n]=Rr(t[n],r[n]),e},m({},t)):t}function nt(t){return{create:function(){return{get:function(r){return t[r]},set:function(r,e){t[r]=e}}}}}function Cr(t){return t===void 0&&(t={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:I(function(){for(var r,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((r=Intl.NumberFormat).bind.apply(r,R([void 0],e,!1)))},{cache:nt(t.number),strategy:L.variadic}),getDateTimeFormat:I(function(){for(var r,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((r=Intl.DateTimeFormat).bind.apply(r,R([void 0],e,!1)))},{cache:nt(t.dateTime),strategy:L.variadic}),getPluralRules:I(function(){for(var r,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((r=Intl.PluralRules).bind.apply(r,R([void 0],e,!1)))},{cache:nt(t.pluralRules),strategy:L.variadic})}}var Pt=function(){function t(r,e,n,i){e===void 0&&(e=t.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(c){var u=o.formatToParts(c);if(u.length===1)return u[0].value;var h=u.reduce(function(l,f){return!l.length||f.type!==S.literal||typeof l[l.length-1]!="string"?l.push(f.value):l[l.length-1]+=f.value,l},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(c){return x(o.ast,o.locales,o.formatters,o.formats,c,void 0,o.message)},this.resolvedOptions=function(){var c;return{locale:((c=o.resolvedLocale)===null||c===void 0?void 0:c.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=e,this.resolvedLocale=t.resolveLocale(e),typeof r=="string"){if(this.message=r,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var a=i||{};a.formatters;var s=Xt(a,["formatters"]);this.ast=t.__parse(r,m(m({},s),{locale:this.resolvedLocale}))}else this.ast=r;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Or(t.formats,n),this.formatters=i&&i.formatters||Cr(this.formatterCache)}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(r){if(!(typeof Intl.Locale>"u")){var e=Intl.NumberFormat.supportedLocalesOf(r);return e.length>0?new Intl.Locale(e[0]):new Intl.Locale(typeof r=="string"?r:r[0])}},t.__parse=vr,t.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"}}},t}(),M;(function(t){t.FORMAT_ERROR="FORMAT_ERROR",t.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",t.INVALID_CONFIG="INVALID_CONFIG",t.MISSING_DATA="MISSING_DATA",t.MISSING_TRANSLATION="MISSING_TRANSLATION"})(M||(M={}));var F=function(t){N(r,t);function r(e,n,i){var o=this,a=i?i instanceof Error?i:new Error(String(i)):void 0;return o=t.call(this,"[@formatjs/intl Error ".concat(e,"] ").concat(n,`
|
|
4
4
|
`).concat(a?`
|
|
5
5
|
`.concat(a.message,`
|
|
6
|
-
`).concat(a.stack):""))||this,o.code=e,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(o,r),o}return r}(Error),
|
|
6
|
+
`).concat(a.stack):""))||this,o.code=e,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(o,r),o}return r}(Error),Mr=function(t){N(r,t);function r(e,n){return t.call(this,M.UNSUPPORTED_FORMATTER,e,n)||this}return r}(F),Dr=function(t){N(r,t);function r(e,n){return t.call(this,M.INVALID_CONFIG,e,n)||this}return r}(F),Rt=function(t){N(r,t);function r(e,n){return t.call(this,M.MISSING_DATA,e,n)||this}return r}(F),A=function(t){N(r,t);function r(e,n,i){var o=t.call(this,M.FORMAT_ERROR,"".concat(e,`
|
|
7
7
|
Locale: `).concat(n,`
|
|
8
|
-
`),i)||this;return o.locale=n,o}return r}(
|
|
8
|
+
`),i)||this;return o.locale=n,o}return r}(F),it=function(t){N(r,t);function r(e,n,i,o){var a=t.call(this,"".concat(e,`
|
|
9
9
|
MessageID: `).concat(i==null?void 0:i.id,`
|
|
10
10
|
Default Message: `).concat(i==null?void 0:i.defaultMessage,`
|
|
11
11
|
Description: `).concat(i==null?void 0:i.description,`
|
|
12
|
-
`),n,o)||this;return a.descriptor=i,a.locale=n,a}return r}(
|
|
12
|
+
`),n,o)||this;return a.descriptor=i,a.locale=n,a}return r}(A),wr=function(t){N(r,t);function r(e,n){var i=t.call(this,M.MISSING_TRANSLATION,'Missing message: "'.concat(e.id,'" for locale "').concat(n,'", using ').concat(e.defaultMessage?"default message (".concat(typeof e.defaultMessage=="string"?e.defaultMessage:e.defaultMessage.map(function(o){var a;return(a=o.value)!==null&&a!==void 0?a:JSON.stringify(o)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=e,i}return r}(F);function D(t,r,e){return e===void 0&&(e={}),r.reduce(function(n,i){return i in t?n[i]=t[i]:i in e&&(n[i]=e[i]),n},{})}var Gr=function(t){process.env.NODE_ENV!=="production"&&console.error(t)},Ur=function(t){process.env.NODE_ENV!=="production"&&console.warn(t)},Fr={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:Gr,onWarn:Ur};function Ot(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function w(t){return{create:function(){return{get:function(r){return t[r]},set:function(r,e){t[r]=e}}}}}function kr(t){t===void 0&&(t=Ot());var r=Intl.RelativeTimeFormat,e=Intl.ListFormat,n=Intl.DisplayNames,i=I(function(){for(var s,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return new((s=Intl.DateTimeFormat).bind.apply(s,R([void 0],c,!1)))},{cache:w(t.dateTime),strategy:L.variadic}),o=I(function(){for(var s,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return new((s=Intl.NumberFormat).bind.apply(s,R([void 0],c,!1)))},{cache:w(t.number),strategy:L.variadic}),a=I(function(){for(var s,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return new((s=Intl.PluralRules).bind.apply(s,R([void 0],c,!1)))},{cache:w(t.pluralRules),strategy:L.variadic});return{getDateTimeFormat:i,getNumberFormat:o,getMessageFormat:I(function(s,c,u,h){return new Pt(s,c,u,m({formatters:{getNumberFormat:o,getDateTimeFormat:i,getPluralRules:a}},h||{}))},{cache:w(t.message),strategy:L.variadic}),getRelativeTimeFormat:I(function(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];return new(r.bind.apply(r,R([void 0],s,!1)))},{cache:w(t.relativeTime),strategy:L.variadic}),getPluralRules:a,getListFormat:I(function(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];return new(e.bind.apply(e,R([void 0],s,!1)))},{cache:w(t.list),strategy:L.variadic}),getDisplayNames:I(function(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];return new(n.bind.apply(n,R([void 0],s,!1)))},{cache:w(t.displayNames),strategy:L.variadic})}}function ot(t,r,e,n){var i=t&&t[r],o;if(i&&(o=i[e]),o)return o;n(new Mr("No ".concat(r," format named: ").concat(e)))}function jr(t,r,e){if(e===void 0&&(e=Error),!t)throw new e(r)}function X(t,r){return Object.keys(t).reduce(function(e,n){return e[n]=m({timeZone:r},t[n]),e},{})}function Ct(t,r){var e=Object.keys(m(m({},t),r));return e.reduce(function(n,i){return n[i]=m(m({},t[i]||{}),r[i]||{}),n},{})}function Mt(t,r){if(!r)return t;var e=Pt.formats;return m(m(m({},e),t),{date:Ct(X(e.date,r),X(t.date||{},r)),time:Ct(X(e.time,r),X(t.time||{},r))})}var Dt=function(t,r,e,n,i){var o=t.locale,a=t.formats,s=t.messages,c=t.defaultLocale,u=t.defaultFormats,h=t.fallbackOnEmptyString,l=t.onError,f=t.timeZone,g=t.defaultRichTextElements;e===void 0&&(e={id:""});var v=e.id,E=e.defaultMessage;jr(!!v,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var T=String(v),_=s&&Object.prototype.hasOwnProperty.call(s,T)&&s[T];if(Array.isArray(_)&&_.length===1&&_[0].type===d.literal)return _[0].value;if(!n&&_&&typeof _=="string"&&!g)return _.replace(/'\{(.*?)\}'/gi,"{$1}");if(n=m(m({},g),n||{}),a=Mt(a,f),u=Mt(u,f),!_){if(h===!1&&_==="")return _;if((!E||o&&o.toLowerCase()!==c.toLowerCase())&&l(new wr(e,o)),E)try{var B=r.getMessageFormat(E,c,u,i);return B.format(n)}catch(H){return l(new it('Error formatting default message for: "'.concat(T,'", rendering default message verbatim'),o,e,H)),typeof E=="string"?E:T}return T}try{var B=r.getMessageFormat(_,o,a,m({formatters:r},i||{}));return B.format(n)}catch(H){l(new it('Error formatting message: "'.concat(T,'", using ').concat(E?"default message":"id"," as fallback."),o,e,H))}if(E)try{var B=r.getMessageFormat(E,c,u,i);return B.format(n)}catch(H){l(new it('Error formatting the default message for: "'.concat(T,'", rendering message verbatim'),o,e,H))}return typeof _=="string"?_:typeof E=="string"?E:T},wt=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function K(t,r,e,n){var i=t.locale,o=t.formats,a=t.onError,s=t.timeZone;n===void 0&&(n={});var c=n.format,u=m(m({},s&&{timeZone:s}),c&&ot(o,r,c,a)),h=D(n,wt,u);return r==="time"&&!h.hour&&!h.minute&&!h.second&&!h.timeStyle&&!h.dateStyle&&(h=m(m({},h),{hour:"numeric",minute:"numeric"})),e(i,h)}function Vr(t,r){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var i=e[0],o=e[1],a=o===void 0?{}:o,s=typeof i=="string"?new Date(i||0):i;try{return K(t,"date",r,a).format(s)}catch(c){t.onError(new A("Error formatting date.",t.locale,c))}return String(s)}function xr(t,r){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var i=e[0],o=e[1],a=o===void 0?{}:o,s=typeof i=="string"?new Date(i||0):i;try{return K(t,"time",r,a).format(s)}catch(c){t.onError(new A("Error formatting time.",t.locale,c))}return String(s)}function Xr(t,r){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var i=e[0],o=e[1],a=e[2],s=a===void 0?{}:a,c=t.timeZone,u=t.locale,h=t.onError,l=D(s,wt,c?{timeZone:c}:{});try{return r(u,l).formatRange(i,o)}catch(f){h(new A("Error formatting date time range.",t.locale,f))}return String(i)}function Kr(t,r){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var i=e[0],o=e[1],a=o===void 0?{}:o,s=typeof i=="string"?new Date(i||0):i;try{return K(t,"date",r,a).formatToParts(s)}catch(c){t.onError(new A("Error formatting date.",t.locale,c))}return[]}function Zr(t,r){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var i=e[0],o=e[1],a=o===void 0?{}:o,s=typeof i=="string"?new Date(i||0):i;try{return K(t,"time",r,a).formatToParts(s)}catch(c){t.onError(new A("Error formatting time.",t.locale,c))}return[]}var Yr=["style","type","fallback","languageDisplay"];function Wr(t,r,e,n){var i=t.locale,o=t.onError,a=Intl.DisplayNames;a||o(new O(`Intl.DisplayNames is not available in this environment.
|
|
13
13
|
Try polyfilling it using "@formatjs/intl-displaynames"
|
|
14
|
-
`,
|
|
14
|
+
`,P.MISSING_INTL_API));var s=D(n,Yr);try{return r(i,s).of(e)}catch(c){o(new A("Error formatting display name.",i,c))}}var qr=["type","style"],Gt=Date.now();function zr(t){return"".concat(Gt,"_").concat(t,"_").concat(Gt)}function Qr(t,r,e,n){n===void 0&&(n={});var i=Ut(t,r,e,n).reduce(function(o,a){var s=a.value;return typeof s!="string"?o.push(s):typeof o[o.length-1]=="string"?o[o.length-1]+=s:o.push(s),o},[]);return i.length===1?i[0]:i.length===0?"":i}function Ut(t,r,e,n){var i=t.locale,o=t.onError;n===void 0&&(n={});var a=Intl.ListFormat;a||o(new O(`Intl.ListFormat is not available in this environment.
|
|
15
15
|
Try polyfilling it using "@formatjs/intl-listformat"
|
|
16
|
-
`,
|
|
16
|
+
`,P.MISSING_INTL_API));var s=D(n,qr);try{var c={},u=e.map(function(h,l){if(typeof h=="object"){var f=zr(l);return c[f]=h,f}return String(h)});return r(i,s).formatToParts(u).map(function(h){return h.type==="literal"?h:m(m({},h),{value:c[h.value]||h.value})})}catch(h){o(new A("Error formatting list.",i,h))}return e}var Jr=["type"];function $r(t,r,e,n){var i=t.locale,o=t.onError;n===void 0&&(n={}),Intl.PluralRules||o(new O(`Intl.PluralRules is not available in this environment.
|
|
17
17
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
18
|
-
`,
|
|
18
|
+
`,P.MISSING_INTL_API));var a=D(n,Jr);try{return r(i,a).select(e)}catch(s){o(new A("Error formatting plural.",i,s))}return"other"}var te=["numeric","style"];function re(t,r,e){var n=t.locale,i=t.formats,o=t.onError;e===void 0&&(e={});var a=e.format,s=!!a&&ot(i,"relative",a,o)||{},c=D(e,te,s);return r(n,c)}function ee(t,r,e,n,i){i===void 0&&(i={}),n||(n="second");var o=Intl.RelativeTimeFormat;o||t.onError(new O(`Intl.RelativeTimeFormat is not available in this environment.
|
|
19
19
|
Try polyfilling it using "@formatjs/intl-relativetimeformat"
|
|
20
|
-
`,
|
|
20
|
+
`,P.MISSING_INTL_API));try{return re(t,r,i).format(e,n)}catch(a){t.onError(new A("Error formatting relative time.",t.locale,a))}return String(e)}var ne=["style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem"];function Ft(t,r,e){var n=t.locale,i=t.formats,o=t.onError;e===void 0&&(e={});var a=e.format,s=a&&ot(i,"number",a,o)||{},c=D(e,ne,s);return r(n,c)}function ie(t,r,e,n){n===void 0&&(n={});try{return Ft(t,r,n).format(e)}catch(i){t.onError(new A("Error formatting number.",t.locale,i))}return String(e)}function oe(t,r,e,n){n===void 0&&(n={});try{return Ft(t,r,n).formatToParts(e)}catch(i){t.onError(new A("Error formatting number.",t.locale,i))}return[]}function ae(t){var r=t?t[Object.keys(t)[0]]:void 0;return typeof r=="string"}function se(t){t.onWarn&&t.defaultRichTextElements&&ae(t.messages||{})&&t.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
|
|
21
21
|
Please consider using "@formatjs/cli" to pre-compile your messages for performance.
|
|
22
|
-
For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function
|
|
22
|
+
For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function he(t,r){var e=kr(r),n=m(m({},Fr),t),i=n.locale,o=n.defaultLocale,a=n.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&a?a(new Rt('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&a&&a(new Rt('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(a&&a(new Dr('"locale" was not configured, using "'.concat(o,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),n.locale=n.defaultLocale||"en"),se(n),m(m({},n),{formatters:e,formatNumber:ie.bind(null,n,e.getNumberFormat),formatNumberToParts:oe.bind(null,n,e.getNumberFormat),formatRelativeTime:ee.bind(null,n,e.getRelativeTimeFormat),formatDate:Vr.bind(null,n,e.getDateTimeFormat),formatDateToParts:Kr.bind(null,n,e.getDateTimeFormat),formatTime:xr.bind(null,n,e.getDateTimeFormat),formatDateTimeRange:Xr.bind(null,n,e.getDateTimeFormat),formatTimeToParts:Zr.bind(null,n,e.getDateTimeFormat),formatPlural:$r.bind(null,n,e.getPluralRules),formatMessage:Dt.bind(null,n,e),$t:Dt.bind(null,n,e),formatList:Qr.bind(null,n,e.getListFormat),formatListToParts:Ut.bind(null,n,e.getListFormat),formatDisplayName:Wr.bind(null,n,e.getDisplayNames)})}var ue=k;k.flatten=k,k.unflatten=Vt;function kt(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function jt(t){return t}function k(t,r){r=r||{};const e=r.delimiter||".",n=r.maxDepth,i=r.transformKey||jt,o={};function a(s,c,u){u=u||1,Object.keys(s).forEach(function(h){const l=s[h],f=r.safe&&Array.isArray(l),g=Object.prototype.toString.call(l),v=kt(l),E=g==="[object Object]"||g==="[object Array]",T=c?c+e+i(h):i(h);if(!f&&!v&&E&&Object.keys(l).length&&(!r.maxDepth||u<n))return a(l,T,u+1);o[T]=l})}return a(t),o}function Vt(t,r){r=r||{};const e=r.delimiter||".",n=r.overwrite||!1,i=r.transformKey||jt,o={};if(kt(t)||Object.prototype.toString.call(t)!=="[object Object]")return t;function a(u){const h=Number(u);return isNaN(h)||u.indexOf(".")!==-1||r.object?u:h}function s(u,h,l){return Object.keys(l).reduce(function(f,g){return f[u+e+g]=l[g],f},h)}function c(u){const h=Object.prototype.toString.call(u),l=h==="[object Array]",f=h==="[object Object]";if(u){if(l)return!u.length;if(f)return!Object.keys(u).length}else return!0}return t=Object.keys(t).reduce(function(u,h){const l=Object.prototype.toString.call(t[h]);return!(l==="[object Object]"||l==="[object Array]")||c(t[h])?(u[h]=t[h],u):s(h,u,k(t[h],r))},{}),Object.keys(t).forEach(function(u){const h=u.split(e).map(i);let l=a(h.shift()),f=a(h[0]),g=o;for(;f!==void 0;){if(l==="__proto__")return;const v=Object.prototype.toString.call(g[l]),E=v==="[object Object]"||v==="[object Array]";if(!n&&!E&&typeof g[l]<"u")return;(n&&!E||!n&&g[l]==null)&&(g[l]=typeof f=="number"&&!r.object?[]:{}),g=g[l],h.length>0&&(l=a(h.shift()),f=a(h[0]))}g[l]=Vt(t[u],r)}),o}const ce=Ot(),le=(t,r,e=!1)=>{const n=he({...typeof e=="boolean"?null:e,locale:t,messages:ue.flatten(r,{safe:!0})},ce),{$t:i,...o}=n,a=o,s=u=>{const h="Invalid Date";if(!u)return h;try{const l=new Date(u*1e3);return a.formatDate(l,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"})}catch{return h}},c={formatUnixTimeStamp:s,formatIsoDate:u=>{const h=Date.parse(u)/1e3;return s(h)},t:(u,h,l)=>a.formatMessage({id:u},h,l),te:u=>!!a.messages[u],tm:u=>a.messages[u]||[],...a,source:r};return typeof e=="boolean"&&e===!0||typeof e!="boolean"&&e.isGlobal,c},fe=(t=null)=>y.defineComponent({name:"I18nT",props:{i18n:{type:Object,default:null},keypath:{type:String,required:!0},tag:{type:String,default:"span"}},setup(r,{slots:e}){const n=i=>{if(!i)return[];const o=/(\{[^}]+\})/g;return i.split(o).filter(Boolean)};return()=>{const i=Object.keys(e).filter(s=>s!=="_"),o=(t||r.i18n).messages[r.keypath].toString();let a=n(o);return a=a.filter(s=>s!==""),a.forEach((s,c)=>{if(!s.startsWith("{")&&!s.endsWith("}"))return;const u=s.replace(/[\{\}]/g,"");u==="0"&&e.default?a[c]=e.default():i.includes(u)&&e[u]&&(a[c]=e[u]())}),y.h(r.tag,r,a)}}}),me={install(t,r){const{i18n:e}=r;t.component("I18nT",fe(e))}},pe={githubStar:{title:"Star",ariaLabel:"Star buttons/github-buttons on GitHub",tooltipLabel:"Star this repository on Github"}};function ge(){return{i18n:le("en-us",pe),i18nT:me}}const be={useI18n:ge},Ee={key:0,class:"kong-ui-public-misc-widgets-github-star","data-testid":"github-star","data-tracking-id":"github-star"},de=["aria-label","href"],ye=y.defineComponent({__name:"GithubStar",props:{url:{type:String,required:!0},tooltipText:{type:String,required:!1,default:""}},setup(t){const r=t,{i18n:e}=be.useI18n(),n=y.computed(()=>r.tooltipText||e.t("githubStar.tooltipLabel")),i=y.ref(!1);return y.onMounted(async()=>{const o=document.createElement("script");o.addEventListener("load",()=>{i.value=!0}),o.setAttribute("src","https://buttons.github.io/buttons.js"),document.head.appendChild(o)}),(o,a)=>{const s=y.resolveComponent("KTooltip");return t.url&&i.value?(y.openBlock(),y.createElementBlock("div",Ee,[y.createVNode(s,{label:n.value},{default:y.withCtx(()=>[y.createElementVNode("span",null,[y.createElementVNode("a",{"aria-label":y.unref(e).t("githubStar.ariaLabel"),class:"github-button","data-color-scheme":"no-preference: light; light: light; dark: light;","data-show-count":"true",href:t.url,target:"_blank"},y.toDisplayString(y.unref(e).t("githubStar.title")),9,de)])]),_:1},8,["label"])])):y.createCommentVNode("",!0)}}}),_e="",ve=((t,r)=>{const e=t.__vccOpts||t;for(const[n,i]of r)e[n]=i;return e})(ye,[["__scopeId","data-v-4d357ff1"]]);C.GithubStar=ve,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/misc-widgets",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/misc-widgets.umd.js",
|
|
6
6
|
"module": "./dist/misc-widgets.es.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@kong-ui-public/i18n": "^0.8.0",
|
|
29
|
-
"@kong/kongponents": "^8.
|
|
29
|
+
"@kong/kongponents": "^8.109.0",
|
|
30
30
|
"vue": "^3.3.4"
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|