@formatjs/intl-listformat 8.2.3 → 8.3.2
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/index.d.ts +103 -68
- package/index.js +264 -84
- package/index.js.map +1 -0
- package/locale-data/af-NA.js +66 -0
- package/locale-data/af.js +66 -0
- package/locale-data/agq.js +66 -0
- package/locale-data/ak.js +66 -0
- package/locale-data/am.js +66 -0
- package/locale-data/ar-AE.js +66 -0
- package/locale-data/ar-BH.js +66 -0
- package/locale-data/ar-DJ.js +66 -0
- package/locale-data/ar-DZ.js +66 -0
- package/locale-data/ar-EG.js +66 -0
- package/locale-data/ar-EH.js +66 -0
- package/locale-data/ar-ER.js +66 -0
- package/locale-data/ar-IL.js +66 -0
- package/locale-data/ar-IQ.js +66 -0
- package/locale-data/ar-JO.js +66 -0
- package/locale-data/ar-KM.js +66 -0
- package/locale-data/ar-KW.js +66 -0
- package/locale-data/ar-LB.js +66 -0
- package/locale-data/ar-LY.js +66 -0
- package/locale-data/ar-MA.js +66 -0
- package/locale-data/ar-MR.js +66 -0
- package/locale-data/ar-OM.js +66 -0
- package/locale-data/ar-PS.js +66 -0
- package/locale-data/ar-QA.js +66 -0
- package/locale-data/ar-SA.js +66 -0
- package/locale-data/ar-SD.js +66 -0
- package/locale-data/ar-SO.js +66 -0
- package/locale-data/ar-SS.js +66 -0
- package/locale-data/ar-SY.js +66 -0
- package/locale-data/ar-TD.js +66 -0
- package/locale-data/ar-TN.js +66 -0
- package/locale-data/ar-YE.js +66 -0
- package/locale-data/ar.js +66 -0
- package/locale-data/as.js +66 -0
- package/locale-data/asa.js +66 -0
- package/locale-data/ast.js +66 -0
- package/locale-data/az-Cyrl.js +66 -0
- package/locale-data/az-Latn.js +66 -0
- package/locale-data/az.js +66 -0
- package/locale-data/bas.js +66 -0
- package/locale-data/be-tarask.js +66 -0
- package/locale-data/be.js +66 -0
- package/locale-data/bem.js +66 -0
- package/locale-data/bez.js +66 -0
- package/locale-data/bg.js +66 -0
- package/locale-data/bm.js +66 -0
- package/locale-data/bn-IN.js +66 -0
- package/locale-data/bn.js +66 -0
- package/locale-data/bo-IN.js +66 -0
- package/locale-data/bo.js +66 -0
- package/locale-data/br.js +66 -0
- package/locale-data/brx.js +66 -0
- package/locale-data/bs-Cyrl.js +66 -0
- package/locale-data/bs-Latn.js +66 -0
- package/locale-data/bs.js +66 -0
- package/locale-data/ca-AD.js +66 -0
- package/locale-data/ca-ES-valencia.js +66 -0
- package/locale-data/ca-FR.js +66 -0
- package/locale-data/ca-IT.js +66 -0
- package/locale-data/ca.js +66 -0
- package/locale-data/ccp-IN.js +66 -0
- package/locale-data/ccp.js +66 -0
- package/locale-data/ce.js +66 -0
- package/locale-data/ceb.js +66 -0
- package/locale-data/cgg.js +66 -0
- package/locale-data/chr.js +66 -0
- package/locale-data/ckb-IR.js +66 -0
- package/locale-data/ckb.js +66 -0
- package/locale-data/cs.js +66 -0
- package/locale-data/cy.js +66 -0
- package/locale-data/da-GL.js +66 -0
- package/locale-data/da.js +66 -0
- package/locale-data/dav.js +66 -0
- package/locale-data/de-AT.js +66 -0
- package/locale-data/de-BE.js +66 -0
- package/locale-data/de-CH.js +66 -0
- package/locale-data/de-IT.js +66 -0
- package/locale-data/de-LI.js +66 -0
- package/locale-data/de-LU.js +66 -0
- package/locale-data/de.js +66 -0
- package/locale-data/dje.js +66 -0
- package/locale-data/doi.js +66 -0
- package/locale-data/dsb.js +66 -0
- package/locale-data/dua.js +66 -0
- package/locale-data/dyo.js +66 -0
- package/locale-data/dz.js +66 -0
- package/locale-data/ebu.js +66 -0
- package/locale-data/ee-TG.js +66 -0
- package/locale-data/ee.js +66 -0
- package/locale-data/el-CY.js +66 -0
- package/locale-data/el.js +66 -0
- package/locale-data/en-001.js +66 -0
- package/locale-data/en-150.js +66 -0
- package/locale-data/en-AE.js +66 -0
- package/locale-data/en-AG.js +66 -0
- package/locale-data/en-AI.js +66 -0
- package/locale-data/en-AS.js +66 -0
- package/locale-data/en-AT.js +66 -0
- package/locale-data/en-AU.js +66 -0
- package/locale-data/en-BB.js +66 -0
- package/locale-data/en-BE.js +66 -0
- package/locale-data/en-BI.js +66 -0
- package/locale-data/en-BM.js +66 -0
- package/locale-data/en-BS.js +66 -0
- package/locale-data/en-BW.js +66 -0
- package/locale-data/en-BZ.js +66 -0
- package/locale-data/en-CA.js +66 -0
- package/locale-data/en-CC.js +66 -0
- package/locale-data/en-CH.js +66 -0
- package/locale-data/en-CK.js +66 -0
- package/locale-data/en-CM.js +66 -0
- package/locale-data/en-CX.js +66 -0
- package/locale-data/en-CY.js +66 -0
- package/locale-data/en-DE.js +66 -0
- package/locale-data/en-DG.js +66 -0
- package/locale-data/en-DK.js +66 -0
- package/locale-data/en-DM.js +66 -0
- package/locale-data/en-ER.js +66 -0
- package/locale-data/en-FI.js +66 -0
- package/locale-data/en-FJ.js +66 -0
- package/locale-data/en-FK.js +66 -0
- package/locale-data/en-FM.js +66 -0
- package/locale-data/en-GB.js +66 -0
- package/locale-data/en-GD.js +66 -0
- package/locale-data/en-GG.js +66 -0
- package/locale-data/en-GH.js +66 -0
- package/locale-data/en-GI.js +66 -0
- package/locale-data/en-GM.js +66 -0
- package/locale-data/en-GU.js +66 -0
- package/locale-data/en-GY.js +66 -0
- package/locale-data/en-HK.js +66 -0
- package/locale-data/en-IE.js +66 -0
- package/locale-data/en-IL.js +66 -0
- package/locale-data/en-IM.js +66 -0
- package/locale-data/en-IN.js +66 -0
- package/locale-data/en-IO.js +66 -0
- package/locale-data/en-JE.js +66 -0
- package/locale-data/en-JM.js +66 -0
- package/locale-data/en-KE.js +66 -0
- package/locale-data/en-KI.js +66 -0
- package/locale-data/en-KN.js +66 -0
- package/locale-data/en-KY.js +66 -0
- package/locale-data/en-LC.js +66 -0
- package/locale-data/en-LR.js +66 -0
- package/locale-data/en-LS.js +66 -0
- package/locale-data/en-MG.js +66 -0
- package/locale-data/en-MH.js +66 -0
- package/locale-data/en-MO.js +66 -0
- package/locale-data/en-MP.js +66 -0
- package/locale-data/en-MS.js +66 -0
- package/locale-data/en-MT.js +66 -0
- package/locale-data/en-MU.js +66 -0
- package/locale-data/en-MW.js +66 -0
- package/locale-data/en-MY.js +66 -0
- package/locale-data/en-NA.js +66 -0
- package/locale-data/en-NF.js +66 -0
- package/locale-data/en-NG.js +66 -0
- package/locale-data/en-NL.js +66 -0
- package/locale-data/en-NR.js +66 -0
- package/locale-data/en-NU.js +66 -0
- package/locale-data/en-NZ.js +66 -0
- package/locale-data/en-PG.js +66 -0
- package/locale-data/en-PH.js +66 -0
- package/locale-data/en-PK.js +66 -0
- package/locale-data/en-PN.js +66 -0
- package/locale-data/en-PR.js +66 -0
- package/locale-data/en-PW.js +66 -0
- package/locale-data/en-RW.js +66 -0
- package/locale-data/en-SB.js +66 -0
- package/locale-data/en-SC.js +66 -0
- package/locale-data/en-SD.js +66 -0
- package/locale-data/en-SE.js +66 -0
- package/locale-data/en-SG.js +66 -0
- package/locale-data/en-SH.js +66 -0
- package/locale-data/en-SI.js +66 -0
- package/locale-data/en-SL.js +66 -0
- package/locale-data/en-SS.js +66 -0
- package/locale-data/en-SX.js +66 -0
- package/locale-data/en-SZ.js +66 -0
- package/locale-data/en-TC.js +66 -0
- package/locale-data/en-TK.js +66 -0
- package/locale-data/en-TO.js +66 -0
- package/locale-data/en-TT.js +66 -0
- package/locale-data/en-TV.js +66 -0
- package/locale-data/en-TZ.js +66 -0
- package/locale-data/en-UG.js +66 -0
- package/locale-data/en-UM.js +66 -0
- package/locale-data/en-VC.js +66 -0
- package/locale-data/en-VG.js +66 -0
- package/locale-data/en-VI.js +66 -0
- package/locale-data/en-VU.js +66 -0
- package/locale-data/en-WS.js +66 -0
- package/locale-data/en-ZA.js +66 -0
- package/locale-data/en-ZM.js +66 -0
- package/locale-data/en-ZW.js +66 -0
- package/locale-data/en.js +66 -0
- package/locale-data/eo.js +66 -0
- package/locale-data/es-419.js +66 -0
- package/locale-data/es-AR.js +66 -0
- package/locale-data/es-BO.js +66 -0
- package/locale-data/es-BR.js +66 -0
- package/locale-data/es-BZ.js +66 -0
- package/locale-data/es-CL.js +66 -0
- package/locale-data/es-CO.js +66 -0
- package/locale-data/es-CR.js +66 -0
- package/locale-data/es-CU.js +66 -0
- package/locale-data/es-DO.js +66 -0
- package/locale-data/es-EA.js +66 -0
- package/locale-data/es-EC.js +66 -0
- package/locale-data/es-GQ.js +66 -0
- package/locale-data/es-GT.js +66 -0
- package/locale-data/es-HN.js +66 -0
- package/locale-data/es-IC.js +66 -0
- package/locale-data/es-MX.js +66 -0
- package/locale-data/es-NI.js +66 -0
- package/locale-data/es-PA.js +66 -0
- package/locale-data/es-PE.js +66 -0
- package/locale-data/es-PH.js +66 -0
- package/locale-data/es-PR.js +66 -0
- package/locale-data/es-PY.js +66 -0
- package/locale-data/es-SV.js +66 -0
- package/locale-data/es-US.js +66 -0
- package/locale-data/es-UY.js +66 -0
- package/locale-data/es-VE.js +66 -0
- package/locale-data/es.js +66 -0
- package/locale-data/et.js +66 -0
- package/locale-data/eu.js +66 -0
- package/locale-data/ewo.js +66 -0
- package/locale-data/fa-AF.js +66 -0
- package/locale-data/fa.js +66 -0
- package/locale-data/ff-Adlm-BF.js +66 -0
- package/locale-data/ff-Adlm-CM.js +66 -0
- package/locale-data/ff-Adlm-GH.js +66 -0
- package/locale-data/ff-Adlm-GM.js +66 -0
- package/locale-data/ff-Adlm-GW.js +66 -0
- package/locale-data/ff-Adlm-LR.js +66 -0
- package/locale-data/ff-Adlm-MR.js +66 -0
- package/locale-data/ff-Adlm-NE.js +66 -0
- package/locale-data/ff-Adlm-NG.js +66 -0
- package/locale-data/ff-Adlm-SL.js +66 -0
- package/locale-data/ff-Adlm-SN.js +66 -0
- package/locale-data/ff-Adlm.js +66 -0
- package/locale-data/ff-Latn-BF.js +66 -0
- package/locale-data/ff-Latn-CM.js +66 -0
- package/locale-data/ff-Latn-GH.js +66 -0
- package/locale-data/ff-Latn-GM.js +66 -0
- package/locale-data/ff-Latn-GN.js +66 -0
- package/locale-data/ff-Latn-GW.js +66 -0
- package/locale-data/ff-Latn-LR.js +66 -0
- package/locale-data/ff-Latn-MR.js +66 -0
- package/locale-data/ff-Latn-NE.js +66 -0
- package/locale-data/ff-Latn-NG.js +66 -0
- package/locale-data/ff-Latn-SL.js +66 -0
- package/locale-data/ff-Latn.js +66 -0
- package/locale-data/ff.js +66 -0
- package/locale-data/fi.js +66 -0
- package/locale-data/fil.js +66 -0
- package/locale-data/fo-DK.js +66 -0
- package/locale-data/fo.js +66 -0
- package/locale-data/fr-BE.js +66 -0
- package/locale-data/fr-BF.js +66 -0
- package/locale-data/fr-BI.js +66 -0
- package/locale-data/fr-BJ.js +66 -0
- package/locale-data/fr-BL.js +66 -0
- package/locale-data/fr-CA.js +66 -0
- package/locale-data/fr-CD.js +66 -0
- package/locale-data/fr-CF.js +66 -0
- package/locale-data/fr-CG.js +66 -0
- package/locale-data/fr-CH.js +66 -0
- package/locale-data/fr-CI.js +66 -0
- package/locale-data/fr-CM.js +66 -0
- package/locale-data/fr-DJ.js +66 -0
- package/locale-data/fr-DZ.js +66 -0
- package/locale-data/fr-GA.js +66 -0
- package/locale-data/fr-GF.js +66 -0
- package/locale-data/fr-GN.js +66 -0
- package/locale-data/fr-GP.js +66 -0
- package/locale-data/fr-GQ.js +66 -0
- package/locale-data/fr-HT.js +66 -0
- package/locale-data/fr-KM.js +66 -0
- package/locale-data/fr-LU.js +66 -0
- package/locale-data/fr-MA.js +66 -0
- package/locale-data/fr-MC.js +66 -0
- package/locale-data/fr-MF.js +66 -0
- package/locale-data/fr-MG.js +66 -0
- package/locale-data/fr-ML.js +66 -0
- package/locale-data/fr-MQ.js +66 -0
- package/locale-data/fr-MR.js +66 -0
- package/locale-data/fr-MU.js +66 -0
- package/locale-data/fr-NC.js +66 -0
- package/locale-data/fr-NE.js +66 -0
- package/locale-data/fr-PF.js +66 -0
- package/locale-data/fr-PM.js +66 -0
- package/locale-data/fr-RE.js +66 -0
- package/locale-data/fr-RW.js +66 -0
- package/locale-data/fr-SC.js +66 -0
- package/locale-data/fr-SN.js +66 -0
- package/locale-data/fr-SY.js +66 -0
- package/locale-data/fr-TD.js +66 -0
- package/locale-data/fr-TG.js +66 -0
- package/locale-data/fr-TN.js +66 -0
- package/locale-data/fr-VU.js +66 -0
- package/locale-data/fr-WF.js +66 -0
- package/locale-data/fr-YT.js +66 -0
- package/locale-data/fr.js +66 -0
- package/locale-data/fur.js +66 -0
- package/locale-data/fy.js +66 -0
- package/locale-data/ga-GB.js +66 -0
- package/locale-data/ga.js +66 -0
- package/locale-data/gd.js +66 -0
- package/locale-data/gl.js +66 -0
- package/locale-data/gsw-FR.js +66 -0
- package/locale-data/gsw-LI.js +66 -0
- package/locale-data/gsw.js +66 -0
- package/locale-data/gu.js +66 -0
- package/locale-data/guz.js +66 -0
- package/locale-data/gv.js +66 -0
- package/locale-data/ha-GH.js +66 -0
- package/locale-data/ha-NE.js +66 -0
- package/locale-data/ha.js +66 -0
- package/locale-data/haw.js +66 -0
- package/locale-data/he.js +66 -0
- package/locale-data/hi.js +66 -0
- package/locale-data/hr-BA.js +66 -0
- package/locale-data/hr.js +66 -0
- package/locale-data/hsb.js +66 -0
- package/locale-data/hu.js +66 -0
- package/locale-data/hy.js +66 -0
- package/locale-data/ia.js +66 -0
- package/locale-data/id.js +66 -0
- package/locale-data/ig.js +66 -0
- package/locale-data/ii.js +66 -0
- package/locale-data/is.js +66 -0
- package/locale-data/it-CH.js +66 -0
- package/locale-data/it-SM.js +66 -0
- package/locale-data/it-VA.js +66 -0
- package/locale-data/it.js +66 -0
- package/locale-data/ja.js +66 -0
- package/locale-data/jgo.js +66 -0
- package/locale-data/jmc.js +66 -0
- package/locale-data/jv.js +66 -0
- package/locale-data/ka.js +66 -0
- package/locale-data/kab.js +66 -0
- package/locale-data/kam.js +66 -0
- package/locale-data/kde.js +66 -0
- package/locale-data/kea.js +66 -0
- package/locale-data/kgp.js +66 -0
- package/locale-data/khq.js +66 -0
- package/locale-data/ki.js +66 -0
- package/locale-data/kk.js +66 -0
- package/locale-data/kkj.js +66 -0
- package/locale-data/kl.js +66 -0
- package/locale-data/kln.js +66 -0
- package/locale-data/km.js +66 -0
- package/locale-data/kn.js +66 -0
- package/locale-data/ko-KP.js +66 -0
- package/locale-data/ko.js +66 -0
- package/locale-data/kok.js +66 -0
- package/locale-data/ks-Arab.js +66 -0
- package/locale-data/ks.js +66 -0
- package/locale-data/ksb.js +66 -0
- package/locale-data/ksf.js +66 -0
- package/locale-data/ksh.js +66 -0
- package/locale-data/ku.js +66 -0
- package/locale-data/kw.js +66 -0
- package/locale-data/ky.js +66 -0
- package/locale-data/lag.js +66 -0
- package/locale-data/lb.js +66 -0
- package/locale-data/lg.js +66 -0
- package/locale-data/lkt.js +66 -0
- package/locale-data/ln-AO.js +66 -0
- package/locale-data/ln-CF.js +66 -0
- package/locale-data/ln-CG.js +66 -0
- package/locale-data/ln.js +66 -0
- package/locale-data/lo.js +66 -0
- package/locale-data/lrc-IQ.js +66 -0
- package/locale-data/lrc.js +66 -0
- package/locale-data/lt.js +66 -0
- package/locale-data/lu.js +66 -0
- package/locale-data/luo.js +66 -0
- package/locale-data/luy.js +66 -0
- package/locale-data/lv.js +66 -0
- package/locale-data/mai.js +66 -0
- package/locale-data/mas-TZ.js +66 -0
- package/locale-data/mas.js +66 -0
- package/locale-data/mer.js +66 -0
- package/locale-data/mfe.js +66 -0
- package/locale-data/mg.js +66 -0
- package/locale-data/mgh.js +66 -0
- package/locale-data/mgo.js +66 -0
- package/locale-data/mi.js +66 -0
- package/locale-data/mk.js +66 -0
- package/locale-data/ml.js +66 -0
- package/locale-data/mn.js +66 -0
- package/locale-data/mni-Beng.js +66 -0
- package/locale-data/mni.js +66 -0
- package/locale-data/mr.js +66 -0
- package/locale-data/ms-BN.js +66 -0
- package/locale-data/ms-ID.js +66 -0
- package/locale-data/ms-SG.js +66 -0
- package/locale-data/ms.js +66 -0
- package/locale-data/mt.js +66 -0
- package/locale-data/mua.js +66 -0
- package/locale-data/my.js +66 -0
- package/locale-data/mzn.js +66 -0
- package/locale-data/naq.js +66 -0
- package/locale-data/nb-SJ.js +66 -0
- package/locale-data/nb.js +66 -0
- package/locale-data/nd.js +66 -0
- package/locale-data/nds-NL.js +66 -0
- package/locale-data/nds.js +66 -0
- package/locale-data/ne-IN.js +66 -0
- package/locale-data/ne.js +66 -0
- package/locale-data/nl-AW.js +66 -0
- package/locale-data/nl-BE.js +66 -0
- package/locale-data/nl-BQ.js +66 -0
- package/locale-data/nl-CW.js +66 -0
- package/locale-data/nl-SR.js +66 -0
- package/locale-data/nl-SX.js +66 -0
- package/locale-data/nl.js +66 -0
- package/locale-data/nmg.js +66 -0
- package/locale-data/nn.js +66 -0
- package/locale-data/nnh.js +66 -0
- package/locale-data/no.js +66 -0
- package/locale-data/nus.js +66 -0
- package/locale-data/nyn.js +66 -0
- package/locale-data/om-KE.js +66 -0
- package/locale-data/om.js +66 -0
- package/locale-data/or.js +66 -0
- package/locale-data/os-RU.js +66 -0
- package/locale-data/os.js +66 -0
- package/locale-data/pa-Arab.js +66 -0
- package/locale-data/pa-Guru.js +66 -0
- package/locale-data/pa.js +66 -0
- package/locale-data/pcm.js +66 -0
- package/locale-data/pl.js +66 -0
- package/locale-data/ps-PK.js +66 -0
- package/locale-data/ps.js +66 -0
- package/locale-data/pt-AO.js +66 -0
- package/locale-data/pt-CH.js +66 -0
- package/locale-data/pt-CV.js +66 -0
- package/locale-data/pt-GQ.js +66 -0
- package/locale-data/pt-GW.js +66 -0
- package/locale-data/pt-LU.js +66 -0
- package/locale-data/pt-MO.js +66 -0
- package/locale-data/pt-MZ.js +66 -0
- package/locale-data/pt-PT.js +66 -0
- package/locale-data/pt-ST.js +66 -0
- package/locale-data/pt-TL.js +66 -0
- package/locale-data/pt.js +66 -0
- package/locale-data/qu-BO.js +66 -0
- package/locale-data/qu-EC.js +66 -0
- package/locale-data/qu.js +66 -0
- package/locale-data/rm.js +66 -0
- package/locale-data/rn.js +66 -0
- package/locale-data/ro-MD.js +66 -0
- package/locale-data/ro.js +66 -0
- package/locale-data/rof.js +66 -0
- package/locale-data/ru-BY.js +66 -0
- package/locale-data/ru-KG.js +66 -0
- package/locale-data/ru-KZ.js +66 -0
- package/locale-data/ru-MD.js +66 -0
- package/locale-data/ru-UA.js +66 -0
- package/locale-data/ru.js +66 -0
- package/locale-data/rw.js +66 -0
- package/locale-data/rwk.js +66 -0
- package/locale-data/sa.js +66 -0
- package/locale-data/sah.js +66 -0
- package/locale-data/saq.js +66 -0
- package/locale-data/sat-Olck.js +66 -0
- package/locale-data/sat.js +66 -0
- package/locale-data/sbp.js +66 -0
- package/locale-data/sc.js +66 -0
- package/locale-data/sd-Arab.js +66 -0
- package/locale-data/sd-Deva.js +66 -0
- package/locale-data/sd.js +66 -0
- package/locale-data/se-FI.js +66 -0
- package/locale-data/se-SE.js +66 -0
- package/locale-data/se.js +66 -0
- package/locale-data/seh.js +66 -0
- package/locale-data/ses.js +66 -0
- package/locale-data/sg.js +66 -0
- package/locale-data/shi-Latn.js +66 -0
- package/locale-data/shi-Tfng.js +66 -0
- package/locale-data/shi.js +66 -0
- package/locale-data/si.js +66 -0
- package/locale-data/sk.js +66 -0
- package/locale-data/sl.js +66 -0
- package/locale-data/smn.js +66 -0
- package/locale-data/sn.js +66 -0
- package/locale-data/so-DJ.js +66 -0
- package/locale-data/so-ET.js +66 -0
- package/locale-data/so-KE.js +66 -0
- package/locale-data/so.js +66 -0
- package/locale-data/sq-MK.js +66 -0
- package/locale-data/sq-XK.js +66 -0
- package/locale-data/sq.js +66 -0
- package/locale-data/sr-Cyrl-BA.js +66 -0
- package/locale-data/sr-Cyrl-ME.js +66 -0
- package/locale-data/sr-Cyrl-XK.js +66 -0
- package/locale-data/sr-Cyrl.js +66 -0
- package/locale-data/sr-Latn-BA.js +66 -0
- package/locale-data/sr-Latn-ME.js +66 -0
- package/locale-data/sr-Latn-XK.js +66 -0
- package/locale-data/sr-Latn.js +66 -0
- package/locale-data/sr.js +66 -0
- package/locale-data/su-Latn.js +66 -0
- package/locale-data/su.js +66 -0
- package/locale-data/sv-AX.js +66 -0
- package/locale-data/sv-FI.js +66 -0
- package/locale-data/sv.js +66 -0
- package/locale-data/sw-CD.js +66 -0
- package/locale-data/sw-KE.js +66 -0
- package/locale-data/sw-UG.js +66 -0
- package/locale-data/sw.js +66 -0
- package/locale-data/ta-LK.js +66 -0
- package/locale-data/ta-MY.js +66 -0
- package/locale-data/ta-SG.js +66 -0
- package/locale-data/ta.js +66 -0
- package/locale-data/te.js +66 -0
- package/locale-data/teo-KE.js +66 -0
- package/locale-data/teo.js +66 -0
- package/locale-data/tg.js +66 -0
- package/locale-data/th.js +66 -0
- package/locale-data/ti-ER.js +66 -0
- package/locale-data/ti.js +66 -0
- package/locale-data/tk.js +66 -0
- package/locale-data/to.js +66 -0
- package/locale-data/tr-CY.js +66 -0
- package/locale-data/tr.js +66 -0
- package/locale-data/tt.js +66 -0
- package/locale-data/twq.js +66 -0
- package/locale-data/tzm.js +66 -0
- package/locale-data/ug.js +66 -0
- package/locale-data/uk.js +66 -0
- package/locale-data/und.js +66 -0
- package/locale-data/ur-IN.js +66 -0
- package/locale-data/ur.js +66 -0
- package/locale-data/uz-Arab.js +66 -0
- package/locale-data/uz-Cyrl.js +66 -0
- package/locale-data/uz-Latn.js +66 -0
- package/locale-data/uz.js +66 -0
- package/locale-data/vai-Latn.js +66 -0
- package/locale-data/vai-Vaii.js +66 -0
- package/locale-data/vai.js +66 -0
- package/locale-data/vi.js +66 -0
- package/locale-data/vun.js +66 -0
- package/locale-data/wae.js +66 -0
- package/locale-data/wo.js +66 -0
- package/locale-data/xh.js +66 -0
- package/locale-data/xog.js +66 -0
- package/locale-data/yav.js +66 -0
- package/locale-data/yi.js +66 -0
- package/locale-data/yo-BJ.js +66 -0
- package/locale-data/yo.js +66 -0
- package/locale-data/yrl-CO.js +66 -0
- package/locale-data/yrl-VE.js +66 -0
- package/locale-data/yrl.js +66 -0
- package/locale-data/yue-Hans.js +66 -0
- package/locale-data/yue-Hant.js +66 -0
- package/locale-data/yue.js +66 -0
- package/locale-data/zgh.js +66 -0
- package/locale-data/zh-Hans-HK.js +66 -0
- package/locale-data/zh-Hans-MO.js +66 -0
- package/locale-data/zh-Hans-SG.js +66 -0
- package/locale-data/zh-Hans.js +66 -0
- package/locale-data/zh-Hant-HK.js +66 -0
- package/locale-data/zh-Hant-MO.js +66 -0
- package/locale-data/zh-Hant.js +66 -0
- package/locale-data/zh.js +66 -0
- package/locale-data/zu.js +66 -0
- package/package.json +4 -5
- package/polyfill-force.d.ts +1 -1
- package/polyfill-force.js +403 -1
- package/polyfill-force.js.map +1 -0
- package/polyfill.d.ts +1 -1
- package/polyfill.iife.js +4688 -7204
- package/polyfill.js +988 -2
- package/polyfill.js.map +1 -0
- package/should-polyfill.d.ts +5 -1
- package/should-polyfill.js +583 -8
- package/should-polyfill.js.map +1 -0
- package/supported-locales.generated.d.ts +0 -1
- package/supported-locales.generated.js +0 -573
package/polyfill-force.js
CHANGED
|
@@ -1,7 +1,409 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { LookupSupportedLocales, ResolveLocale } from "@formatjs/intl-localematcher";
|
|
2
|
+
//#region packages/ecma402-abstract/CanonicalizeLocaleList.js
|
|
3
|
+
/**
|
|
4
|
+
* http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist
|
|
5
|
+
* @param locales
|
|
6
|
+
*/
|
|
7
|
+
function CanonicalizeLocaleList(locales) {
|
|
8
|
+
return Intl.getCanonicalLocales(locales);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region packages/ecma262-abstract/ToString.js
|
|
12
|
+
/**
|
|
13
|
+
* https://tc39.es/ecma262/#sec-tostring
|
|
14
|
+
*/
|
|
15
|
+
function ToString(o) {
|
|
16
|
+
if (typeof o === "symbol") throw TypeError("Cannot convert a Symbol value to a string");
|
|
17
|
+
return String(o);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region packages/ecma402-abstract/GetOption.js
|
|
21
|
+
/**
|
|
22
|
+
* https://tc39.es/ecma402/#sec-getoption
|
|
23
|
+
* @param opts
|
|
24
|
+
* @param prop
|
|
25
|
+
* @param type
|
|
26
|
+
* @param values
|
|
27
|
+
* @param fallback
|
|
28
|
+
*/
|
|
29
|
+
function GetOption(opts, prop, type, values, fallback) {
|
|
30
|
+
if (typeof opts !== "object") throw new TypeError("Options must be an object");
|
|
31
|
+
let value = opts[prop];
|
|
32
|
+
if (value !== void 0) {
|
|
33
|
+
if (type !== "boolean" && type !== "string") throw new TypeError("invalid type");
|
|
34
|
+
if (type === "boolean") value = Boolean(value);
|
|
35
|
+
if (type === "string") value = ToString(value);
|
|
36
|
+
if (values !== void 0 && !values.filter((val) => val == value).length) throw new RangeError(`${value} is not within ${values.join(", ")}`);
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
return fallback;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region packages/ecma402-abstract/GetOptionsObject.js
|
|
43
|
+
/**
|
|
44
|
+
* https://tc39.es/ecma402/#sec-getoptionsobject
|
|
45
|
+
* @param options
|
|
46
|
+
* @returns
|
|
47
|
+
*/
|
|
48
|
+
function GetOptionsObject(options) {
|
|
49
|
+
if (typeof options === "undefined") return Object.create(null);
|
|
50
|
+
if (typeof options === "object") return options;
|
|
51
|
+
throw new TypeError("Options must be an object");
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/index.js
|
|
55
|
+
function memoize(fn, options) {
|
|
56
|
+
const cache = options && options.cache ? options.cache : cacheDefault;
|
|
57
|
+
const serializer = options && options.serializer ? options.serializer : serializerDefault;
|
|
58
|
+
return (options && options.strategy ? options.strategy : strategyDefault)(fn, {
|
|
59
|
+
cache,
|
|
60
|
+
serializer
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function isPrimitive(value) {
|
|
64
|
+
return value == null || typeof value === "number" || typeof value === "boolean";
|
|
65
|
+
}
|
|
66
|
+
function monadic(fn, cache, serializer, arg) {
|
|
67
|
+
const cacheKey = isPrimitive(arg) ? arg : serializer(arg);
|
|
68
|
+
let computedValue = cache.get(cacheKey);
|
|
69
|
+
if (typeof computedValue === "undefined") {
|
|
70
|
+
computedValue = fn.call(this, arg);
|
|
71
|
+
cache.set(cacheKey, computedValue);
|
|
72
|
+
}
|
|
73
|
+
return computedValue;
|
|
74
|
+
}
|
|
75
|
+
function variadic(fn, cache, serializer) {
|
|
76
|
+
const args = Array.prototype.slice.call(arguments, 3);
|
|
77
|
+
const cacheKey = serializer(args);
|
|
78
|
+
let computedValue = cache.get(cacheKey);
|
|
79
|
+
if (typeof computedValue === "undefined") {
|
|
80
|
+
computedValue = fn.apply(this, args);
|
|
81
|
+
cache.set(cacheKey, computedValue);
|
|
82
|
+
}
|
|
83
|
+
return computedValue;
|
|
84
|
+
}
|
|
85
|
+
function assemble(fn, context, strategy, cache, serialize) {
|
|
86
|
+
return strategy.bind(context, fn, cache, serialize);
|
|
87
|
+
}
|
|
88
|
+
function strategyDefault(fn, options) {
|
|
89
|
+
const strategy = fn.length === 1 ? monadic : variadic;
|
|
90
|
+
return assemble(fn, this, strategy, options.cache.create(), options.serializer);
|
|
91
|
+
}
|
|
92
|
+
function strategyVariadic(fn, options) {
|
|
93
|
+
return assemble(fn, this, variadic, options.cache.create(), options.serializer);
|
|
94
|
+
}
|
|
95
|
+
function strategyMonadic(fn, options) {
|
|
96
|
+
return assemble(fn, this, monadic, options.cache.create(), options.serializer);
|
|
97
|
+
}
|
|
98
|
+
const serializerDefault = function() {
|
|
99
|
+
return JSON.stringify(arguments);
|
|
100
|
+
};
|
|
101
|
+
var ObjectWithoutPrototypeCache = class {
|
|
102
|
+
constructor() {
|
|
103
|
+
this.cache = Object.create(null);
|
|
104
|
+
}
|
|
105
|
+
get(key) {
|
|
106
|
+
return this.cache[key];
|
|
107
|
+
}
|
|
108
|
+
set(key, value) {
|
|
109
|
+
this.cache[key] = value;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
const cacheDefault = { create: function create() {
|
|
113
|
+
return new ObjectWithoutPrototypeCache();
|
|
114
|
+
} };
|
|
115
|
+
const strategies = {
|
|
116
|
+
variadic: strategyVariadic,
|
|
117
|
+
monadic: strategyMonadic
|
|
118
|
+
};
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region packages/ecma402-abstract/utils.js
|
|
121
|
+
function setInternalSlot(map, pl, field, value) {
|
|
122
|
+
if (!map.get(pl)) map.set(pl, Object.create(null));
|
|
123
|
+
const slots = map.get(pl);
|
|
124
|
+
slots[field] = value;
|
|
125
|
+
}
|
|
126
|
+
function getInternalSlot(map, pl, field) {
|
|
127
|
+
return getMultiInternalSlots(map, pl, field)[field];
|
|
128
|
+
}
|
|
129
|
+
function getMultiInternalSlots(map, pl, ...fields) {
|
|
130
|
+
const slots = map.get(pl);
|
|
131
|
+
if (!slots) throw new TypeError(`${pl} InternalSlot has not been initialized`);
|
|
132
|
+
return fields.reduce((all, f) => {
|
|
133
|
+
all[f] = slots[f];
|
|
134
|
+
return all;
|
|
135
|
+
}, Object.create(null));
|
|
136
|
+
}
|
|
137
|
+
function isLiteralPart(patternPart) {
|
|
138
|
+
return patternPart.type === "literal";
|
|
139
|
+
}
|
|
140
|
+
function invariant(condition, message, Err = Error) {
|
|
141
|
+
if (!condition) throw new Err(message);
|
|
142
|
+
}
|
|
143
|
+
memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });
|
|
144
|
+
memoize((...args) => new Intl.PluralRules(...args), { strategy: strategies.variadic });
|
|
145
|
+
memoize((...args) => new Intl.Locale(...args), { strategy: strategies.variadic });
|
|
146
|
+
memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region packages/ecma402-abstract/PartitionPattern.js
|
|
149
|
+
/**
|
|
150
|
+
* Partition a pattern into a list of literals and placeholders
|
|
151
|
+
* https://tc39.es/ecma402/#sec-partitionpattern
|
|
152
|
+
* @param pattern
|
|
153
|
+
*/
|
|
154
|
+
function PartitionPattern(pattern) {
|
|
155
|
+
const result = [];
|
|
156
|
+
let beginIndex = pattern.indexOf("{");
|
|
157
|
+
let endIndex = 0;
|
|
158
|
+
let nextIndex = 0;
|
|
159
|
+
const length = pattern.length;
|
|
160
|
+
while (beginIndex < pattern.length && beginIndex > -1) {
|
|
161
|
+
endIndex = pattern.indexOf("}", beginIndex);
|
|
162
|
+
invariant(endIndex > beginIndex, `Invalid pattern ${pattern}`);
|
|
163
|
+
if (beginIndex > nextIndex) result.push({
|
|
164
|
+
type: "literal",
|
|
165
|
+
value: pattern.substring(nextIndex, beginIndex)
|
|
166
|
+
});
|
|
167
|
+
result.push({
|
|
168
|
+
type: pattern.substring(beginIndex + 1, endIndex),
|
|
169
|
+
value: void 0
|
|
170
|
+
});
|
|
171
|
+
nextIndex = endIndex + 1;
|
|
172
|
+
beginIndex = pattern.indexOf("{", nextIndex);
|
|
173
|
+
}
|
|
174
|
+
if (nextIndex < length) result.push({
|
|
175
|
+
type: "literal",
|
|
176
|
+
value: pattern.substring(nextIndex, length)
|
|
177
|
+
});
|
|
178
|
+
return result;
|
|
179
|
+
}
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region packages/ecma262-abstract/ToObject.js
|
|
182
|
+
/**
|
|
183
|
+
* https://tc39.es/ecma262/#sec-toobject
|
|
184
|
+
*/
|
|
185
|
+
function ToObject(arg) {
|
|
186
|
+
if (arg == null) throw new TypeError("undefined/null cannot be converted to object");
|
|
187
|
+
return Object(arg);
|
|
188
|
+
}
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region packages/ecma402-abstract/SupportedLocales.js
|
|
191
|
+
/**
|
|
192
|
+
* https://tc39.es/ecma402/#sec-supportedlocales
|
|
193
|
+
* @param availableLocales
|
|
194
|
+
* @param requestedLocales
|
|
195
|
+
* @param options
|
|
196
|
+
*/
|
|
197
|
+
function SupportedLocales(availableLocales, requestedLocales, options) {
|
|
198
|
+
let matcher = "best fit";
|
|
199
|
+
if (options !== void 0) {
|
|
200
|
+
options = ToObject(options);
|
|
201
|
+
matcher = GetOption(options, "localeMatcher", "string", ["lookup", "best fit"], "best fit");
|
|
202
|
+
}
|
|
203
|
+
if (matcher === "best fit") return LookupSupportedLocales(Array.from(availableLocales), requestedLocales);
|
|
204
|
+
return LookupSupportedLocales(Array.from(availableLocales), requestedLocales);
|
|
205
|
+
}
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region packages/intl-listformat/index.ts
|
|
208
|
+
function validateInstance(instance, method) {
|
|
209
|
+
if (!(instance instanceof ListFormat)) throw new TypeError(`Method Intl.ListFormat.prototype.${method} called on incompatible receiver ${String(instance)}`);
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* https://tc39.es/proposal-intl-list-format/#sec-createstringlistfromiterable
|
|
213
|
+
* @param iterable list
|
|
214
|
+
*/
|
|
215
|
+
function stringListFromIterable(iterable) {
|
|
216
|
+
if (typeof iterable !== "object") return [];
|
|
217
|
+
const elements = [];
|
|
218
|
+
const iterator = iterable[Symbol.iterator]();
|
|
219
|
+
let result;
|
|
220
|
+
while (true) {
|
|
221
|
+
result = iterator.next();
|
|
222
|
+
if (result.done) break;
|
|
223
|
+
if (typeof result.value !== "string") {
|
|
224
|
+
const nextValue = result.value;
|
|
225
|
+
throw new TypeError(`Iterable yielded ${nextValue} which is not a string`);
|
|
226
|
+
}
|
|
227
|
+
elements.push(result.value);
|
|
228
|
+
}
|
|
229
|
+
return elements;
|
|
230
|
+
}
|
|
231
|
+
function createPartsFromList(internalSlotMap, lf, list) {
|
|
232
|
+
const size = list.length;
|
|
233
|
+
if (size === 0) return [];
|
|
234
|
+
if (size === 2) return deconstructPattern(getInternalSlot(internalSlotMap, lf, "templatePair"), {
|
|
235
|
+
"0": {
|
|
236
|
+
type: "element",
|
|
237
|
+
value: list[0]
|
|
238
|
+
},
|
|
239
|
+
"1": {
|
|
240
|
+
type: "element",
|
|
241
|
+
value: list[1]
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
let parts = {
|
|
245
|
+
type: "element",
|
|
246
|
+
value: list[size - 1]
|
|
247
|
+
};
|
|
248
|
+
let i = size - 2;
|
|
249
|
+
while (i >= 0) {
|
|
250
|
+
let pattern;
|
|
251
|
+
if (i === 0) pattern = getInternalSlot(internalSlotMap, lf, "templateStart");
|
|
252
|
+
else if (i < size - 2) pattern = getInternalSlot(internalSlotMap, lf, "templateMiddle");
|
|
253
|
+
else pattern = getInternalSlot(internalSlotMap, lf, "templateEnd");
|
|
254
|
+
const head = {
|
|
255
|
+
type: "element",
|
|
256
|
+
value: list[i]
|
|
257
|
+
};
|
|
258
|
+
parts = deconstructPattern(pattern, {
|
|
259
|
+
"0": head,
|
|
260
|
+
"1": parts
|
|
261
|
+
});
|
|
262
|
+
i--;
|
|
263
|
+
}
|
|
264
|
+
return parts;
|
|
265
|
+
}
|
|
266
|
+
function deconstructPattern(pattern, placeables) {
|
|
267
|
+
const patternParts = PartitionPattern(pattern);
|
|
268
|
+
const result = [];
|
|
269
|
+
for (const patternPart of patternParts) {
|
|
270
|
+
const { type: part } = patternPart;
|
|
271
|
+
if (isLiteralPart(patternPart)) result.push({
|
|
272
|
+
type: "literal",
|
|
273
|
+
value: patternPart.value
|
|
274
|
+
});
|
|
275
|
+
else {
|
|
276
|
+
invariant(part in placeables, `${part} is missing from placables`);
|
|
277
|
+
const subst = placeables[part];
|
|
278
|
+
if (Array.isArray(subst)) result.push(...subst);
|
|
279
|
+
else result.push(subst);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return result;
|
|
283
|
+
}
|
|
284
|
+
var ListFormat = class ListFormat {
|
|
285
|
+
constructor(locales, options) {
|
|
286
|
+
if (!(this && this instanceof ListFormat ? this.constructor : void 0)) throw new TypeError("Intl.ListFormat must be called with 'new'");
|
|
287
|
+
setInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, "initializedListFormat", true);
|
|
288
|
+
const requestedLocales = CanonicalizeLocaleList(locales);
|
|
289
|
+
const opt = Object.create(null);
|
|
290
|
+
const opts = GetOptionsObject(options);
|
|
291
|
+
opt.localeMatcher = GetOption(opts, "localeMatcher", "string", ["best fit", "lookup"], "best fit");
|
|
292
|
+
const { localeData } = ListFormat;
|
|
293
|
+
const r = ResolveLocale(ListFormat.availableLocales, requestedLocales, opt, ListFormat.relevantExtensionKeys, localeData, ListFormat.getDefaultLocale);
|
|
294
|
+
setInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, "locale", r.locale);
|
|
295
|
+
const type = GetOption(opts, "type", "string", [
|
|
296
|
+
"conjunction",
|
|
297
|
+
"disjunction",
|
|
298
|
+
"unit"
|
|
299
|
+
], "conjunction");
|
|
300
|
+
setInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, "type", type);
|
|
301
|
+
const style = GetOption(opts, "style", "string", [
|
|
302
|
+
"long",
|
|
303
|
+
"short",
|
|
304
|
+
"narrow"
|
|
305
|
+
], "long");
|
|
306
|
+
setInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, "style", style);
|
|
307
|
+
const { dataLocale } = r;
|
|
308
|
+
const dataLocaleData = localeData[dataLocale];
|
|
309
|
+
invariant(!!dataLocaleData, `Missing locale data for ${dataLocale}`);
|
|
310
|
+
const templates = dataLocaleData[type][style];
|
|
311
|
+
setInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, "templatePair", templates.pair);
|
|
312
|
+
setInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, "templateStart", templates.start);
|
|
313
|
+
setInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, "templateMiddle", templates.middle);
|
|
314
|
+
setInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, "templateEnd", templates.end);
|
|
315
|
+
}
|
|
316
|
+
format(elements) {
|
|
317
|
+
validateInstance(this, "format");
|
|
318
|
+
let result = "";
|
|
319
|
+
const parts = createPartsFromList(ListFormat.__INTERNAL_SLOT_MAP__, this, stringListFromIterable(elements));
|
|
320
|
+
if (!Array.isArray(parts)) return parts.value;
|
|
321
|
+
for (const p of parts) result += p.value;
|
|
322
|
+
return result;
|
|
323
|
+
}
|
|
324
|
+
formatToParts(elements) {
|
|
325
|
+
validateInstance(this, "format");
|
|
326
|
+
const parts = createPartsFromList(ListFormat.__INTERNAL_SLOT_MAP__, this, stringListFromIterable(elements));
|
|
327
|
+
if (!Array.isArray(parts)) return [parts];
|
|
328
|
+
const result = [];
|
|
329
|
+
for (const part of parts) result.push({ ...part });
|
|
330
|
+
return result;
|
|
331
|
+
}
|
|
332
|
+
resolvedOptions() {
|
|
333
|
+
validateInstance(this, "resolvedOptions");
|
|
334
|
+
return {
|
|
335
|
+
locale: getInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, "locale"),
|
|
336
|
+
type: getInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, "type"),
|
|
337
|
+
style: getInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, "style")
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
static supportedLocalesOf(locales, options) {
|
|
341
|
+
return SupportedLocales(ListFormat.availableLocales, CanonicalizeLocaleList(locales), options);
|
|
342
|
+
}
|
|
343
|
+
static __addLocaleData(...data) {
|
|
344
|
+
for (const { data: d, locale } of data) {
|
|
345
|
+
const minimizedLocale = new Intl.Locale(locale).minimize().toString();
|
|
346
|
+
ListFormat.localeData[locale] = ListFormat.localeData[minimizedLocale] = d;
|
|
347
|
+
ListFormat.availableLocales.add(minimizedLocale);
|
|
348
|
+
ListFormat.availableLocales.add(locale);
|
|
349
|
+
if (!ListFormat.__defaultLocale) ListFormat.__defaultLocale = minimizedLocale;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
static {
|
|
353
|
+
this.localeData = {};
|
|
354
|
+
}
|
|
355
|
+
static {
|
|
356
|
+
this.availableLocales = /* @__PURE__ */ new Set();
|
|
357
|
+
}
|
|
358
|
+
static {
|
|
359
|
+
this.__defaultLocale = "";
|
|
360
|
+
}
|
|
361
|
+
static getDefaultLocale() {
|
|
362
|
+
return ListFormat.__defaultLocale;
|
|
363
|
+
}
|
|
364
|
+
static {
|
|
365
|
+
this.relevantExtensionKeys = [];
|
|
366
|
+
}
|
|
367
|
+
static {
|
|
368
|
+
this.polyfilled = true;
|
|
369
|
+
}
|
|
370
|
+
static {
|
|
371
|
+
this.__INTERNAL_SLOT_MAP__ = /* @__PURE__ */ new WeakMap();
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
try {
|
|
375
|
+
if (typeof Symbol !== "undefined") Object.defineProperty(ListFormat.prototype, Symbol.toStringTag, {
|
|
376
|
+
value: "Intl.ListFormat",
|
|
377
|
+
writable: false,
|
|
378
|
+
enumerable: false,
|
|
379
|
+
configurable: true
|
|
380
|
+
});
|
|
381
|
+
Object.defineProperty(ListFormat.prototype.constructor, "length", {
|
|
382
|
+
value: 0,
|
|
383
|
+
writable: false,
|
|
384
|
+
enumerable: false,
|
|
385
|
+
configurable: true
|
|
386
|
+
});
|
|
387
|
+
Object.defineProperty(ListFormat.supportedLocalesOf, "length", {
|
|
388
|
+
value: 1,
|
|
389
|
+
writable: false,
|
|
390
|
+
enumerable: false,
|
|
391
|
+
configurable: true
|
|
392
|
+
});
|
|
393
|
+
} catch {}
|
|
394
|
+
//#endregion
|
|
395
|
+
//#region packages/intl-listformat/polyfill-force.ts
|
|
2
396
|
Object.defineProperty(Intl, "ListFormat", {
|
|
3
397
|
value: ListFormat,
|
|
4
398
|
writable: true,
|
|
5
399
|
enumerable: false,
|
|
6
400
|
configurable: true
|
|
7
401
|
});
|
|
402
|
+
const buf = globalThis.__FORMATJS_LISTFORMAT_DATA__;
|
|
403
|
+
if (buf) {
|
|
404
|
+
for (const d of buf) ListFormat.__addLocaleData(d);
|
|
405
|
+
delete globalThis.__FORMATJS_LISTFORMAT_DATA__;
|
|
406
|
+
}
|
|
407
|
+
//#endregion
|
|
408
|
+
|
|
409
|
+
//# sourceMappingURL=polyfill-force.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polyfill-force.js","names":[],"sources":["../../ecma402-abstract/CanonicalizeLocaleList.js","../../ecma262-abstract/ToString.js","../../ecma402-abstract/GetOption.js","../../ecma402-abstract/GetOptionsObject.js","../../../node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/index.js","../../ecma402-abstract/utils.js","../../ecma402-abstract/PartitionPattern.js","../../ecma262-abstract/ToObject.js","../../ecma402-abstract/SupportedLocales.js","../index.ts","../polyfill-force.ts"],"sourcesContent":["/**\n* http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist\n* @param locales\n*/\nexport function CanonicalizeLocaleList(locales) {\n\t// TODO\n\treturn Intl.getCanonicalLocales(locales);\n}\n","/**\n* https://tc39.es/ecma262/#sec-tostring\n*/\nexport function ToString(o) {\n\tif (typeof o === \"symbol\") {\n\t\tthrow TypeError(\"Cannot convert a Symbol value to a string\");\n\t}\n\treturn String(o);\n}\n","import { ToString } from \"#packages/ecma262-abstract/ToString.js\";\n/**\n* https://tc39.es/ecma402/#sec-getoption\n* @param opts\n* @param prop\n* @param type\n* @param values\n* @param fallback\n*/\nexport function GetOption(opts, prop, type, values, fallback) {\n\tif (typeof opts !== \"object\") {\n\t\tthrow new TypeError(\"Options must be an object\");\n\t}\n\tlet value = opts[prop];\n\tif (value !== undefined) {\n\t\tif (type !== \"boolean\" && type !== \"string\") {\n\t\t\tthrow new TypeError(\"invalid type\");\n\t\t}\n\t\tif (type === \"boolean\") {\n\t\t\tvalue = Boolean(value);\n\t\t}\n\t\tif (type === \"string\") {\n\t\t\tvalue = ToString(value);\n\t\t}\n\t\tif (values !== undefined && !values.filter((val) => val == value).length) {\n\t\t\tthrow new RangeError(`${value} is not within ${values.join(\", \")}`);\n\t\t}\n\t\treturn value;\n\t}\n\treturn fallback;\n}\n","/**\n* https://tc39.es/ecma402/#sec-getoptionsobject\n* @param options\n* @returns\n*/\nexport function GetOptionsObject(options) {\n\tif (typeof options === \"undefined\") {\n\t\treturn Object.create(null);\n\t}\n\tif (typeof options === \"object\") {\n\t\treturn options;\n\t}\n\tthrow new TypeError(\"Options must be an object\");\n}\n","//#region packages/fast-memoize/index.ts\nfunction memoize(fn, options) {\n\tconst cache = options && options.cache ? options.cache : cacheDefault;\n\tconst serializer = options && options.serializer ? options.serializer : serializerDefault;\n\treturn (options && options.strategy ? options.strategy : strategyDefault)(fn, {\n\t\tcache,\n\t\tserializer\n\t});\n}\nfunction isPrimitive(value) {\n\treturn value == null || typeof value === \"number\" || typeof value === \"boolean\";\n}\nfunction monadic(fn, cache, serializer, arg) {\n\tconst cacheKey = isPrimitive(arg) ? arg : serializer(arg);\n\tlet computedValue = cache.get(cacheKey);\n\tif (typeof computedValue === \"undefined\") {\n\t\tcomputedValue = fn.call(this, arg);\n\t\tcache.set(cacheKey, computedValue);\n\t}\n\treturn computedValue;\n}\nfunction variadic(fn, cache, serializer) {\n\tconst args = Array.prototype.slice.call(arguments, 3);\n\tconst cacheKey = serializer(args);\n\tlet computedValue = cache.get(cacheKey);\n\tif (typeof computedValue === \"undefined\") {\n\t\tcomputedValue = fn.apply(this, args);\n\t\tcache.set(cacheKey, computedValue);\n\t}\n\treturn computedValue;\n}\nfunction assemble(fn, context, strategy, cache, serialize) {\n\treturn strategy.bind(context, fn, cache, serialize);\n}\nfunction strategyDefault(fn, options) {\n\tconst strategy = fn.length === 1 ? monadic : variadic;\n\treturn assemble(fn, this, strategy, options.cache.create(), options.serializer);\n}\nfunction strategyVariadic(fn, options) {\n\treturn assemble(fn, this, variadic, options.cache.create(), options.serializer);\n}\nfunction strategyMonadic(fn, options) {\n\treturn assemble(fn, this, monadic, options.cache.create(), options.serializer);\n}\nconst serializerDefault = function() {\n\treturn JSON.stringify(arguments);\n};\nvar ObjectWithoutPrototypeCache = class {\n\tconstructor() {\n\t\tthis.cache = Object.create(null);\n\t}\n\tget(key) {\n\t\treturn this.cache[key];\n\t}\n\tset(key, value) {\n\t\tthis.cache[key] = value;\n\t}\n};\nconst cacheDefault = { create: function create() {\n\treturn new ObjectWithoutPrototypeCache();\n} };\nconst strategies = {\n\tvariadic: strategyVariadic,\n\tmonadic: strategyMonadic\n};\n//#endregion\nexport { memoize, strategies };\n\n//# sourceMappingURL=index.js.map","import { memoize, strategies } from \"@formatjs/fast-memoize\";\nexport function repeat(s, times) {\n\tif (typeof s.repeat === \"function\") {\n\t\treturn s.repeat(times);\n\t}\n\tconst arr = Array.from({ length: times });\n\tfor (let i = 0; i < arr.length; i++) {\n\t\tarr[i] = s;\n\t}\n\treturn arr.join(\"\");\n}\nexport function setInternalSlot(map, pl, field, value) {\n\tif (!map.get(pl)) {\n\t\tmap.set(pl, Object.create(null));\n\t}\n\tconst slots = map.get(pl);\n\tslots[field] = value;\n}\nexport function setMultiInternalSlots(map, pl, props) {\n\tfor (const k of Object.keys(props)) {\n\t\tsetInternalSlot(map, pl, k, props[k]);\n\t}\n}\nexport function getInternalSlot(map, pl, field) {\n\treturn getMultiInternalSlots(map, pl, field)[field];\n}\nexport function getMultiInternalSlots(map, pl, ...fields) {\n\tconst slots = map.get(pl);\n\tif (!slots) {\n\t\tthrow new TypeError(`${pl} InternalSlot has not been initialized`);\n\t}\n\treturn fields.reduce((all, f) => {\n\t\tall[f] = slots[f];\n\t\treturn all;\n\t}, Object.create(null));\n}\nexport function isLiteralPart(patternPart) {\n\treturn patternPart.type === \"literal\";\n}\n/*\n17 ECMAScript Standard Built-in Objects:\nEvery built-in Function object, including constructors, that is not\nidentified as an anonymous function has a name property whose value\nis a String.\n\nUnless otherwise specified, the name property of a built-in Function\nobject, if it exists, has the attributes { [[Writable]]: false,\n[[Enumerable]]: false, [[Configurable]]: true }.\n*/\nexport function defineProperty(target, name, { value }) {\n\tObject.defineProperty(target, name, {\n\t\tconfigurable: true,\n\t\tenumerable: false,\n\t\twritable: true,\n\t\tvalue\n\t});\n}\n/**\n* 7.3.5 CreateDataProperty\n* @param target\n* @param name\n* @param value\n*/\nexport function createDataProperty(target, name, value) {\n\tObject.defineProperty(target, name, {\n\t\tconfigurable: true,\n\t\tenumerable: true,\n\t\twritable: true,\n\t\tvalue\n\t});\n}\nexport const UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;\nexport function invariant(condition, message, Err = Error) {\n\tif (!condition) {\n\t\tthrow new Err(message);\n\t}\n}\nexport const createMemoizedNumberFormat = memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });\nexport const createMemoizedPluralRules = memoize((...args) => new Intl.PluralRules(...args), { strategy: strategies.variadic });\nexport const createMemoizedLocale = memoize((...args) => new Intl.Locale(...args), { strategy: strategies.variadic });\nexport const createMemoizedListFormat = memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });\n","import { invariant } from \"#packages/ecma402-abstract/utils.js\";\n/**\n* Partition a pattern into a list of literals and placeholders\n* https://tc39.es/ecma402/#sec-partitionpattern\n* @param pattern\n*/\nexport function PartitionPattern(pattern) {\n\tconst result = [];\n\tlet beginIndex = pattern.indexOf(\"{\");\n\tlet endIndex = 0;\n\tlet nextIndex = 0;\n\tconst length = pattern.length;\n\twhile (beginIndex < pattern.length && beginIndex > -1) {\n\t\tendIndex = pattern.indexOf(\"}\", beginIndex);\n\t\tinvariant(endIndex > beginIndex, `Invalid pattern ${pattern}`);\n\t\tif (beginIndex > nextIndex) {\n\t\t\tresult.push({\n\t\t\t\ttype: \"literal\",\n\t\t\t\tvalue: pattern.substring(nextIndex, beginIndex)\n\t\t\t});\n\t\t}\n\t\tresult.push({\n\t\t\ttype: pattern.substring(beginIndex + 1, endIndex),\n\t\t\tvalue: undefined\n\t\t});\n\t\tnextIndex = endIndex + 1;\n\t\tbeginIndex = pattern.indexOf(\"{\", nextIndex);\n\t}\n\tif (nextIndex < length) {\n\t\tresult.push({\n\t\t\ttype: \"literal\",\n\t\t\tvalue: pattern.substring(nextIndex, length)\n\t\t});\n\t}\n\treturn result;\n}\n","/**\n* https://tc39.es/ecma262/#sec-toobject\n*/\nexport function ToObject(arg) {\n\tif (arg == null) {\n\t\tthrow new TypeError(\"undefined/null cannot be converted to object\");\n\t}\n\treturn Object(arg);\n}\n","import { LookupSupportedLocales } from \"@formatjs/intl-localematcher\";\nimport { ToObject } from \"#packages/ecma262-abstract/ToObject.js\";\nimport { GetOption } from \"#packages/ecma402-abstract/GetOption.js\";\n/**\n* https://tc39.es/ecma402/#sec-supportedlocales\n* @param availableLocales\n* @param requestedLocales\n* @param options\n*/\nexport function SupportedLocales(availableLocales, requestedLocales, options) {\n\tlet matcher = \"best fit\";\n\tif (options !== undefined) {\n\t\toptions = ToObject(options);\n\t\tmatcher = GetOption(options, \"localeMatcher\", \"string\", [\"lookup\", \"best fit\"], \"best fit\");\n\t}\n\tif (matcher === \"best fit\") {\n\t\treturn LookupSupportedLocales(Array.from(availableLocales), requestedLocales);\n\t}\n\treturn LookupSupportedLocales(Array.from(availableLocales), requestedLocales);\n}\n","import {CanonicalizeLocaleList} from '#packages/ecma402-abstract/CanonicalizeLocaleList.js'\nimport {GetOption} from '#packages/ecma402-abstract/GetOption.js'\nimport {GetOptionsObject} from '#packages/ecma402-abstract/GetOptionsObject.js'\nimport {PartitionPattern} from '#packages/ecma402-abstract/PartitionPattern.js'\nimport {SupportedLocales} from '#packages/ecma402-abstract/SupportedLocales.js'\nimport {\n type ListPatternData,\n type ListPatternFieldsData,\n type ListPatternLocaleData,\n} from '#packages/ecma402-abstract/types/list.js'\nimport {\n type LiteralPart,\n getInternalSlot,\n invariant,\n isLiteralPart,\n setInternalSlot,\n} from '#packages/ecma402-abstract/utils.js'\nimport {ResolveLocale} from '@formatjs/intl-localematcher'\n\nexport interface IntlListFormatOptions {\n /**\n * The locale matching algorithm to use.\n * Possible values are \"lookup\" and \"best fit\"; the default is \"best fit\".\n * For information about this option, see\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation.\n */\n localeMatcher?: 'best fit' | 'lookup'\n /**\n * The format of output message.\n * Possible values are :\n * - \"conjunction\" that stands for \"and\"-based lists (default, e.g., \"A, B, and C\")\n * - \"disjunction\" that stands for \"or\"-based lists (e.g., \"A, B, or C\").\n * - \"unit\" stands for lists of values with units (e.g., \"5 pounds, 12 ounces\").\n */\n type?: 'conjunction' | 'disjunction' | 'unit'\n /**\n * The length of the formatted message.\n * Possible values are:\n * - \"long\" (default, e.g., \"A, B, and C\");\n * - \"short\" (e.g., \"A, B, C\"), or\n * - \"narrow\" (e.g., \"A B C\").\n * When style is \"short\" or \"narrow\", \"unit\" is the only allowed value for the type option.\n */\n style?: 'long' | 'short' | 'narrow'\n}\n\nexport interface ResolvedIntlListFormatOptions {\n /**\n * A string with a BCP 47 language tag, or an array of such strings.\n * For the general form and interpretation of the locales argument,\n * see the [Intl](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) page.\n */\n locale: string\n /**\n * The format of output message.\n * Possible values are :\n * - \"conjunction\" that stands for \"and\"-based lists (default, e.g., \"A, B, and C\")\n * - \"disjunction\" that stands for \"or\"-based lists (e.g., \"A, B, or C\").\n * - \"unit\" stands for lists of values with units (e.g., \"5 pounds, 12 ounces\").\n */\n type: 'conjunction' | 'disjunction' | 'unit'\n /**\n * The length of the formatted message.\n * Possible values are:\n * - \"long\" (default, e.g., \"A, B, and C\");\n * - \"short\" (e.g., \"A, B, C\"), or\n * - \"narrow\" (e.g., \"A B C\").\n * When style is \"short\" or \"narrow\", \"unit\" is the only allowed value for the type option.\n */\n style: 'long' | 'short' | 'narrow'\n}\n\nexport type Part<T = string> = LiteralPart | ElementPart | ElementPart<T>\n\nexport interface ElementPart<T = string> {\n type: 'element'\n value: T\n}\n\ninterface Placeable {\n type: string\n value: string\n}\n\ninterface ListFormatInternal {\n style: IntlListFormatOptions['style']\n type: IntlListFormatOptions['type']\n locale: string\n templatePair: string\n templateStart: string\n templateEnd: string\n templateMiddle: string\n initializedListFormat: boolean\n}\n\nfunction validateInstance(instance: any, method: string) {\n if (!(instance instanceof ListFormat)) {\n throw new TypeError(\n `Method Intl.ListFormat.prototype.${method} called on incompatible receiver ${String(\n instance\n )}`\n )\n }\n}\n\n/**\n * https://tc39.es/proposal-intl-list-format/#sec-createstringlistfromiterable\n * @param iterable list\n */\nfunction stringListFromIterable(iterable: Iterable<unknown>): string[] {\n if (typeof iterable !== 'object') return []\n const elements: string[] = []\n const iterator = iterable[Symbol.iterator]()\n let result: IteratorResult<unknown>\n while (true) {\n result = iterator.next()\n if (result.done) break\n if (typeof result.value !== 'string') {\n const nextValue = result.value\n throw new TypeError(`Iterable yielded ${nextValue} which is not a string`)\n }\n elements.push(result.value)\n }\n return elements\n}\n\nfunction createPartsFromList(\n internalSlotMap: WeakMap<ListFormat, ListFormatInternal>,\n lf: ListFormat,\n list: string[]\n) {\n const size = list.length\n if (size === 0) {\n return []\n }\n if (size === 2) {\n const pattern = getInternalSlot(internalSlotMap, lf, 'templatePair')\n const first = {type: 'element', value: list[0]}\n const second = {type: 'element', value: list[1]}\n return deconstructPattern(pattern, {'0': first, '1': second})\n }\n const last = {\n type: 'element',\n value: list[size - 1],\n }\n let parts: Placeable[] | Placeable = last\n let i = size - 2\n while (i >= 0) {\n let pattern\n if (i === 0) {\n pattern = getInternalSlot(internalSlotMap, lf, 'templateStart')\n } else if (i < size - 2) {\n pattern = getInternalSlot(internalSlotMap, lf, 'templateMiddle')\n } else {\n pattern = getInternalSlot(internalSlotMap, lf, 'templateEnd')\n }\n const head = {type: 'element', value: list[i]}\n parts = deconstructPattern(pattern, {'0': head, '1': parts})\n i--\n }\n return parts\n}\n\nfunction deconstructPattern(\n pattern: string,\n placeables: Record<string, Placeable | Placeable[]>\n) {\n const patternParts = PartitionPattern(pattern)\n const result: Placeable[] = []\n for (const patternPart of patternParts) {\n const {type: part} = patternPart\n if (isLiteralPart(patternPart)) {\n result.push({\n type: 'literal',\n value: patternPart.value,\n })\n } else {\n invariant(part in placeables, `${part} is missing from placables`)\n const subst = placeables[part]\n if (Array.isArray(subst)) {\n result.push(...subst)\n } else {\n result.push(subst)\n }\n }\n }\n return result\n}\n\nexport default class ListFormat {\n constructor(locales?: string | string[], options?: IntlListFormatOptions) {\n // test262/test/intl402/ListFormat/constructor/constructor/newtarget-undefined.js\n // Cannot use `new.target` bc of IE11 & TS transpiles it to something else\n const newTarget =\n this && this instanceof ListFormat ? this.constructor : void 0\n if (!newTarget) {\n throw new TypeError(\"Intl.ListFormat must be called with 'new'\")\n }\n setInternalSlot(\n ListFormat.__INTERNAL_SLOT_MAP__,\n this,\n 'initializedListFormat',\n true\n )\n const requestedLocales = CanonicalizeLocaleList(locales)\n const opt: any = Object.create(null)\n const opts = GetOptionsObject(options)\n const matcher = GetOption(\n opts,\n 'localeMatcher',\n 'string',\n ['best fit', 'lookup'],\n 'best fit'\n )\n opt.localeMatcher = matcher\n const {localeData} = ListFormat\n const r = ResolveLocale(\n ListFormat.availableLocales,\n requestedLocales,\n opt,\n ListFormat.relevantExtensionKeys,\n localeData,\n ListFormat.getDefaultLocale\n )\n setInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, 'locale', r.locale)\n const type: keyof ListPatternFieldsData = GetOption(\n opts,\n 'type',\n 'string',\n ['conjunction', 'disjunction', 'unit'],\n 'conjunction'\n )\n setInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, 'type', type)\n const style: keyof ListPatternData = GetOption(\n opts,\n 'style',\n 'string',\n ['long', 'short', 'narrow'],\n 'long'\n )\n setInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, 'style', style)\n const {dataLocale} = r\n const dataLocaleData = localeData[dataLocale]\n invariant(!!dataLocaleData, `Missing locale data for ${dataLocale}`)\n const dataLocaleTypes = dataLocaleData[type]\n const templates = dataLocaleTypes![style]!\n setInternalSlot(\n ListFormat.__INTERNAL_SLOT_MAP__,\n this,\n 'templatePair',\n templates.pair\n )\n setInternalSlot(\n ListFormat.__INTERNAL_SLOT_MAP__,\n this,\n 'templateStart',\n templates.start\n )\n setInternalSlot(\n ListFormat.__INTERNAL_SLOT_MAP__,\n this,\n 'templateMiddle',\n templates.middle\n )\n setInternalSlot(\n ListFormat.__INTERNAL_SLOT_MAP__,\n this,\n 'templateEnd',\n templates.end\n )\n }\n format(elements: Iterable<string>): string {\n validateInstance(this, 'format')\n let result = ''\n const parts = createPartsFromList(\n ListFormat.__INTERNAL_SLOT_MAP__,\n this,\n stringListFromIterable(elements)\n )\n if (!Array.isArray(parts)) {\n return parts.value\n }\n for (const p of parts) {\n result += p.value\n }\n return result\n }\n formatToParts(elements: Iterable<string>): Part[] {\n validateInstance(this, 'format')\n const parts = createPartsFromList(\n ListFormat.__INTERNAL_SLOT_MAP__,\n this,\n stringListFromIterable(elements)\n )\n if (!Array.isArray(parts)) {\n return [parts as Part]\n }\n const result: Part[] = []\n for (const part of parts) {\n result.push({...part} as Part)\n }\n return result\n }\n\n resolvedOptions(): ResolvedIntlListFormatOptions {\n validateInstance(this, 'resolvedOptions')\n return {\n locale: getInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, 'locale'),\n type: getInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, 'type')!,\n style: getInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, 'style')!,\n }\n }\n\n public static supportedLocalesOf(\n locales: string | string[],\n options?: Pick<IntlListFormatOptions, 'localeMatcher'>\n ): string[] {\n // test262/test/intl402/ListFormat/constructor/supportedLocalesOf/result-type.js\n return SupportedLocales(\n ListFormat.availableLocales,\n CanonicalizeLocaleList(locales),\n options\n )\n }\n\n public static __addLocaleData(...data: ListPatternLocaleData[]): void {\n for (const {data: d, locale} of data) {\n const minimizedLocale = new (Intl as any).Locale(locale)\n .minimize()\n .toString()\n ListFormat.localeData[locale] = ListFormat.localeData[minimizedLocale] = d\n ListFormat.availableLocales.add(minimizedLocale)\n ListFormat.availableLocales.add(locale)\n if (!ListFormat.__defaultLocale) {\n ListFormat.__defaultLocale = minimizedLocale\n }\n }\n }\n static localeData: Record<string, ListPatternFieldsData | undefined> = {}\n private static availableLocales = new Set<string>()\n private static __defaultLocale = ''\n private static getDefaultLocale() {\n return ListFormat.__defaultLocale\n }\n private static relevantExtensionKeys = []\n public static polyfilled = true\n private static readonly __INTERNAL_SLOT_MAP__ = new WeakMap<\n ListFormat,\n ListFormatInternal\n >()\n}\n\ntry {\n // IE11 does not have Symbol\n if (typeof Symbol !== 'undefined') {\n Object.defineProperty(ListFormat.prototype, Symbol.toStringTag, {\n value: 'Intl.ListFormat',\n writable: false,\n enumerable: false,\n configurable: true,\n })\n }\n\n // https://github.com/tc39/test262/blob/master/test/intl402/ListFormat/constructor/length.js\n Object.defineProperty(ListFormat.prototype.constructor, 'length', {\n value: 0,\n writable: false,\n enumerable: false,\n configurable: true,\n })\n // https://github.com/tc39/test262/blob/master/test/intl402/ListFormat/constructor/supportedLocalesOf/length.js\n Object.defineProperty(ListFormat.supportedLocalesOf, 'length', {\n value: 1,\n writable: false,\n enumerable: false,\n configurable: true,\n })\n} catch {\n // Meta fix so we're test262-compliant, not important\n}\n","import ListFormat from '#packages/intl-listformat/index.js'\n\nObject.defineProperty(Intl, 'ListFormat', {\n value: ListFormat,\n writable: true,\n enumerable: false,\n configurable: true,\n})\n\n// Drain any locale data that was buffered before polyfill loaded\nconst buf = (globalThis as Record<string, unknown>)\n .__FORMATJS_LISTFORMAT_DATA__ as\n | Parameters<(typeof ListFormat)['__addLocaleData']>[0][]\n | undefined\nif (buf) {\n for (const d of buf) ListFormat.__addLocaleData(d)\n delete (globalThis as Record<string, unknown>).__FORMATJS_LISTFORMAT_DATA__\n}\n"],"x_google_ignoreList":[4],"mappings":";;;;;;AAIA,SAAgB,uBAAuB,SAAS;AAE/C,QA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