vendor: 7,328 bytes, line 1
1import{j as _}from"./client-By3tlFYA.js";import{K as q,T as W,L as m,M as K,N as P,I as Y,O as c,P as O,Q as h,S,U as L,V as X,W as B,X as Q,Y as R,Z as V,$ as Z,a0 as z,a1 as H,_ as J,a2 as tt,a3 as rt,a4 as et,a5 as at,r as F,a6 as nt,a7 as ot}from"./index-DYjD9pVn.js";import{g as it,b as lt,l as st,a as mt}from"./load_locale-DAGc-wwH.js";function I(t,o){return Object.keys(t).reduce(function(e,r){return e[r]=m({timeZone:o},t[r]),e},{})}function x(t,o){var e=Object.keys(m(m({},t),o));return e.reduce(function(r,n){return r[n]=m(m({},t[n]||{}),o[n]||{}),r},{})}function A(t,o){if(!o)return t;var e=Y.formats;return m(m(m({},e),t),{date:x(I(e.date,o),I(t.date||{},o)),time:x(I(e.time,o),I(t.time||{},o))})}var D=function(t,o,e,r,n){var a=t.locale,i=t.formats,l=t.messages,s=t.defaultLocale,d=t.defaultFormats,u=t.fallbackOnEmptyString,y=t.onError,p=t.timeZone,N=t.defaultRichTextElements;e===void 0&&(e={id:""});var M=e.id,g=e.defaultMessage;q(!!M,"[@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.github.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.github.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.github.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var v=String(M),f=l&&Object.prototype.hasOwnProperty.call(l,v)&&l[v];if(Array.isArray(f)&&f.length===1&&f[0].type===W.literal)return f[0].value;if(!r&&f&&typeof f=="string"&&!N)return f.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=m(m({},N),r||{}),i=A(i,p),d=A(d,p),!f){if(u===!1&&f==="")return f;if((!g||a&&a.toLowerCase()!==s.toLowerCase())&&y(new K(e,a)),g)try{var E=o.getMessageFormat(g,s,d,n);return E.format(r)}catch(T){return y(new P('Error formatting default message for: "'.concat(v,'", rendering default message verbatim'),a,e,T)),typeof g=="string"?g:v}return v}try{var E=o.getMessageFormat(f,a,i,m({formatters:o},n||{}));return E.format(r)}catch(T){y(new P('Error formatting message: "'.concat(v,'", using ').concat(g?"default message":"id"," as fallback."),a,e,T))}if(g)try{var E=o.getMessageFormat(g,s,d,n);return E.format(r)}catch(T){y(new P('Error formatting the default message for: "'.concat(v,'", rendering message verbatim'),a,e,T))}return typeof f=="string"?f:typeof g=="string"?g:v},ut=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function b(t,o,e,r){var n=t.locale,a=t.formats,i=t.onError,l=t.timeZone;r===void 0&&(r={});var s=r.format,d=m(m({},l&&{timeZone:l}),s&&O(a,o,s,i)),u=h(r,ut,d);return o==="time"&&!u.hour&&!u.minute&&!u.second&&!u.timeStyle&&!u.dateStyle&&(u=m(m({},u),{hour:"numeric",minute:"numeric"})),e(n,u)}function ft(t,o){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var n=e[0],a=e[1],i=a===void 0?{}:a,l=typeof n=="string"?new Date(n||0):n;try{return b(t,"date",o,i).format(l)}catch(s){t.onError(new c("Error formatting date.",t.locale,s))}return String(l)}function ct(t,o){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var n=e[0],a=e[1],i=a===void 0?{}:a,l=typeof n=="string"?new Date(n||0):n;try{return b(t,"time",o,i).format(l)}catch(s){t.onError(new c("Error formatting time.",t.locale,s))}return String(l)}function dt(t,o){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var n=e[0],a=e[1],i=e[2],l=i===void 0?{}:i,s=typeof n=="string"?new Date(n||0):n,d=typeof a=="string"?new Date(a||0):a;try{return b(t,"dateTimeRange",o,l).formatRange(s,d)}catch(u){t.onError(new c("Error formatting date time range.",t.locale,u))}return String(s)}function gt(t,o){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var n=e[0],a=e[1],i=a===void 0?{}:a,l=typeof n=="string"?new Date(n||0):n;try{return b(t,"date",o,i).formatToParts(l)}catch(s){t.onError(new c("Error formatting date.",t.locale,s))}return[]}function vt(t,o){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var n=e[0],a=e[1],i=a===void 0?{}:a,l=typeof n=="string"?new Date(n||0):n;try{return b(t,"time",o,i).formatToParts(l)}catch(s){t.onError(new c("Error formatting time.",t.locale,s))}return[]}var yt=["style","type","fallback","languageDisplay"];function ht(t,o,e,r){var n=t.locale,a=t.onError,i=Intl.DisplayNames;i||a(new S('Intl.DisplayNames is not available in this environment.\nTry polyfilling it using "@formatjs/intl-displaynames"\n',L.MISSING_INTL_API));var l=h(r,yt);try{return o(n,l).of(e)}catch(s){a(new c("Error formatting display name.",n,s))}}var pt=["type","style"],j=Date.now();function Et(t){return"".concat(j,"_").concat(t,"_").concat(j)}function Tt(t,o,e,r){r===void 0&&(r={});var n=$(t,o,e,r).reduce(function(a,i){var l=i.value;return typeof l!="string"?a.push(l):typeof a[a.length-1]=="string"?a[a.length-1]+=l:a.push(l),a},[]);return n.length===1?n[0]:n.length===0?"":n}function $(t,o,e,r){var n=t.locale,a=t.onError;r===void 0&&(r={});var i=Intl.ListFormat;i||a(new S('Intl.ListFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-listformat"\n',L.MISSING_INTL_API));var l=h(r,pt);try{var s={},d=Array.from(e).map(function(u,y){if(typeof u=="object"&&u!==null){var p=Et(y);return s[p]=u,p}return String(u)});return o(n,l).formatToParts(d).map(function(u){return u.type==="literal"?u:m(m({},u),{value:s[u.value]||u.value})})}catch(u){a(new c("Error formatting list.",n,u))}return e}var bt=["type"];function It(t,o,e,r){var n=t.locale,a=t.onError;r===void 0&&(r={}),Intl.PluralRules||a(new S('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',L.MISSING_INTL_API));var i=h(r,bt);try{return o(n,i).select(e)}catch(l){a(new c("Error formatting plural.",n,l))}return"other"}var Ft=["numeric","style"];function St(t,o,e){var r=t.locale,n=t.formats,a=t.onError;e===void 0&&(e={});var i=e.format,l=!!i&&O(n,"relative",i,a)||{},s=h(e,Ft,l);return o(r,s)}function Lt(t,o,e,r,n){n===void 0&&(n={}),r||(r="second");var a=Intl.RelativeTimeFormat;a||t.onError(new S('Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-relativetimeformat"\n',L.MISSING_INTL_API));try{return St(t,o,n).format(e,r)}catch(i){t.onError(new c("Error formatting relative time.",t.locale,i))}return String(e)}var Pt=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function U(t,o,e){var r=t.locale,n=t.formats,a=t.onError;e===void 0&&(e={});var i=e.format,l=i&&O(n,"number",i,a)||{},s=h(e,Pt,l);return o(r,s)}function wt(t,o,e,r){r===void 0&&(r={});try{return U(t,o,r).format(e)}catch(n){t.onError(new c("Error formatting number.",t.locale,n))}return String(e)}function Dt(t,o,e,r){r===void 0&&(r={});try{return U(t,o,r).formatToParts(e)}catch(n){t.onError(new c("Error formatting number.",t.locale,n))}return[]}function Ot(t){var o=t?t[Object.keys(t)[0]]:void 0;
1return typeof o=="string"}function Nt(t){t.onWarn&&t.defaultRichTextElements&&Ot(t.messages||{})&&t.onWarn('[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. \nPlease consider using "@formatjs/cli" to pre-compile your messages for performance.\nFor more details see https://formatjs.github.io/docs/getting-started/message-distribution')}function Mt(t,o){var e=X(o),r=m(m({},B),t),n=r.locale,a=r.defaultLocale,i=r.onError;return n?!Intl.NumberFormat.supportedLocalesOf(n).length&&i?i(new R('Missing locale data for locale: "'.concat(n,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(n).length&&i&&i(new R('Missing locale data for locale: "'.concat(n,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):(i&&i(new Q('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),Nt(r),m(m({},r),{formatters:e,formatNumber:wt.bind(null,r,e.getNumberFormat),formatNumberToParts:Dt.bind(null,r,e.getNumberFormat),formatRelativeTime:Lt.bind(null,r,e.getRelativeTimeFormat),formatDate:ft.bind(null,r,e.getDateTimeFormat),formatDateToParts:gt.bind(null,r,e.getDateTimeFormat),formatTime:ct.bind(null,r,e.getDateTimeFormat),formatDateTimeRange:dt.bind(null,r,e.getDateTimeFormat),formatTimeToParts:vt.bind(null,r,e.getDateTimeFormat),formatPlural:It.bind(null,r,e.getPluralRules),formatMessage:D.bind(null,r,e),$t:D.bind(null,r,e),formatList:Tt.bind(null,r,e.getListFormat),formatListToParts:$.bind(null,r,e.getListFormat),formatDisplayName:ht.bind(null,r,e.getDisplayNames)})}function G(t){return t&&Object.keys(t).reduce(function(o,e){var r=t[e];return o[e]=H(r)?z(r):r,o},{})}var C=function(t,o,e,r){for(var n=[],a=4;a<arguments.length;a++)n[a-4]=arguments[a];var i=G(r),l=D.apply(void 0,J([t,o,e,i],n,!1));return Array.isArray(l)?tt(l):l},k=function(t,o){var e=t.defaultRichTextElements,r=V(t,["defaultRichTextElements"]),n=G(e),a=Mt(m(m(m({},Z),r),{defaultRichTextElements:n}),o),i={locale:a.locale,timeZone:a.timeZone,fallbackOnEmptyString:a.fallbackOnEmptyString,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:n};return m(m({},a),{formatMessage:C.bind(null,i,a.formatters),$t:C.bind(null,i,a.formatters)})};function w(t){return{locale:t.locale,timeZone:t.timeZone,fallbackOnEmptyString:t.fallbackOnEmptyString,formats:t.formats,textComponent:t.textComponent,messages:t.messages,defaultLocale:t.defaultLocale,defaultFormats:t.defaultFormats,onError:t.onError,onWarn:t.onWarn,wrapRichTextChunksInFragment:t.wrapRichTextChunksInFragment,defaultRichTextElements:t.defaultRichTextElements}}var Rt=function(t){rt(o,t);function o(){var e=t!==null&&t.apply(this,arguments)||this;return e.cache=ot(),e.state={cache:e.cache,intl:k(w(e.props),e.cache),prevConfig:w(e.props)},e}return o.getDerivedStateFromProps=function(e,r){var n=r.prevConfig,a=r.cache,i=w(e);return et(n,i)?null:{intl:k(i,a),prevConfig:i}},o.prototype.render=function(){return at(this.state.intl),F.createElement(nt,{value:this.state.intl},this.props.children)},o.displayName="IntlProvider",o.defaultProps=Z,o}(F.PureComponent);function xt(t){mt()||(t&&typeof t=="object"&&t instanceof Error&&/MISSING_DATA/.exec(t.message)&&console.warn(t.message),console.error(t))}const kt=({children:t,...o})=>{const[e,r]=F.useState(!1);if(F.useEffect(()=>{async function i(){lt()||await st(),r(!0)}i()},[]),!e)return null;const{locale:n,messages:a}=it();return _.jsx(Rt,{locale:n,messages:a,onError:xt,textComponent:"span",...o,children:t})};export{kt as I}; 2//# sourceMappingURL=intl_provider-iuTtmDBj.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.