summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /intl/icu_capi
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'intl/icu_capi')
-rw-r--r--intl/icu_capi/Cargo.toml271
-rw-r--r--intl/icu_capi/LICENSE44
-rw-r--r--intl/icu_capi/README.md30
-rw-r--r--intl/icu_capi/c/README.md17
-rw-r--r--intl/icu_capi/c/examples/fixeddecimal/.gitignore2
-rw-r--r--intl/icu_capi/c/examples/fixeddecimal/Makefile26
-rw-r--r--intl/icu_capi/c/examples/fixeddecimal/test.c98
-rw-r--r--intl/icu_capi/c/examples/fixeddecimal_tiny/.gitignore8
-rw-r--r--intl/icu_capi/c/examples/fixeddecimal_tiny/Makefile83
-rw-r--r--intl/icu_capi/c/examples/fixeddecimal_tiny/README.md8
-rw-r--r--intl/icu_capi/c/examples/fixeddecimal_tiny/test.c54
-rw-r--r--intl/icu_capi/c/examples/locale/.gitignore2
-rw-r--r--intl/icu_capi/c/examples/locale/Makefile26
-rw-r--r--intl/icu_capi/c/examples/locale/test.c267
-rw-r--r--intl/icu_capi/c/examples/pluralrules/.gitignore2
-rw-r--r--intl/icu_capi/c/examples/pluralrules/Makefile26
-rw-r--r--intl/icu_capi/c/examples/pluralrules/test.c70
-rw-r--r--intl/icu_capi/c/examples/segmenter_tiny/.gitignore8
-rw-r--r--intl/icu_capi/c/examples/segmenter_tiny/Makefile80
-rw-r--r--intl/icu_capi/c/examples/segmenter_tiny/README.md5
-rw-r--r--intl/icu_capi/c/examples/segmenter_tiny/test.c42
-rw-r--r--intl/icu_capi/c/include/CodePointRangeIterator.h30
-rw-r--r--intl/icu_capi/c/include/CodePointRangeIteratorResult.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XAnyCalendarKind.h55
-rw-r--r--intl/icu_capi/c/include/ICU4XBcp47ToIanaMapper.h34
-rw-r--r--intl/icu_capi/c/include/ICU4XBidi.h45
-rw-r--r--intl/icu_capi/c/include/ICU4XBidiDirection.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XBidiInfo.h36
-rw-r--r--intl/icu_capi/c/include/ICU4XBidiParagraph.h43
-rw-r--r--intl/icu_capi/c/include/ICU4XCalendar.h37
-rw-r--r--intl/icu_capi/c/include/ICU4XCanonicalCombiningClassMap.h35
-rw-r--r--intl/icu_capi/c/include/ICU4XCanonicalComposition.h33
-rw-r--r--intl/icu_capi/c/include/ICU4XCanonicalDecomposition.h34
-rw-r--r--intl/icu_capi/c/include/ICU4XCaseMapCloser.h36
-rw-r--r--intl/icu_capi/c/include/ICU4XCaseMapper.h57
-rw-r--r--intl/icu_capi/c/include/ICU4XCodePointMapData16.h43
-rw-r--r--intl/icu_capi/c/include/ICU4XCodePointMapData8.h61
-rw-r--r--intl/icu_capi/c/include/ICU4XCodePointSetBuilder.h64
-rw-r--r--intl/icu_capi/c/include/ICU4XCodePointSetData.h172
-rw-r--r--intl/icu_capi/c/include/ICU4XCollator.h40
-rw-r--r--intl/icu_capi/c/include/ICU4XCollatorAlternateHandling.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XCollatorBackwardSecondLevel.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XCollatorCaseFirst.h33
-rw-r--r--intl/icu_capi/c/include/ICU4XCollatorCaseLevel.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XCollatorMaxVariable.h34
-rw-r--r--intl/icu_capi/c/include/ICU4XCollatorNumeric.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XCollatorOptionsV1.h50
-rw-r--r--intl/icu_capi/c/include/ICU4XCollatorStrength.h35
-rw-r--r--intl/icu_capi/c/include/ICU4XComposingNormalizer.h38
-rw-r--r--intl/icu_capi/c/include/ICU4XCustomTimeZone.h84
-rw-r--r--intl/icu_capi/c/include/ICU4XDataProvider.h48
-rw-r--r--intl/icu_capi/c/include/ICU4XDataStruct.h30
-rw-r--r--intl/icu_capi/c/include/ICU4XDate.h66
-rw-r--r--intl/icu_capi/c/include/ICU4XDateFormatter.h46
-rw-r--r--intl/icu_capi/c/include/ICU4XDateLength.h33
-rw-r--r--intl/icu_capi/c/include/ICU4XDateTime.h82
-rw-r--r--intl/icu_capi/c/include/ICU4XDateTimeFormatter.h41
-rw-r--r--intl/icu_capi/c/include/ICU4XDecomposed.h31
-rw-r--r--intl/icu_capi/c/include/ICU4XDecomposingNormalizer.h38
-rw-r--r--intl/icu_capi/c/include/ICU4XDisplayNamesFallback.h31
-rw-r--r--intl/icu_capi/c/include/ICU4XDisplayNamesOptionsV1.h38
-rw-r--r--intl/icu_capi/c/include/ICU4XDisplayNamesStyle.h34
-rw-r--r--intl/icu_capi/c/include/ICU4XError.h84
-rw-r--r--intl/icu_capi/c/include/ICU4XFixedDecimal.h101
-rw-r--r--intl/icu_capi/c/include/ICU4XFixedDecimalFormatter.h40
-rw-r--r--intl/icu_capi/c/include/ICU4XFixedDecimalGroupingStrategy.h33
-rw-r--r--intl/icu_capi/c/include/ICU4XFixedDecimalSign.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XFixedDecimalSignDisplay.h34
-rw-r--r--intl/icu_capi/c/include/ICU4XGeneralCategoryNameToMaskMapper.h35
-rw-r--r--intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorLatin1.h29
-rw-r--r--intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorUtf16.h29
-rw-r--r--intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorUtf8.h29
-rw-r--r--intl/icu_capi/c/include/ICU4XGraphemeClusterSegmenter.h40
-rw-r--r--intl/icu_capi/c/include/ICU4XGregorianDateFormatter.h40
-rw-r--r--intl/icu_capi/c/include/ICU4XGregorianDateTimeFormatter.h38
-rw-r--r--intl/icu_capi/c/include/ICU4XGregorianZonedDateTimeFormatter.h42
-rw-r--r--intl/icu_capi/c/include/ICU4XIanaToBcp47Mapper.h31
-rw-r--r--intl/icu_capi/c/include/ICU4XIsoDate.h61
-rw-r--r--intl/icu_capi/c/include/ICU4XIsoDateTime.h79
-rw-r--r--intl/icu_capi/c/include/ICU4XIsoTimeZoneFormat.h33
-rw-r--r--intl/icu_capi/c/include/ICU4XIsoTimeZoneMinuteDisplay.h31
-rw-r--r--intl/icu_capi/c/include/ICU4XIsoTimeZoneOptions.h38
-rw-r--r--intl/icu_capi/c/include/ICU4XIsoTimeZoneSecondDisplay.h31
-rw-r--r--intl/icu_capi/c/include/ICU4XIsoWeekday.h36
-rw-r--r--intl/icu_capi/c/include/ICU4XLanguageDisplay.h31
-rw-r--r--intl/icu_capi/c/include/ICU4XLeadingAdjustment.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XLineBreakIteratorLatin1.h29
-rw-r--r--intl/icu_capi/c/include/ICU4XLineBreakIteratorUtf16.h29
-rw-r--r--intl/icu_capi/c/include/ICU4XLineBreakIteratorUtf8.h29
-rw-r--r--intl/icu_capi/c/include/ICU4XLineBreakOptionsV1.h36
-rw-r--r--intl/icu_capi/c/include/ICU4XLineBreakStrictness.h33
-rw-r--r--intl/icu_capi/c/include/ICU4XLineBreakWordOption.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XLineSegmenter.h51
-rw-r--r--intl/icu_capi/c/include/ICU4XList.h35
-rw-r--r--intl/icu_capi/c/include/ICU4XListFormatter.h41
-rw-r--r--intl/icu_capi/c/include/ICU4XListLength.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XLocale.h64
-rw-r--r--intl/icu_capi/c/include/ICU4XLocaleCanonicalizer.h37
-rw-r--r--intl/icu_capi/c/include/ICU4XLocaleDirection.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XLocaleDirectionality.h42
-rw-r--r--intl/icu_capi/c/include/ICU4XLocaleDisplayNamesFormatter.h36
-rw-r--r--intl/icu_capi/c/include/ICU4XLocaleExpander.h39
-rw-r--r--intl/icu_capi/c/include/ICU4XLocaleFallbackConfig.h36
-rw-r--r--intl/icu_capi/c/include/ICU4XLocaleFallbackIterator.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XLocaleFallbackPriority.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XLocaleFallbackSupplement.h31
-rw-r--r--intl/icu_capi/c/include/ICU4XLocaleFallbacker.h37
-rw-r--r--intl/icu_capi/c/include/ICU4XLocaleFallbackerWithConfig.h31
-rw-r--r--intl/icu_capi/c/include/ICU4XLogger.h31
-rw-r--r--intl/icu_capi/c/include/ICU4XMetazoneCalculator.h31
-rw-r--r--intl/icu_capi/c/include/ICU4XOrdering.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XPluralCategories.h35
-rw-r--r--intl/icu_capi/c/include/ICU4XPluralCategory.h37
-rw-r--r--intl/icu_capi/c/include/ICU4XPluralOperands.h30
-rw-r--r--intl/icu_capi/c/include/ICU4XPluralRules.h41
-rw-r--r--intl/icu_capi/c/include/ICU4XPropertyValueNameToEnumMapper.h51
-rw-r--r--intl/icu_capi/c/include/ICU4XRegionDisplayNames.h35
-rw-r--r--intl/icu_capi/c/include/ICU4XReorderedIndexMap.h33
-rw-r--r--intl/icu_capi/c/include/ICU4XRoundingIncrement.h33
-rw-r--r--intl/icu_capi/c/include/ICU4XScriptExtensionsSet.h34
-rw-r--r--intl/icu_capi/c/include/ICU4XScriptWithExtensions.h41
-rw-r--r--intl/icu_capi/c/include/ICU4XScriptWithExtensionsBorrowed.h37
-rw-r--r--intl/icu_capi/c/include/ICU4XSegmenterWordType.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XSentenceBreakIteratorLatin1.h29
-rw-r--r--intl/icu_capi/c/include/ICU4XSentenceBreakIteratorUtf16.h29
-rw-r--r--intl/icu_capi/c/include/ICU4XSentenceBreakIteratorUtf8.h29
-rw-r--r--intl/icu_capi/c/include/ICU4XSentenceSegmenter.h40
-rw-r--r--intl/icu_capi/c/include/ICU4XTime.h40
-rw-r--r--intl/icu_capi/c/include/ICU4XTimeFormatter.h43
-rw-r--r--intl/icu_capi/c/include/ICU4XTimeLength.h33
-rw-r--r--intl/icu_capi/c/include/ICU4XTimeZoneFormatter.h53
-rw-r--r--intl/icu_capi/c/include/ICU4XTitlecaseMapper.h36
-rw-r--r--intl/icu_capi/c/include/ICU4XTitlecaseOptionsV1.h36
-rw-r--r--intl/icu_capi/c/include/ICU4XTrailingCase.h31
-rw-r--r--intl/icu_capi/c/include/ICU4XTransformResult.h31
-rw-r--r--intl/icu_capi/c/include/ICU4XUnicodeSetData.h48
-rw-r--r--intl/icu_capi/c/include/ICU4XWeekCalculator.h39
-rw-r--r--intl/icu_capi/c/include/ICU4XWeekOf.h33
-rw-r--r--intl/icu_capi/c/include/ICU4XWeekRelativeUnit.h32
-rw-r--r--intl/icu_capi/c/include/ICU4XWordBreakIteratorLatin1.h34
-rw-r--r--intl/icu_capi/c/include/ICU4XWordBreakIteratorUtf16.h34
-rw-r--r--intl/icu_capi/c/include/ICU4XWordBreakIteratorUtf8.h34
-rw-r--r--intl/icu_capi/c/include/ICU4XWordSegmenter.h44
-rw-r--r--intl/icu_capi/c/include/ICU4XZonedDateTimeFormatter.h45
-rw-r--r--intl/icu_capi/c/include/diplomat_result_ICU4XAnyCalendarKind_void.h24
-rw-r--r--intl/icu_capi/c/include/diplomat_result_ICU4XPluralCategory_void.h24
-rw-r--r--intl/icu_capi/c/include/diplomat_result_ICU4XWeekOf_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_bool_ICU4XError.h25
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XBidi_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XCalendar_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XCaseMapper_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointSetData_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XCollator_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XDataProvider_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XDataStruct_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XDateFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XDateTime_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XDate_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XIsoDate_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XListFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleExpander_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XLocale_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XPluralOperands_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XPluralRules_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XTimeFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XTime_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/c/include/diplomat_result_int32_t_ICU4XError.h25
-rw-r--r--intl/icu_capi/c/include/diplomat_result_uint16_t_void.h23
-rw-r--r--intl/icu_capi/c/include/diplomat_result_void_ICU4XError.h24
-rw-r--r--intl/icu_capi/c/include/diplomat_result_void_void.h20
-rw-r--r--intl/icu_capi/c/include/diplomat_runtime.h70
-rw-r--r--intl/icu_capi/cpp/README.md17
-rw-r--r--intl/icu_capi/cpp/docs/.gitignore1
-rw-r--r--intl/icu_capi/cpp/docs/Makefile25
-rw-r--r--intl/icu_capi/cpp/docs/make.bat41
-rw-r--r--intl/icu_capi/cpp/docs/source/bidi_ffi.rst194
-rw-r--r--intl/icu_capi/cpp/docs/source/calendar_ffi.rst157
-rw-r--r--intl/icu_capi/cpp/docs/source/casemap_ffi.rst238
-rw-r--r--intl/icu_capi/cpp/docs/source/collator_ffi.rst147
-rw-r--r--intl/icu_capi/cpp/docs/source/collections_sets_ffi.rst143
-rw-r--r--intl/icu_capi/cpp/docs/source/common_ffi.rst13
-rw-r--r--intl/icu_capi/cpp/docs/source/conf.py60
-rw-r--r--intl/icu_capi/cpp/docs/source/data_struct_ffi.rst18
-rw-r--r--intl/icu_capi/cpp/docs/source/date_ffi.rst264
-rw-r--r--intl/icu_capi/cpp/docs/source/datetime_ffi.rst351
-rw-r--r--intl/icu_capi/cpp/docs/source/datetime_formatter_ffi.rst278
-rw-r--r--intl/icu_capi/cpp/docs/source/decimal_ffi.rst50
-rw-r--r--intl/icu_capi/cpp/docs/source/displaynames_ffi.rst107
-rw-r--r--intl/icu_capi/cpp/docs/source/errors_ffi.rst136
-rw-r--r--intl/icu_capi/cpp/docs/source/fallbacker_ffi.rst117
-rw-r--r--intl/icu_capi/cpp/docs/source/fixed_decimal_ffi.rst287
-rw-r--r--intl/icu_capi/cpp/docs/source/iana_bcp47_mapper_ffi.rst42
-rw-r--r--intl/icu_capi/cpp/docs/source/index.rst54
-rw-r--r--intl/icu_capi/cpp/docs/source/list_ffi.rst76
-rw-r--r--intl/icu_capi/cpp/docs/source/locale_directionality_ffi.rst47
-rw-r--r--intl/icu_capi/cpp/docs/source/locale_ffi.rst179
-rw-r--r--intl/icu_capi/cpp/docs/source/locid_transform_ffi.rst76
-rw-r--r--intl/icu_capi/cpp/docs/source/logging_ffi.rst21
-rw-r--r--intl/icu_capi/cpp/docs/source/metazone_calculator_ffi.rst16
-rw-r--r--intl/icu_capi/cpp/docs/source/normalizer_ffi.rst94
-rw-r--r--intl/icu_capi/cpp/docs/source/normalizer_properties_ffi.rst87
-rw-r--r--intl/icu_capi/cpp/docs/source/pluralrules_ffi.rst96
-rw-r--r--intl/icu_capi/cpp/docs/source/properties_iter_ffi.rst27
-rw-r--r--intl/icu_capi/cpp/docs/source/properties_maps_ffi.rst169
-rw-r--r--intl/icu_capi/cpp/docs/source/properties_names_ffi.rst102
-rw-r--r--intl/icu_capi/cpp/docs/source/properties_sets_ffi.rst384
-rw-r--r--intl/icu_capi/cpp/docs/source/properties_unisets_ffi.rst62
-rw-r--r--intl/icu_capi/cpp/docs/source/provider_ffi.rst84
-rw-r--r--intl/icu_capi/cpp/docs/source/script_ffi.rst111
-rw-r--r--intl/icu_capi/cpp/docs/source/segmenter_grapheme_ffi.rst79
-rw-r--r--intl/icu_capi/cpp/docs/source/segmenter_line_ffi.rst155
-rw-r--r--intl/icu_capi/cpp/docs/source/segmenter_sentence_ffi.rst79
-rw-r--r--intl/icu_capi/cpp/docs/source/segmenter_word_ffi.rst150
-rw-r--r--intl/icu_capi/cpp/docs/source/time_ffi.rst51
-rw-r--r--intl/icu_capi/cpp/docs/source/timezone_ffi.rst279
-rw-r--r--intl/icu_capi/cpp/docs/source/timezone_formatter_ffi.rst137
-rw-r--r--intl/icu_capi/cpp/docs/source/week_ffi.rst55
-rw-r--r--intl/icu_capi/cpp/docs/source/zoned_formatter_ffi.rst94
-rw-r--r--intl/icu_capi/cpp/examples/bidi/.gitignore2
-rw-r--r--intl/icu_capi/cpp/examples/bidi/Makefile28
-rw-r--r--intl/icu_capi/cpp/examples/bidi/test.cpp93
-rw-r--r--intl/icu_capi/cpp/examples/casemapping/.gitignore2
-rw-r--r--intl/icu_capi/cpp/examples/casemapping/Makefile28
-rw-r--r--intl/icu_capi/cpp/examples/casemapping/test.cpp109
-rw-r--r--intl/icu_capi/cpp/examples/collator/.gitignore2
-rw-r--r--intl/icu_capi/cpp/examples/collator/Makefile28
-rw-r--r--intl/icu_capi/cpp/examples/collator/test.cpp67
-rw-r--r--intl/icu_capi/cpp/examples/datetime/.gitignore2
-rw-r--r--intl/icu_capi/cpp/examples/datetime/Makefile28
-rw-r--r--intl/icu_capi/cpp/examples/datetime/test.cpp116
-rw-r--r--intl/icu_capi/cpp/examples/fixeddecimal/.gitignore2
-rw-r--r--intl/icu_capi/cpp/examples/fixeddecimal/Makefile28
-rw-r--r--intl/icu_capi/cpp/examples/fixeddecimal/test.cpp127
-rw-r--r--intl/icu_capi/cpp/examples/fixeddecimal_wasm/.gitignore9
-rw-r--r--intl/icu_capi/cpp/examples/fixeddecimal_wasm/Makefile53
-rw-r--r--intl/icu_capi/cpp/examples/fixeddecimal_wasm/README7
-rw-r--r--intl/icu_capi/cpp/examples/fixeddecimal_wasm/node-test.js6
-rw-r--r--intl/icu_capi/cpp/examples/fixeddecimal_wasm/package.json6
-rw-r--r--intl/icu_capi/cpp/examples/fixeddecimal_wasm/test.cpp70
-rw-r--r--intl/icu_capi/cpp/examples/locale/.gitignore2
-rw-r--r--intl/icu_capi/cpp/examples/locale/Makefile28
-rw-r--r--intl/icu_capi/cpp/examples/locale/test.cpp107
-rw-r--r--intl/icu_capi/cpp/examples/pluralrules/.gitignore1
-rw-r--r--intl/icu_capi/cpp/examples/pluralrules/Makefile28
-rw-r--r--intl/icu_capi/cpp/examples/pluralrules/test.cpp38
-rw-r--r--intl/icu_capi/cpp/examples/properties/.gitignore2
-rw-r--r--intl/icu_capi/cpp/examples/properties/Makefile28
-rw-r--r--intl/icu_capi/cpp/examples/properties/test.cpp251
-rw-r--r--intl/icu_capi/cpp/examples/segmenter/.gitignore2
-rw-r--r--intl/icu_capi/cpp/examples/segmenter/Makefile28
-rw-r--r--intl/icu_capi/cpp/examples/segmenter/test.cpp160
-rw-r--r--intl/icu_capi/cpp/include/CodePointRangeIterator.h30
-rw-r--r--intl/icu_capi/cpp/include/CodePointRangeIterator.hpp54
-rw-r--r--intl/icu_capi/cpp/include/CodePointRangeIteratorResult.h32
-rw-r--r--intl/icu_capi/cpp/include/CodePointRangeIteratorResult.hpp33
-rw-r--r--intl/icu_capi/cpp/include/ICU4XAnyCalendarKind.h55
-rw-r--r--intl/icu_capi/cpp/include/ICU4XAnyCalendarKind.hpp117
-rw-r--r--intl/icu_capi/cpp/include/ICU4XBcp47ToIanaMapper.h34
-rw-r--r--intl/icu_capi/cpp/include/ICU4XBcp47ToIanaMapper.hpp98
-rw-r--r--intl/icu_capi/cpp/include/ICU4XBidi.h45
-rw-r--r--intl/icu_capi/cpp/include/ICU4XBidi.hpp142
-rw-r--r--intl/icu_capi/cpp/include/ICU4XBidiDirection.h32
-rw-r--r--intl/icu_capi/cpp/include/ICU4XBidiDirection.hpp21
-rw-r--r--intl/icu_capi/cpp/include/ICU4XBidiInfo.h36
-rw-r--r--intl/icu_capi/cpp/include/ICU4XBidiInfo.hpp89
-rw-r--r--intl/icu_capi/cpp/include/ICU4XBidiParagraph.h43
-rw-r--r--intl/icu_capi/cpp/include/ICU4XBidiParagraph.hpp150
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCalendar.h37
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCalendar.hpp91
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCanonicalCombiningClassMap.h35
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCanonicalCombiningClassMap.hpp83
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCanonicalComposition.h33
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCanonicalComposition.hpp76
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCanonicalDecomposition.h34
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCanonicalDecomposition.hpp78
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCaseMapCloser.h36
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCaseMapCloser.hpp87
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCaseMapper.h57
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCaseMapper.hpp352
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCodePointMapData16.h43
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCodePointMapData16.hpp123
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCodePointMapData8.h61
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCodePointMapData8.hpp259
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCodePointSetBuilder.h64
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCodePointSetBuilder.hpp233
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCodePointSetData.h172
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCodePointSetData.hpp1109
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollator.h40
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollator.hpp105
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorAlternateHandling.h32
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorAlternateHandling.hpp25
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorBackwardSecondLevel.h32
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorBackwardSecondLevel.hpp25
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorCaseFirst.h33
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorCaseFirst.hpp26
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorCaseLevel.h32
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorCaseLevel.hpp25
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorMaxVariable.h34
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorMaxVariable.hpp27
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorNumeric.h32
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorNumeric.hpp25
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorOptionsV1.h50
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorOptionsV1.hpp38
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorStrength.h35
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCollatorStrength.hpp28
-rw-r--r--intl/icu_capi/cpp/include/ICU4XComposingNormalizer.h38
-rw-r--r--intl/icu_capi/cpp/include/ICU4XComposingNormalizer.hpp131
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCustomTimeZone.h84
-rw-r--r--intl/icu_capi/cpp/include/ICU4XCustomTimeZone.hpp547
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDataProvider.h48
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDataProvider.hpp196
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDataStruct.h30
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDataStruct.hpp63
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDate.h66
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDate.hpp303
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDateFormatter.h46
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDateFormatter.hpp231
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDateLength.h33
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDateLength.hpp26
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDateTime.h82
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDateTime.hpp373
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDateTimeFormatter.h41
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDateTimeFormatter.hpp150
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDecomposed.h31
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDecomposed.hpp30
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDecomposingNormalizer.h38
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDecomposingNormalizer.hpp131
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDisplayNamesFallback.h31
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDisplayNamesFallback.hpp24
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDisplayNamesOptionsV1.h38
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDisplayNamesOptionsV1.hpp43
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDisplayNamesStyle.h34
-rw-r--r--intl/icu_capi/cpp/include/ICU4XDisplayNamesStyle.hpp27
-rw-r--r--intl/icu_capi/cpp/include/ICU4XError.h84
-rw-r--r--intl/icu_capi/cpp/include/ICU4XError.hpp104
-rw-r--r--intl/icu_capi/cpp/include/ICU4XFixedDecimal.h101
-rw-r--r--intl/icu_capi/cpp/include/ICU4XFixedDecimal.hpp426
-rw-r--r--intl/icu_capi/cpp/include/ICU4XFixedDecimalFormatter.h40
-rw-r--r--intl/icu_capi/cpp/include/ICU4XFixedDecimalFormatter.hpp126
-rw-r--r--intl/icu_capi/cpp/include/ICU4XFixedDecimalGroupingStrategy.h33
-rw-r--r--intl/icu_capi/cpp/include/ICU4XFixedDecimalGroupingStrategy.hpp26
-rw-r--r--intl/icu_capi/cpp/include/ICU4XFixedDecimalSign.h32
-rw-r--r--intl/icu_capi/cpp/include/ICU4XFixedDecimalSign.hpp39
-rw-r--r--intl/icu_capi/cpp/include/ICU4XFixedDecimalSignDisplay.h34
-rw-r--r--intl/icu_capi/cpp/include/ICU4XFixedDecimalSignDisplay.hpp29
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGeneralCategoryNameToMaskMapper.h35
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGeneralCategoryNameToMaskMapper.hpp83
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorLatin1.h29
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorLatin1.hpp51
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf16.h29
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf16.hpp51
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf8.h29
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf8.hpp51
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGraphemeClusterSegmenter.h40
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGraphemeClusterSegmenter.hpp106
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGregorianDateFormatter.h40
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGregorianDateFormatter.hpp145
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGregorianDateTimeFormatter.h38
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGregorianDateTimeFormatter.hpp107
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGregorianZonedDateTimeFormatter.h42
-rw-r--r--intl/icu_capi/cpp/include/ICU4XGregorianZonedDateTimeFormatter.hpp134
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIanaToBcp47Mapper.h31
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIanaToBcp47Mapper.hpp65
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIsoDate.h61
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIsoDate.hpp209
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIsoDateTime.h79
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIsoDateTime.hpp296
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIsoTimeZoneFormat.h33
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIsoTimeZoneFormat.hpp26
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIsoTimeZoneMinuteDisplay.h31
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIsoTimeZoneMinuteDisplay.hpp24
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIsoTimeZoneOptions.h38
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIsoTimeZoneOptions.hpp26
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIsoTimeZoneSecondDisplay.h31
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIsoTimeZoneSecondDisplay.hpp24
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIsoWeekday.h36
-rw-r--r--intl/icu_capi/cpp/include/ICU4XIsoWeekday.hpp25
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLanguageDisplay.h31
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLanguageDisplay.hpp24
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLeadingAdjustment.h32
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLeadingAdjustment.hpp25
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.h29
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp53
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.h29
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp53
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf8.h29
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf8.hpp53
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLineBreakOptionsV1.h36
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLineBreakOptionsV1.hpp29
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLineBreakStrictness.h33
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLineBreakStrictness.hpp26
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLineBreakWordOption.h32
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLineBreakWordOption.hpp25
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLineSegmenter.h51
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLineSegmenter.hpp201
-rw-r--r--intl/icu_capi/cpp/include/ICU4XList.h35
-rw-r--r--intl/icu_capi/cpp/include/ICU4XList.hpp77
-rw-r--r--intl/icu_capi/cpp/include/ICU4XListFormatter.h41
-rw-r--r--intl/icu_capi/cpp/include/ICU4XListFormatter.hpp133
-rw-r--r--intl/icu_capi/cpp/include/ICU4XListLength.h32
-rw-r--r--intl/icu_capi/cpp/include/ICU4XListLength.hpp25
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocale.h64
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocale.hpp438
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleCanonicalizer.h37
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleCanonicalizer.hpp93
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleDirection.h32
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleDirection.hpp25
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleDirectionality.h42
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleDirectionality.hpp107
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleDisplayNamesFormatter.h36
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleDisplayNamesFormatter.hpp103
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleExpander.h39
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleExpander.hpp103
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleFallbackConfig.h36
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleFallbackConfig.hpp43
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.h32
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp64
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleFallbackPriority.h32
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleFallbackPriority.hpp27
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleFallbackSupplement.h31
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleFallbackSupplement.hpp26
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.h37
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp97
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.h31
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp60
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLogger.h31
-rw-r--r--intl/icu_capi/cpp/include/ICU4XLogger.hpp60
-rw-r--r--intl/icu_capi/cpp/include/ICU4XMetazoneCalculator.h31
-rw-r--r--intl/icu_capi/cpp/include/ICU4XMetazoneCalculator.hpp65
-rw-r--r--intl/icu_capi/cpp/include/ICU4XOrdering.h32
-rw-r--r--intl/icu_capi/cpp/include/ICU4XOrdering.hpp25
-rw-r--r--intl/icu_capi/cpp/include/ICU4XPluralCategories.h35
-rw-r--r--intl/icu_capi/cpp/include/ICU4XPluralCategories.hpp30
-rw-r--r--intl/icu_capi/cpp/include/ICU4XPluralCategory.h37
-rw-r--r--intl/icu_capi/cpp/include/ICU4XPluralCategory.hpp30
-rw-r--r--intl/icu_capi/cpp/include/ICU4XPluralOperands.h30
-rw-r--r--intl/icu_capi/cpp/include/ICU4XPluralOperands.hpp61
-rw-r--r--intl/icu_capi/cpp/include/ICU4XPluralRules.h41
-rw-r--r--intl/icu_capi/cpp/include/ICU4XPluralRules.hpp108
-rw-r--r--intl/icu_capi/cpp/include/ICU4XPropertyValueNameToEnumMapper.h51
-rw-r--r--intl/icu_capi/cpp/include/ICU4XPropertyValueNameToEnumMapper.hpp207
-rw-r--r--intl/icu_capi/cpp/include/ICU4XRegionDisplayNames.h35
-rw-r--r--intl/icu_capi/cpp/include/ICU4XRegionDisplayNames.hpp104
-rw-r--r--intl/icu_capi/cpp/include/ICU4XReorderedIndexMap.h33
-rw-r--r--intl/icu_capi/cpp/include/ICU4XReorderedIndexMap.hpp74
-rw-r--r--intl/icu_capi/cpp/include/ICU4XRoundingIncrement.h33
-rw-r--r--intl/icu_capi/cpp/include/ICU4XRoundingIncrement.hpp28
-rw-r--r--intl/icu_capi/cpp/include/ICU4XScriptExtensionsSet.h34
-rw-r--r--intl/icu_capi/cpp/include/ICU4XScriptExtensionsSet.hpp79
-rw-r--r--intl/icu_capi/cpp/include/ICU4XScriptWithExtensions.h41
-rw-r--r--intl/icu_capi/cpp/include/ICU4XScriptWithExtensions.hpp109
-rw-r--r--intl/icu_capi/cpp/include/ICU4XScriptWithExtensionsBorrowed.h37
-rw-r--r--intl/icu_capi/cpp/include/ICU4XScriptWithExtensionsBorrowed.hpp89
-rw-r--r--intl/icu_capi/cpp/include/ICU4XSegmenterWordType.h32
-rw-r--r--intl/icu_capi/cpp/include/ICU4XSegmenterWordType.hpp25
-rw-r--r--intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorLatin1.h29
-rw-r--r--intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorLatin1.hpp51
-rw-r--r--intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf16.h29
-rw-r--r--intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf16.hpp51
-rw-r--r--intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf8.h29
-rw-r--r--intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf8.hpp51
-rw-r--r--intl/icu_capi/cpp/include/ICU4XSentenceSegmenter.h40
-rw-r--r--intl/icu_capi/cpp/include/ICU4XSentenceSegmenter.hpp105
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTime.h40
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTime.hpp118
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTimeFormatter.h43
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTimeFormatter.hpp183
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTimeLength.h33
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTimeLength.hpp26
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTimeZoneFormatter.h53
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTimeZoneFormatter.hpp256
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTitlecaseMapper.h36
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTitlecaseMapper.hpp108
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTitlecaseOptionsV1.h36
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTitlecaseOptionsV1.hpp38
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTrailingCase.h31
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTrailingCase.hpp24
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTransformResult.h31
-rw-r--r--intl/icu_capi/cpp/include/ICU4XTransformResult.hpp26
-rw-r--r--intl/icu_capi/cpp/include/ICU4XUnicodeSetData.h48
-rw-r--r--intl/icu_capi/cpp/include/ICU4XUnicodeSetData.hpp170
-rw-r--r--intl/icu_capi/cpp/include/ICU4XWeekCalculator.h39
-rw-r--r--intl/icu_capi/cpp/include/ICU4XWeekCalculator.hpp95
-rw-r--r--intl/icu_capi/cpp/include/ICU4XWeekOf.h33
-rw-r--r--intl/icu_capi/cpp/include/ICU4XWeekOf.hpp27
-rw-r--r--intl/icu_capi/cpp/include/ICU4XWeekRelativeUnit.h32
-rw-r--r--intl/icu_capi/cpp/include/ICU4XWeekRelativeUnit.hpp25
-rw-r--r--intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.h34
-rw-r--r--intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp72
-rw-r--r--intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.h34
-rw-r--r--intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp72
-rw-r--r--intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.h34
-rw-r--r--intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp72
-rw-r--r--intl/icu_capi/cpp/include/ICU4XWordSegmenter.h44
-rw-r--r--intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp148
-rw-r--r--intl/icu_capi/cpp/include/ICU4XZonedDateTimeFormatter.h45
-rw-r--r--intl/icu_capi/cpp/include/ICU4XZonedDateTimeFormatter.hpp173
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_ICU4XAnyCalendarKind_void.h24
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_ICU4XPluralCategory_void.h24
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_ICU4XWeekOf_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_bool_ICU4XError.h25
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XBidi_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCalendar_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCaseMapper_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCodePointSetData_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCollator_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDataProvider_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDataStruct_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDateFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDateTime_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDate_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XIsoDate_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XListFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleExpander_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocale_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XPluralOperands_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XPluralRules_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTimeFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTime_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError.h26
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_int32_t_ICU4XError.h25
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_uint16_t_void.h23
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_void_ICU4XError.h24
-rw-r--r--intl/icu_capi/cpp/include/diplomat_result_void_void.h20
-rw-r--r--intl/icu_capi/cpp/include/diplomat_runtime.h70
-rw-r--r--intl/icu_capi/cpp/include/diplomat_runtime.hpp175
-rw-r--r--intl/icu_capi/dart/README.md17
-rw-r--r--intl/icu_capi/js/README.md17
-rw-r--r--intl/icu_capi/js/examples/tinywasm/.gitignore1
-rwxr-xr-xintl/icu_capi/js/examples/tinywasm/Makefile42
-rw-r--r--intl/icu_capi/js/examples/tinywasm/README.md1
-rw-r--r--intl/icu_capi/js/examples/tinywasm/delete_fetch.mjs8
-rw-r--r--intl/icu_capi/js/examples/tinywasm/diplomat.config.js7
-rwxr-xr-xintl/icu_capi/js/examples/tinywasm/ld.py39
-rw-r--r--intl/icu_capi/js/examples/tinywasm/package.json4
-rw-r--r--intl/icu_capi/js/examples/tinywasm/tiny.mjs24
-rw-r--r--intl/icu_capi/js/examples/wasm-demo/.gitignore1
-rw-r--r--intl/icu_capi/js/examples/wasm-demo/cors-config-file.json8
-rw-r--r--intl/icu_capi/js/examples/wasm-demo/index.html310
-rw-r--r--intl/icu_capi/js/examples/wasm-demo/index.js3
-rw-r--r--intl/icu_capi/js/examples/wasm-demo/package-lock.json7643
-rw-r--r--intl/icu_capi/js/examples/wasm-demo/package.json34
-rw-r--r--intl/icu_capi/js/examples/wasm-demo/src/scss/styles.scss2
-rw-r--r--intl/icu_capi/js/examples/wasm-demo/src/ts/app.ts16
-rw-r--r--intl/icu_capi/js/examples/wasm-demo/src/ts/date-time.ts184
-rw-r--r--intl/icu_capi/js/examples/wasm-demo/src/ts/fixed-decimal.ts95
-rw-r--r--intl/icu_capi/js/examples/wasm-demo/src/ts/index.ts31
-rw-r--r--intl/icu_capi/js/examples/wasm-demo/src/ts/segmenter.ts129
-rw-r--r--intl/icu_capi/js/examples/wasm-demo/tsconfig.json9
-rw-r--r--intl/icu_capi/js/examples/wasm-demo/webpack.config.js69
-rw-r--r--intl/icu_capi/js/package/Makefile24
-rw-r--r--intl/icu_capi/js/package/bench/all.mjs2
-rw-r--r--intl/icu_capi/js/package/bench/fixed-decimal-format.mjs28
-rw-r--r--intl/icu_capi/js/package/bench/fixed-decimal.mjs34
-rw-r--r--intl/icu_capi/js/package/diplomat.config.js7
-rw-r--r--intl/icu_capi/js/package/docs/.gitignore1
-rw-r--r--intl/icu_capi/js/package/docs/Makefile20
-rw-r--r--intl/icu_capi/js/package/docs/make.bat35
-rw-r--r--intl/icu_capi/js/package/docs/source/bidi_ffi.rst177
-rw-r--r--intl/icu_capi/js/package/docs/source/calendar_ffi.rst60
-rw-r--r--intl/icu_capi/js/package/docs/source/casemap_ffi.rst182
-rw-r--r--intl/icu_capi/js/package/docs/source/collator_ffi.rst97
-rw-r--r--intl/icu_capi/js/package/docs/source/collections_sets_ffi.rst143
-rw-r--r--intl/icu_capi/js/package/docs/source/common_ffi.rst7
-rw-r--r--intl/icu_capi/js/package/docs/source/conf.py60
-rw-r--r--intl/icu_capi/js/package/docs/source/data_struct_ffi.rst20
-rw-r--r--intl/icu_capi/js/package/docs/source/date_ffi.rst234
-rw-r--r--intl/icu_capi/js/package/docs/source/datetime_ffi.rst337
-rw-r--r--intl/icu_capi/js/package/docs/source/datetime_formatter_ffi.rst172
-rw-r--r--intl/icu_capi/js/package/docs/source/decimal_ffi.rst35
-rw-r--r--intl/icu_capi/js/package/docs/source/displaynames_ffi.rst75
-rw-r--r--intl/icu_capi/js/package/docs/source/errors_ffi.rst11
-rw-r--r--intl/icu_capi/js/package/docs/source/fallbacker_ffi.rst103
-rw-r--r--intl/icu_capi/js/package/docs/source/fixed_decimal_ffi.rst247
-rw-r--r--intl/icu_capi/js/package/docs/source/iana_bcp47_mapper_ffi.rst35
-rw-r--r--intl/icu_capi/js/package/docs/source/index.rst54
-rw-r--r--intl/icu_capi/js/package/docs/source/list_ffi.rst65
-rw-r--r--intl/icu_capi/js/package/docs/source/locale_directionality_ffi.rst41
-rw-r--r--intl/icu_capi/js/package/docs/source/locale_ffi.rst128
-rw-r--r--intl/icu_capi/js/package/docs/source/locid_transform_ffi.rst72
-rw-r--r--intl/icu_capi/js/package/docs/source/logging_ffi.rst21
-rw-r--r--intl/icu_capi/js/package/docs/source/metazone_calculator_ffi.rst16
-rw-r--r--intl/icu_capi/js/package/docs/source/normalizer_ffi.rst76
-rw-r--r--intl/icu_capi/js/package/docs/source/normalizer_properties_ffi.rst87
-rw-r--r--intl/icu_capi/js/package/docs/source/pluralrules_ffi.rst84
-rw-r--r--intl/icu_capi/js/package/docs/source/properties_iter_ffi.rst27
-rw-r--r--intl/icu_capi/js/package/docs/source/properties_maps_ffi.rst159
-rw-r--r--intl/icu_capi/js/package/docs/source/properties_names_ffi.rst102
-rw-r--r--intl/icu_capi/js/package/docs/source/properties_sets_ffi.rst380
-rw-r--r--intl/icu_capi/js/package/docs/source/properties_unisets_ffi.rst62
-rw-r--r--intl/icu_capi/js/package/docs/source/provider_ffi.rst86
-rw-r--r--intl/icu_capi/js/package/docs/source/script_ffi.rst105
-rw-r--r--intl/icu_capi/js/package/docs/source/segmenter_grapheme_ffi.rst77
-rw-r--r--intl/icu_capi/js/package/docs/source/segmenter_line_ffi.rst139
-rw-r--r--intl/icu_capi/js/package/docs/source/segmenter_sentence_ffi.rst77
-rw-r--r--intl/icu_capi/js/package/docs/source/segmenter_word_ffi.rst142
-rw-r--r--intl/icu_capi/js/package/docs/source/time_ffi.rst51
-rw-r--r--intl/icu_capi/js/package/docs/source/timezone_ffi.rst246
-rw-r--r--intl/icu_capi/js/package/docs/source/timezone_formatter_ffi.rst112
-rw-r--r--intl/icu_capi/js/package/docs/source/week_ffi.rst49
-rw-r--r--intl/icu_capi/js/package/docs/source/zoned_formatter_ffi.rst73
-rw-r--r--intl/icu_capi/js/package/index.js1
-rw-r--r--intl/icu_capi/js/package/lib/CodePointRangeIterator.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/CodePointRangeIterator.js28
-rw-r--r--intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.js10
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.d.ts102
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.js66
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.d.ts28
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.js57
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidi.d.ts82
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidi.js65
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidiDirection.d.ts14
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidiDirection.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidiInfo.d.ts37
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidiInfo.js37
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidiParagraph.d.ts67
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidiParagraph.js75
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCalendar.d.ts38
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCalendar.js57
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.d.ts38
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.js43
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.d.ts32
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.js39
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.d.ts33
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.js46
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.d.ts39
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.js46
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCaseMapper.d.ts134
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCaseMapper.js173
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.d.ts66
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.js57
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.d.ts137
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.js184
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.d.ts163
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.js90
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointSetData.d.ts523
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointSetData.js1177
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollator.d.ts50
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollator.js77
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.d.ts19
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.js23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.d.ts22
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.js26
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.d.ts21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorStrength.d.ts25
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorStrength.js29
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.d.ts49
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.js81
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.d.ts293
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.js347
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDataProvider.d.ts100
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDataProvider.js138
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDataStruct.d.ts23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDataStruct.js50
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDate.d.ts156
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDate.js161
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateFormatter.d.ts67
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateFormatter.js112
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateLength.d.ts19
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateLength.js23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateTime.d.ts212
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateTime.js191
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.d.ts46
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.js75
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDecomposed.d.ts12
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDecomposed.js9
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.d.ts49
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.js81
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.js17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.js13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.d.ts22
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.js26
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XError.d.ts186
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XError.js176
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimal.d.ts272
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimal.js235
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.d.ts43
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.js72
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.d.ts19
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.js23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.d.ts24
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.d.ts24
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.js26
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.d.ts38
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.js49
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.d.ts48
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.js53
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.d.ts43
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.js74
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.d.ts34
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.js56
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.d.ts49
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.js79
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.d.ts21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.js35
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoDate.d.ts131
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoDate.js104
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoDateTime.d.ts199
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoDateTime.js138
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.d.ts19
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.js23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.js17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.d.ts11
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.js13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.js17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoWeekday.d.ts26
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoWeekday.js32
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.js17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.d.ts18
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.d.ts18
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.d.ts18
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.d.ts12
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.js12
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.d.ts19
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.js23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineSegmenter.d.ts94
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineSegmenter.js149
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XList.d.ts34
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XList.js35
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XListFormatter.d.ts47
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XListFormatter.js89
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XListLength.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XListLength.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocale.d.ts159
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocale.js268
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.d.ts40
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.js57
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleDirection.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleDirection.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.d.ts49
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.js65
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.d.ts30
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.js60
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleExpander.d.ts48
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleExpander.js61
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.d.ts14
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.js15
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.d.ts26
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.js26
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.d.ts18
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.d.ts15
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.js17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.d.ts40
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.js65
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.d.ts21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.js22
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLogger.d.ts23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLogger.js25
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.d.ts21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.js35
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XOrdering.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XOrdering.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralCategories.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralCategories.js13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralCategory.d.ts28
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralCategory.js29
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralOperands.d.ts20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralOperands.js38
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralRules.d.ts50
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralRules.js68
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.d.ts98
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.js185
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.d.ts29
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.js57
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.d.ts30
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.js35
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.d.ts21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.js23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.d.ts36
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.js42
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.d.ts54
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.js53
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.d.ts44
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.js35
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.d.ts48
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.js53
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTime.d.ts62
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTime.js68
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTimeFormatter.d.ts53
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTimeFormatter.js93
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTimeLength.d.ts19
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTimeLength.js23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.d.ts115
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.js199
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.d.ts32
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.js61
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.d.ts17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTrailingCase.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTrailingCase.js17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTransformResult.d.ts15
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTransformResult.js17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.d.ts82
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.js135
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWeekCalculator.d.ts46
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWeekCalculator.js48
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWeekOf.d.ts11
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWeekOf.js10
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.d.ts33
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.js30
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.d.ts33
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.js30
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.d.ts33
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.js30
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordSegmenter.d.ts70
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordSegmenter.js87
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.d.ts59
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.js98
-rw-r--r--intl/icu_capi/js/package/lib/diplomat-runtime.d.ts20
-rw-r--r--intl/icu_capi/js/package/lib/diplomat-runtime.js121
-rw-r--r--intl/icu_capi/js/package/lib/diplomat-wasm.mjs44
-rw-r--r--intl/icu_capi/js/package/lib/index.d.ts124
-rw-r--r--intl/icu_capi/js/package/lib/index.js124
-rw-r--r--intl/icu_capi/js/package/package-lock.json2948
-rw-r--r--intl/icu_capi/js/package/package.json39
-rw-r--r--intl/icu_capi/js/package/test/data-providers.mjs19
-rw-r--r--intl/icu_capi/js/package/test/fixed-decimal-format.mjs32
-rw-r--r--intl/icu_capi/js/package/test/fixed-decimal.mjs27
-rw-r--r--intl/icu_capi/src/bidi.rs267
-rw-r--r--intl/icu_capi/src/calendar.rs148
-rw-r--r--intl/icu_capi/src/casemap.rs336
-rw-r--r--intl/icu_capi/src/collator.rs237
-rw-r--r--intl/icu_capi/src/collections_sets.rs223
-rw-r--r--intl/icu_capi/src/common.rs16
-rw-r--r--intl/icu_capi/src/data_struct.rs90
-rw-r--r--intl/icu_capi/src/date.rs300
-rw-r--r--intl/icu_capi/src/datetime.rs415
-rw-r--r--intl/icu_capi/src/datetime_formatter.rs358
-rw-r--r--intl/icu_capi/src/decimal.rs109
-rw-r--r--intl/icu_capi/src/displaynames.rs156
-rw-r--r--intl/icu_capi/src/errors.rs407
-rw-r--r--intl/icu_capi/src/fallbacker.rs195
-rw-r--r--intl/icu_capi/src/fixed_decimal.rs341
-rw-r--r--intl/icu_capi/src/iana_bcp47_mapper.rs82
-rw-r--r--intl/icu_capi/src/lib.rs145
-rw-r--r--intl/icu_capi/src/list.rs125
-rw-r--r--intl/icu_capi/src/locale.rs212
-rw-r--r--intl/icu_capi/src/locale_directionality.rs101
-rw-r--r--intl/icu_capi/src/locid_transform.rs115
-rw-r--r--intl/icu_capi/src/logging.rs36
-rw-r--r--intl/icu_capi/src/metazone_calculator.rs34
-rw-r--r--intl/icu_capi/src/normalizer.rs152
-rw-r--r--intl/icu_capi/src/normalizer_properties.rs144
-rw-r--r--intl/icu_capi/src/pluralrules.rs150
-rw-r--r--intl/icu_capi/src/properties_iter.rs48
-rw-r--r--intl/icu_capi/src/properties_maps.rs311
-rw-r--r--intl/icu_capi/src/properties_names.rs259
-rw-r--r--intl/icu_capi/src/properties_sets.rs887
-rw-r--r--intl/icu_capi/src/properties_unisets.rs149
-rw-r--r--intl/icu_capi/src/provider.rs344
-rw-r--r--intl/icu_capi/src/script.rs156
-rw-r--r--intl/icu_capi/src/segmenter_grapheme.rs154
-rw-r--r--intl/icu_capi/src/segmenter_line.rs271
-rw-r--r--intl/icu_capi/src/segmenter_sentence.rs141
-rw-r--r--intl/icu_capi/src/segmenter_word.rs213
-rw-r--r--intl/icu_capi/src/time.rs68
-rw-r--r--intl/icu_capi/src/timezone.rs328
-rw-r--r--intl/icu_capi/src/timezone_formatter.rs298
-rw-r--r--intl/icu_capi/src/week.rs93
-rw-r--r--intl/icu_capi/src/zoned_formatter.rs198
-rw-r--r--intl/icu_capi/tests/missing_apis.txt33
974 files changed, 74420 insertions, 0 deletions
diff --git a/intl/icu_capi/Cargo.toml b/intl/icu_capi/Cargo.toml
new file mode 100644
index 0000000000..fc782311bc
--- /dev/null
+++ b/intl/icu_capi/Cargo.toml
@@ -0,0 +1,271 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g., crates.io) dependencies.
+#
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
+
+[package]
+edition = "2021"
+rust-version = "1.67"
+name = "icu_capi"
+version = "1.4.0"
+authors = ["The ICU4X Project Developers"]
+include = [
+ "js/**/*",
+ "c/**/*",
+ "cpp/**/*",
+ "src/**/*",
+ "tests/**/*",
+ "Cargo.toml",
+ "LICENSE",
+ "README.md",
+]
+description = "C interface to ICU4X"
+homepage = "https://icu4x.unicode.org"
+readme = "README.md"
+categories = ["internationalization"]
+license-file = "LICENSE"
+repository = "https://github.com/unicode-org/icu4x"
+
+[package.metadata.cargo-all-features]
+denylist = [
+ "bench",
+ "cpp_default",
+ "wasm_default",
+ "provider_test",
+]
+max_combination_size = 2
+
+[package.metadata.docs.rs]
+all-features = true
+
+[dependencies.diplomat]
+version = "0.7"
+
+[dependencies.diplomat-runtime]
+version = "0.7"
+
+[dependencies.fixed_decimal]
+version = "0.5.5"
+features = ["ryu"]
+optional = true
+default-features = false
+
+[dependencies.icu_calendar]
+version = "~1.4.0"
+optional = true
+default-features = false
+
+[dependencies.icu_casemap]
+version = "~1.4.0"
+optional = true
+default-features = false
+
+[dependencies.icu_collator]
+version = "~1.4.0"
+optional = true
+default-features = false
+
+[dependencies.icu_collections]
+version = "~1.4.0"
+optional = true
+default-features = false
+
+[dependencies.icu_datetime]
+version = "~1.4.0"
+optional = true
+default-features = false
+
+[dependencies.icu_decimal]
+version = "~1.4.0"
+optional = true
+default-features = false
+
+[dependencies.icu_displaynames]
+version = "0.11.2"
+optional = true
+default-features = false
+
+[dependencies.icu_list]
+version = "~1.4.0"
+optional = true
+default-features = false
+
+[dependencies.icu_locid]
+version = "~1.4.0"
+default-features = false
+
+[dependencies.icu_locid_transform]
+version = "~1.4.0"
+optional = true
+default-features = false
+
+[dependencies.icu_normalizer]
+version = "~1.4.0"
+optional = true
+default-features = false
+
+[dependencies.icu_plurals]
+version = "~1.4.0"
+optional = true
+default-features = false
+
+[dependencies.icu_properties]
+version = "~1.4.0"
+features = ["bidi"]
+optional = true
+default-features = false
+
+[dependencies.icu_provider]
+version = "~1.4.0"
+default-features = false
+
+[dependencies.icu_provider_adapters]
+version = "~1.4.0"
+default-features = false
+
+[dependencies.icu_provider_blob]
+version = "~1.4.0"
+optional = true
+default-features = false
+
+[dependencies.icu_segmenter]
+version = "~1.4.0"
+features = ["auto"]
+optional = true
+default-features = false
+
+[dependencies.icu_timezone]
+version = "~1.4.0"
+optional = true
+default-features = false
+
+[dependencies.log]
+version = "0.4"
+optional = true
+
+[dependencies.serde]
+version = "1.0"
+optional = true
+default-features = false
+
+[dependencies.tinystr]
+version = "0.7.4"
+default-features = false
+
+[dependencies.unicode-bidi]
+version = "0.3.13"
+optional = true
+default-features = false
+
+[dependencies.writeable]
+version = "0.5.4"
+default-features = false
+
+[features]
+any_provider = []
+buffer_provider = [
+ "dep:icu_provider_blob",
+ "dep:serde",
+ "icu_calendar?/serde",
+ "icu_casemap?/serde",
+ "icu_collator?/serde",
+ "icu_datetime?/serde",
+ "icu_decimal?/serde",
+ "icu_displaynames?/serde",
+ "icu_list?/serde",
+ "icu_locid_transform?/serde",
+ "icu_locid/serde",
+ "icu_normalizer?/serde",
+ "icu_plurals?/serde",
+ "icu_properties?/serde",
+ "icu_provider/serde",
+ "icu_provider_adapters/serde",
+ "icu_segmenter?/serde",
+ "icu_timezone?/serde",
+]
+compiled_data = [
+ "icu_segmenter?/compiled_data",
+]
+cpp_default = ["logging"]
+default = [
+ "compiled_data",
+ "default_components",
+ "logging",
+ "simple_logger",
+]
+default_components = [
+ "icu_calendar",
+ "icu_casemap",
+ "icu_collator",
+ "icu_datetime",
+ "icu_decimal",
+ "icu_list",
+ "icu_locid_transform",
+ "icu_normalizer",
+ "icu_plurals",
+ "icu_properties",
+ "icu_segmenter",
+ "icu_timezone",
+]
+icu_calendar = ["dep:icu_calendar"]
+icu_casemap = ["dep:icu_casemap"]
+icu_collator = ["dep:icu_collator"]
+icu_datetime = [
+ "dep:icu_datetime",
+ "dep:icu_calendar",
+ "dep:icu_timezone",
+ "dep:icu_decimal",
+ "dep:icu_plurals",
+]
+icu_decimal = [
+ "dep:icu_decimal",
+ "dep:fixed_decimal",
+]
+icu_displaynames = ["dep:icu_displaynames"]
+icu_list = ["dep:icu_list"]
+icu_locid_transform = ["dep:icu_locid_transform"]
+icu_normalizer = ["dep:icu_normalizer"]
+icu_plurals = [
+ "dep:icu_plurals",
+ "dep:fixed_decimal",
+]
+icu_properties = [
+ "dep:icu_properties",
+ "dep:icu_collections",
+ "dep:unicode-bidi",
+]
+icu_segmenter = ["dep:icu_segmenter"]
+icu_timezone = [
+ "dep:icu_timezone",
+ "dep:icu_calendar",
+]
+logging = [
+ "icu_provider/logging",
+ "dep:log",
+ "diplomat-runtime/log",
+]
+provider_fs = [
+ "dep:icu_provider_fs",
+ "buffer_provider",
+]
+provider_test = ["compiled_data"]
+simple_logger = [
+ "dep:simple_logger",
+ "logging",
+]
+wasm_default = ["logging"]
+
+[target."cfg(not(any(target_arch = \"wasm32\", target_os = \"none\")))".dependencies.icu_provider_fs]
+version = "~1.4.0"
+optional = true
+default-features = false
+
+[target."cfg(not(target_arch = \"wasm32\"))".dependencies.simple_logger]
+version = "4.1.0"
+optional = true
diff --git a/intl/icu_capi/LICENSE b/intl/icu_capi/LICENSE
new file mode 100644
index 0000000000..9845aa5f48
--- /dev/null
+++ b/intl/icu_capi/LICENSE
@@ -0,0 +1,44 @@
+UNICODE LICENSE V3
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright © 2020-2023 Unicode, Inc.
+
+NOTICE TO USER: Carefully read the following legal agreement. BY
+DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
+SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
+TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
+DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of data files and any associated documentation (the "Data Files") or
+software and any associated documentation (the "Software") to deal in the
+Data Files or Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, and/or sell
+copies of the Data Files or Software, and to permit persons to whom the
+Data Files or Software are furnished to do so, provided that either (a)
+this copyright and permission notice appear with all copies of the Data
+Files or Software, or (b) this copyright and permission notice appear in
+associated Documentation.
+
+THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+THIRD PARTY RIGHTS.
+
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
+BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
+FILES OR SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall
+not be used in advertising or otherwise to promote the sale, use or other
+dealings in these Data Files or Software without prior written
+authorization of the copyright holder.
+
+—
+
+Portions of ICU4X may have been adapted from ICU4C and/or ICU4J.
+ICU 1.8.1 to ICU 57.1 © 1995-2016 International Business Machines Corporation and others.
diff --git a/intl/icu_capi/README.md b/intl/icu_capi/README.md
new file mode 100644
index 0000000000..94b5d3a0b4
--- /dev/null
+++ b/intl/icu_capi/README.md
@@ -0,0 +1,30 @@
+# icu_capi [![crates.io](https://img.shields.io/crates/v/icu_capi)](https://crates.io/crates/icu_capi)
+
+<!-- cargo-rdme start -->
+
+This crate contains the source of truth for the [Diplomat](https://github.com/rust-diplomat/diplomat)-generated
+FFI bindings. This generates the C, C++, JavaScript, and TypeScript bindings. This crate also contains the `extern "C"`
+FFI for ICU4X.
+
+While the types in this crate are public, APIs from this crate are *not intended to be used from Rust*
+and as such this crate may unpredictably change its Rust API across compatible semver versions. The `extern "C"` APIs exposed
+by this crate, while not directly documented, are stable within the same major semver version, as are the bindings exposed under
+the `cpp/` and `js/` folders.
+
+This crate may still be explored for documentation on docs.rs, and there are generated language-specific docs available as well.
+C++ has sphinx docs in `cpp/docs/`, and the header files also contain documentation comments. The JS version has sphinx docs under
+`js/docs`, and the TypeScript sources in `js/include` are compatible with `tsdoc`.
+
+This crate is `no_std` and will not typically build as a staticlib on its own. If you wish to link to it you should prefer
+using `icu_capi_staticlib`, or for more esoteric platforms you may write a shim crate depending on this crate that hooks in
+an allocator and panic hook.
+
+More information on using ICU4X from C++ can be found in [our tutorial].
+
+[our tutorial]: https://github.com/unicode-org/icu4x/blob/main/docs/tutorials/cpp.md
+
+<!-- cargo-rdme end -->
+
+## More Information
+
+For more information on development, authorship, contributing etc. please visit [`ICU4X home page`](https://github.com/unicode-org/icu4x).
diff --git a/intl/icu_capi/c/README.md b/intl/icu_capi/c/README.md
new file mode 100644
index 0000000000..3b8ccb025c
--- /dev/null
+++ b/intl/icu_capi/c/README.md
@@ -0,0 +1,17 @@
+# C FFI for ICU4X
+
+This folder contains the C FFI for ICU4X. To re-generate the bindings run:
+
+```sh
+cargo make diplomat-gen-c
+```
+
+Or re-generate all of the bindings:
+
+```sh
+cargo make diplomat-gen
+```
+
+## More Information
+
+For more information on development, authorship, contributing etc. please visit [`ICU4X home page`](https://github.com/unicode-org/icu4x).
diff --git a/intl/icu_capi/c/examples/fixeddecimal/.gitignore b/intl/icu_capi/c/examples/fixeddecimal/.gitignore
new file mode 100644
index 0000000000..cb34c546b3
--- /dev/null
+++ b/intl/icu_capi/c/examples/fixeddecimal/.gitignore
@@ -0,0 +1,2 @@
+a.out
+a.out.dSYM
diff --git a/intl/icu_capi/c/examples/fixeddecimal/Makefile b/intl/icu_capi/c/examples/fixeddecimal/Makefile
new file mode 100644
index 0000000000..b068183f41
--- /dev/null
+++ b/intl/icu_capi/c/examples/fixeddecimal/Makefile
@@ -0,0 +1,26 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := test
+.PHONY: build test
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*.h)
+
+$(ALL_HEADERS):
+
+../../../../../target/debug/libicu_capi_staticlib.a: FORCE
+ cargo build -p icu_capi_staticlib
+
+a.out: ../../../../../target/debug/libicu_capi_staticlib.a $(ALL_HEADERS) test.c
+ gcc test.c ../../../../../target/debug/libicu_capi_staticlib.a -ldl -lpthread -lm -g
+
+build: a.out
+
+test: build
+ ./a.out
+
+clean:
+ git clean -xf *
+ rm -f ../../../../../target/debug/libicu_capi_staticlib.a
diff --git a/intl/icu_capi/c/examples/fixeddecimal/test.c b/intl/icu_capi/c/examples/fixeddecimal/test.c
new file mode 100644
index 0000000000..edf4523431
--- /dev/null
+++ b/intl/icu_capi/c/examples/fixeddecimal/test.c
@@ -0,0 +1,98 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#include "../../include/ICU4XFixedDecimalFormatter.h"
+#include "../../include/ICU4XLogger.h"
+#include <string.h>
+#include <stdio.h>
+
+int main() {
+ ICU4XLogger_init_simple_logger();
+ diplomat_result_box_ICU4XLocale_ICU4XError locale_result = ICU4XLocale_create_from_string("bn", 2);
+ if (!locale_result.is_ok) {
+ return 1;
+ }
+ ICU4XLocale* locale = locale_result.ok;
+ ICU4XDataProvider* provider = ICU4XDataProvider_create_compiled();
+
+ ICU4XFixedDecimal* decimal = ICU4XFixedDecimal_create_from_u64(1000007);
+
+ diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError fdf_result =
+ ICU4XFixedDecimalFormatter_create_with_grouping_strategy(provider, locale, ICU4XFixedDecimalGroupingStrategy_Auto);
+ if (!fdf_result.is_ok) {
+ printf("Failed to create FixedDecimalFormatter\n");
+ return 1;
+ }
+ ICU4XFixedDecimalFormatter* fdf = fdf_result.ok;
+ char output[40];
+
+ DiplomatWriteable write = diplomat_simple_writeable(output, 40);
+
+ bool success = ICU4XFixedDecimalFormatter_format(fdf, decimal, &write).is_ok;
+ if (!success) {
+ printf("Failed to write result of FixedDecimalFormatter::format to string.\n");
+ return 1;
+ }
+ printf("Output is %s\n", output);
+
+ const char* expected = u8"১০,০০,০০৭";
+ if (strcmp(output, expected) != 0) {
+ printf("Output does not match expected output!\n");
+ return 1;
+ }
+
+ ICU4XFixedDecimal_multiply_pow10(decimal, 2);
+ if (!success) {
+ printf("Failed to multiply FixedDecimal\n");
+ return 1;
+ }
+
+ ICU4XFixedDecimal_set_sign(decimal, ICU4XFixedDecimalSign_Negative);
+
+ write = diplomat_simple_writeable(output, 40);
+
+ success = ICU4XFixedDecimalFormatter_format(fdf, decimal, &write).is_ok;
+ if (!success) {
+ printf("Failed to write result of FixedDecimalFormatter::format to string.\n");
+ return 1;
+ }
+ printf("Output x100 and negated is %s\n", output);
+
+ expected = u8"-১০,০০,০০,৭০০";
+ if (strcmp(output, expected) != 0) {
+ printf("Output does not match expected output!\n");
+ return 1;
+ }
+
+ ICU4XFixedDecimal_destroy(decimal);
+
+ diplomat_result_box_ICU4XFixedDecimal_ICU4XError fd_result = ICU4XFixedDecimal_create_from_string("1000007.070", 11);
+ if (!fd_result.is_ok) {
+ printf("Failed to create FixedDecimal from string.\n");
+ return 1;
+ }
+ decimal = fd_result.ok;
+
+ write = diplomat_simple_writeable(output, 40);
+
+ success = ICU4XFixedDecimalFormatter_format(fdf, decimal, &write).is_ok;
+ if (!success) {
+ printf("Failed to write result of FixedDecimalFormatter::format to string.\n");
+ return 1;
+ }
+ printf("Output is %s\n", output);
+
+ expected = u8"১০,০০,০০৭.০৭০";
+ if (strcmp(output, expected) != 0) {
+ printf("Output does not match expected output!\n");
+ return 1;
+ }
+
+ ICU4XFixedDecimal_destroy(decimal);
+ ICU4XFixedDecimalFormatter_destroy(fdf);
+ ICU4XLocale_destroy(locale);
+ ICU4XDataProvider_destroy(provider);
+
+ return 0;
+}
diff --git a/intl/icu_capi/c/examples/fixeddecimal_tiny/.gitignore b/intl/icu_capi/c/examples/fixeddecimal_tiny/.gitignore
new file mode 100644
index 0000000000..586ba666b3
--- /dev/null
+++ b/intl/icu_capi/c/examples/fixeddecimal_tiny/.gitignore
@@ -0,0 +1,8 @@
+a.out
+optim*
+*.i64
+*.dot
+*.elf
+*.o
+a.out.dSYM
+baked_data
diff --git a/intl/icu_capi/c/examples/fixeddecimal_tiny/Makefile b/intl/icu_capi/c/examples/fixeddecimal_tiny/Makefile
new file mode 100644
index 0000000000..e9f610f429
--- /dev/null
+++ b/intl/icu_capi/c/examples/fixeddecimal_tiny/Makefile
@@ -0,0 +1,83 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+# PLEASE KEEP THIS FILE IN SYNC WITH ../segmenter_tiny/Makefile
+
+.DEFAULT_GOAL := test
+.PHONY: build test
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*.h)
+ICU4X_NIGHTLY_TOOLCHAIN ?= "nightly-2022-12-26"
+
+$(ALL_HEADERS):
+
+GCC := gcc
+CLANG := clang-15
+LLD := lld-15
+
+baked_data/macros.rs:
+ cargo run -p icu_datagen -- --locales en bn --keys all --fallback preresolved --format mod --out baked_data --overwrite
+
+crate/target/debug/libcrate.a: FORCE
+ cd crate && cargo build --features std
+
+crate/target/x86_64-unknown-linux-gnu/debug/libcrate.a: FORCE baked_data/macros.rs
+ rustup toolchain install ${ICU4X_NIGHTLY_TOOLCHAIN}
+ rustup component add rust-src --toolchain ${ICU4X_NIGHTLY_TOOLCHAIN}
+ cd crate && \
+ RUSTFLAGS="-Clinker-plugin-lto -Clinker=$(CLANG) -Ccodegen-units=1 -Clink-arg=-flto -Cpanic=abort" ICU4X_DATA_DIR=$(shell pwd)/baked_data cargo +${ICU4X_NIGHTLY_TOOLCHAIN} build -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target x86_64-unknown-linux-gnu
+
+crate/target/x86_64-unknown-linux-gnu/release/libcrate.a: FORCE baked_data/macros.rs
+ rustup toolchain install ${ICU4X_NIGHTLY_TOOLCHAIN}
+ rustup component add rust-src --toolchain ${ICU4X_NIGHTLY_TOOLCHAIN}
+ cd crate && \
+ RUSTFLAGS="-Clto -Cembed-bitcode -Clinker-plugin-lto -Clinker=$(CLANG) -Ccodegen-units=1 -Clink-arg=-flto -Cpanic=abort -Copt-level=s" ICU4X_DATA_DIR=$(shell pwd)/baked_data cargo +${ICU4X_NIGHTLY_TOOLCHAIN} build -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target x86_64-unknown-linux-gnu --release
+
+# Naive target: no optimizations, full std
+optim0.elf: crate/target/debug/libcrate.a $(ALL_HEADERS) test.c
+ $(GCC) test.c crate/target/debug/libcrate.a -ldl -lpthread -lm -g -o optim0.elf
+
+# optim.elf: gcc with maximum link-time code stripping (gc-sections and strip-all)
+optim1.elf: crate/target/debug/libcrate.a $(ALL_HEADERS) test.c
+ $(GCC) -fdata-sections -ffunction-sections test.c crate/target/debug/libcrate.a -ldl -lpthread -lm -g -o optim1.elf -Wl,--gc-sections -Wl,--strip-all
+
+# optim2.elf: clang single-step with gc-sections
+optim2.elf: crate/target/x86_64-unknown-linux-gnu/debug/libcrate.a $(ALL_HEADERS) test.c
+ $(CLANG) -flto -fdata-sections -ffunction-sections test.c crate/target/x86_64-unknown-linux-gnu/debug/libcrate.a -g -o optim2.elf -Wl,--gc-sections
+
+optim3.o: $(ALL_HEADERS) test.c
+ $(CLANG) -c -flto=thin -fdata-sections -ffunction-sections --target=x86_64-unknown-linux-gnu test.c -g -o optim3.o
+
+# optim3.elf: clang two-step with lld, debug mode
+optim3.elf: optim3.o crate/target/x86_64-unknown-linux-gnu/debug/libcrate.a
+ $(CLANG) -flto=thin -fuse-ld=$(LLD) -L . -o optim3.elf optim3.o crate/target/x86_64-unknown-linux-gnu/debug/libcrate.a -Wl,--gc-sections
+
+optim4.o: $(ALL_HEADERS) test.c
+ $(CLANG) -c -flto=thin -fdata-sections -ffunction-sections --target=x86_64-unknown-linux-gnu test.c -g -o optim4.o
+
+# optim4.elf: clang two-step with lld, release mode with debug symbols
+optim4.elf: optim4.o crate/target/x86_64-unknown-linux-gnu/release/libcrate.a
+ $(CLANG) -flto=thin -fuse-ld=$(LLD) -L . -o optim4.elf optim4.o crate/target/x86_64-unknown-linux-gnu/release/libcrate.a -Wl,--gc-sections
+
+optim5.o: $(ALL_HEADERS) test.c
+ $(CLANG) -c -flto=thin -fdata-sections -ffunction-sections --target=x86_64-unknown-linux-gnu test.c -o optim5.o
+
+# optim5.elf: clang two-step with lld, release mode stripped of debug symbols
+optim5.elf: optim5.o crate/target/x86_64-unknown-linux-gnu/release/libcrate.a
+ $(CLANG) -flto=thin -fuse-ld=$(LLD) -L . -o optim5.elf optim5.o crate/target/x86_64-unknown-linux-gnu/release/libcrate.a -Wl,--gc-sections -Wl,--strip-all
+
+build: optim0.elf optim1.elf optim2.elf optim3.elf optim4.elf optim5.elf
+ ls -l optim*.elf
+
+test: build
+ ./optim0.elf bn
+ ./optim1.elf bn
+ ./optim2.elf bn
+ ./optim2.elf bn
+ ./optim4.elf bn
+ ./optim5.elf bn
+
+clean:
+ git clean -xf *
diff --git a/intl/icu_capi/c/examples/fixeddecimal_tiny/README.md b/intl/icu_capi/c/examples/fixeddecimal_tiny/README.md
new file mode 100644
index 0000000000..0aba7c3419
--- /dev/null
+++ b/intl/icu_capi/c/examples/fixeddecimal_tiny/README.md
@@ -0,0 +1,8 @@
+# Tiny FixedDecimal FFI Demo
+
+This example contains tooling to build a size-optimized binary using FixedDecimal and FixedDecimalFormatter in C over FFI.
+
+Prerequisites: `clang` and `lld` 14. `apt-get install clang lld` *might* work, but if you run into errors, refer to the following thread for tips:
+
+https://github.com/rust-lang/rust/issues/60059
+
diff --git a/intl/icu_capi/c/examples/fixeddecimal_tiny/test.c b/intl/icu_capi/c/examples/fixeddecimal_tiny/test.c
new file mode 100644
index 0000000000..880cbad144
--- /dev/null
+++ b/intl/icu_capi/c/examples/fixeddecimal_tiny/test.c
@@ -0,0 +1,54 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#include "../../include/ICU4XFixedDecimalFormatter.h"
+#include <string.h>
+#include <stdio.h>
+
+int main(int argc, char *argv[]) {
+ if (argc != 2) {
+ printf("Usage: %s <language>\n", argv[0]);
+ return 1;
+ }
+
+ ICU4XLocale* locale = ICU4XLocale_create_und();
+ if (!ICU4XLocale_set_language(locale, argv[1], strlen(argv[1])).is_ok) {
+ printf("Invalid language tag \"%s\"\n", argv[1]);
+ return 1;
+ }
+
+ ICU4XDataProvider* provider = ICU4XDataProvider_create_compiled();
+ ICU4XFixedDecimal* decimal = ICU4XFixedDecimal_create_from_u64(1000007);
+
+ diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError fdf_result =
+ ICU4XFixedDecimalFormatter_create_with_grouping_strategy(provider, locale, ICU4XFixedDecimalGroupingStrategy_Auto);
+ if (!fdf_result.is_ok) {
+ printf("Failed to create FixedDecimalFormatter\n");
+ return 1;
+ }
+ ICU4XFixedDecimalFormatter* fdf = fdf_result.ok;
+ char output[40];
+
+ DiplomatWriteable write = diplomat_simple_writeable(output, 40);
+
+ bool success = ICU4XFixedDecimalFormatter_format(fdf, decimal, &write).is_ok;
+ if (!success) {
+ printf("Failed to write result of FixedDecimalFormatter::format to string.\n");
+ return 1;
+ }
+ printf("Output is %s\n", output);
+
+ const char* expected = u8"১০,০০,০০৭";
+ if (strcmp(output, expected) != 0) {
+ printf("Output does not match expected output!\n");
+ return 1;
+ }
+
+ ICU4XFixedDecimal_destroy(decimal);
+ ICU4XFixedDecimalFormatter_destroy(fdf);
+ ICU4XLocale_destroy(locale);
+ ICU4XDataProvider_destroy(provider);
+
+ return 0;
+}
diff --git a/intl/icu_capi/c/examples/locale/.gitignore b/intl/icu_capi/c/examples/locale/.gitignore
new file mode 100644
index 0000000000..cb34c546b3
--- /dev/null
+++ b/intl/icu_capi/c/examples/locale/.gitignore
@@ -0,0 +1,2 @@
+a.out
+a.out.dSYM
diff --git a/intl/icu_capi/c/examples/locale/Makefile b/intl/icu_capi/c/examples/locale/Makefile
new file mode 100644
index 0000000000..b068183f41
--- /dev/null
+++ b/intl/icu_capi/c/examples/locale/Makefile
@@ -0,0 +1,26 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := test
+.PHONY: build test
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*.h)
+
+$(ALL_HEADERS):
+
+../../../../../target/debug/libicu_capi_staticlib.a: FORCE
+ cargo build -p icu_capi_staticlib
+
+a.out: ../../../../../target/debug/libicu_capi_staticlib.a $(ALL_HEADERS) test.c
+ gcc test.c ../../../../../target/debug/libicu_capi_staticlib.a -ldl -lpthread -lm -g
+
+build: a.out
+
+test: build
+ ./a.out
+
+clean:
+ git clean -xf *
+ rm -f ../../../../../target/debug/libicu_capi_staticlib.a
diff --git a/intl/icu_capi/c/examples/locale/test.c b/intl/icu_capi/c/examples/locale/test.c
new file mode 100644
index 0000000000..65f1fbad36
--- /dev/null
+++ b/intl/icu_capi/c/examples/locale/test.c
@@ -0,0 +1,267 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#include "../../include/ICU4XLocaleCanonicalizer.h"
+#include "../../include/ICU4XLocaleExpander.h"
+#include "../../include/ICU4XLogger.h"
+#include <string.h>
+#include <stdio.h>
+
+/**
+ * A helper for testing the locale with nice error messages.
+ */
+bool test_locale(ICU4XLocale* locale, const char* message, const char* expected) {
+ char output[40];
+
+ // Test setters
+ DiplomatWriteable write = diplomat_simple_writeable(output, 40);
+ diplomat_result_void_ICU4XError result = ICU4XLocale_to_string(locale, &write);
+ if (!result.is_ok) {
+ return 1;
+ }
+ printf("Output for %s is \"%s\"\n", message, output);
+ if (strcmp(output, expected) != 0) {
+ printf("Output does not match expected output!\n");
+ return false;
+ }
+ return true;
+}
+
+ICU4XLocale* get_locale(const char* localeText) {
+ diplomat_result_box_ICU4XLocale_ICU4XError locale_result = ICU4XLocale_create_from_string(localeText, strlen(localeText));
+ if (!locale_result.is_ok) {
+ printf("Could not create locale from: %s", localeText);
+ }
+ return locale_result.ok;
+}
+
+
+int main() {
+ ICU4XLogger_init_simple_logger();
+ char output[40];
+
+ // Test creating a locale.
+ DiplomatWriteable write = diplomat_simple_writeable(output, 40);
+ diplomat_result_box_ICU4XLocale_ICU4XError locale_result = ICU4XLocale_create_from_string("ar", 2);
+ if (!locale_result.is_ok) {
+ return 1;
+ }
+ ICU4XLocale* locale = locale_result.ok;
+ diplomat_result_void_ICU4XError result = ICU4XLocale_to_string(locale, &write);
+ if (!result.is_ok) {
+ return 1;
+ }
+ printf("Output for a basic locale is %s\n", output);
+ const char* expected = u8"ar";
+ if (strcmp(output, expected) != 0) {
+ printf("Output does not match expected output!\n");
+ return 1;
+ }
+ ICU4XLocale_destroy(locale);
+
+ // Test some accessors.
+ write = diplomat_simple_writeable(output, 40);
+ locale_result = ICU4XLocale_create_from_string("fr-FR-u-hc-h23", 14);
+ if (!locale_result.is_ok) {
+ return 1;
+ }
+ locale = locale_result.ok;
+ result = ICU4XLocale_language(locale, &write);
+ if (!result.is_ok) {
+ return 1;
+ }
+ printf("Output for the language is %s\n", output);
+ expected = u8"fr";
+ if (strcmp(output, expected) != 0) {
+ printf("Output does not match expected output!\n");
+ return 1;
+ }
+
+ write = diplomat_simple_writeable(output, 40);
+ result = ICU4XLocale_region(locale, &write);
+ if (!result.is_ok) {
+ return 1;
+ }
+ printf("Output for the region is %s\n", output);
+ expected = u8"FR";
+ if (strcmp(output, expected) != 0) {
+ printf("Output does not match expected output!\n");
+ return 1;
+ }
+
+ write = diplomat_simple_writeable(output, 40);
+ result = ICU4XLocale_get_unicode_extension(locale, "hc", 2, &write);
+ if (!result.is_ok) {
+ return 1;
+ }
+ printf("Output for the extension is %s\n", output);
+ expected = u8"h23";
+ if (strcmp(output, expected) != 0) {
+ printf("Output does not match expected output!\n");
+ return 1;
+ }
+
+ result = ICU4XLocale_get_unicode_extension(locale, "ca", 2, &write);
+ if (!(!result.is_ok && result.err == ICU4XError_LocaleUndefinedSubtagError)) {
+ return 1;
+ }
+
+ // Test setting the language
+ write = diplomat_simple_writeable(output, 40);
+ const char* str = "fr-FR-u-hc-h23";
+ locale_result = ICU4XLocale_create_from_string(str, strlen(str));
+ if (!locale_result.is_ok) {
+ printf("Could not create the locale.");
+ return 1;
+ }
+ locale = locale_result.ok;
+ str = "zh";
+ result = ICU4XLocale_set_language(locale, str, strlen(str));
+ if (!result.is_ok) {
+ printf("Could not set the language tag.");
+ return 1;
+ }
+ if (!test_locale(locale, "setting the language tag", "zh-FR-u-hc-h23")) {
+ return 1;
+ }
+ ICU4XLocale_destroy(locale);
+
+ // Test setting the region
+ write = diplomat_simple_writeable(output, 40);
+ str = "es-ES-u-hc-h23";
+ locale_result = ICU4XLocale_create_from_string(str, strlen(str));
+ if (!locale_result.is_ok) {
+ printf("Could not create the locale.");
+ return 1;
+ }
+ locale = locale_result.ok;
+ if (!test_locale(locale, "The region starts as es-ES", "es-ES-u-hc-h23")) {
+ return 1;
+ }
+ str = "MX";
+ result = ICU4XLocale_set_region(locale, str, strlen(str));
+ if (!result.is_ok) {
+ printf("Could not set the region.");
+ return 1;
+ }
+ if (!test_locale(locale, "setting the region", "es-MX-u-hc-h23")) {
+ return 1;
+ }
+ ICU4XLocale_destroy(locale);
+
+ // Test setting the script
+ write = diplomat_simple_writeable(output, 40);
+ str = "en-US";
+ locale_result = ICU4XLocale_create_from_string(str, strlen(str));
+ if (!locale_result.is_ok) {
+ printf("Could not create the locale.");
+ return 1;
+ }
+ locale = locale_result.ok;
+ if (!test_locale(locale, "initial script-less locale", "en-US")) {
+ return 1;
+ }
+ str = "Latn";
+ result = ICU4XLocale_set_script(locale, str, strlen(str));
+ if (!result.is_ok) {
+ printf("Could not set the script.");
+ return 1;
+ }
+ if (!test_locale(locale, "setting the script", "en-Latn-US")) {
+ return 1;
+ }
+ result = ICU4XLocale_set_script(locale, "", 0);
+ if (!result.is_ok) {
+ printf("Could not set the script.");
+ return 1;
+ }
+ if (!test_locale(locale, "removing the script", "en-US")) {
+ return 1;
+ }
+
+ ICU4XLocale_destroy(locale);
+
+ // Create a LocaleCanonicalizer and LocaleExpander.
+ ICU4XDataProvider* provider = ICU4XDataProvider_create_compiled();
+ diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError result2 = ICU4XLocaleCanonicalizer_create(provider);
+ if (!result2.is_ok) {
+ printf("Could not construct Locale Canonicalizer");
+ return 1;
+ }
+ ICU4XLocaleCanonicalizer* lc = result2.ok;
+ diplomat_result_box_ICU4XLocaleExpander_ICU4XError result3 = ICU4XLocaleExpander_create(provider);
+ if (!result3.is_ok) {
+ printf("Could not construct Locale Canonicalizer");
+ return 1;
+ }
+ ICU4XLocaleExpander* le = result3.ok;
+
+ // Test maximize.
+ write = diplomat_simple_writeable(output, 40);
+ locale_result = ICU4XLocale_create_from_string("und", 3);
+ if (!locale_result.is_ok) {
+ printf("Could not create the locale.");
+ return 1;
+ }
+ locale = locale_result.ok;
+ ICU4XLocaleExpander_maximize(le, locale);
+ result = ICU4XLocale_to_string(locale, &write);
+ if (!result.is_ok) {
+ return 1;
+ }
+ printf("Output for maximizing is %s\n", output);
+ expected = u8"en-Latn-US";
+ if (strcmp(output, expected) != 0) {
+ printf("Output does not match expected output!\n");
+ return 1;
+ }
+ ICU4XLocale_destroy(locale);
+
+ // Test minimize.
+ write = diplomat_simple_writeable(output, 40);
+ locale_result = ICU4XLocale_create_from_string("zh-Hant", 7);
+ if (!locale_result.is_ok) {
+ printf("Could not create the locale.");
+ return 1;
+ }
+ locale = locale_result.ok;
+ ICU4XLocaleExpander_minimize(le, locale);
+ result = ICU4XLocale_to_string(locale, &write);
+ if (!result.is_ok) {
+ return 1;
+ }
+ printf("Output for minimizing is %s\n", output);
+ expected = u8"zh-TW";
+ if (strcmp(output, expected) != 0) {
+ printf("Output does not match expected output!\n");
+ return 1;
+ }
+ ICU4XLocale_destroy(locale);
+
+ // Test canonicalize.
+ write = diplomat_simple_writeable(output, 40);
+ locale_result = ICU4XLocale_create_from_string("no-nynorsk", 10);
+ if (!locale_result.is_ok) {
+ printf("Could not create the locale.");
+ return 1;
+ }
+ locale = locale_result.ok;
+ ICU4XLocaleCanonicalizer_canonicalize(lc, locale);
+ result = ICU4XLocale_to_string(locale, &write);
+ if (!result.is_ok) {
+ return 1;
+ }
+ printf("Output for canonicalizing is %s\n", output);
+ expected = u8"nn";
+ if (strcmp(output, expected) != 0) {
+ printf("Output does not match expected output!\n");
+ return 1;
+ }
+ ICU4XLocale_destroy(locale);
+
+ ICU4XLocaleCanonicalizer_destroy(lc);
+ ICU4XLocaleExpander_destroy(le);
+
+ return 0;
+}
diff --git a/intl/icu_capi/c/examples/pluralrules/.gitignore b/intl/icu_capi/c/examples/pluralrules/.gitignore
new file mode 100644
index 0000000000..cb34c546b3
--- /dev/null
+++ b/intl/icu_capi/c/examples/pluralrules/.gitignore
@@ -0,0 +1,2 @@
+a.out
+a.out.dSYM
diff --git a/intl/icu_capi/c/examples/pluralrules/Makefile b/intl/icu_capi/c/examples/pluralrules/Makefile
new file mode 100644
index 0000000000..b068183f41
--- /dev/null
+++ b/intl/icu_capi/c/examples/pluralrules/Makefile
@@ -0,0 +1,26 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := test
+.PHONY: build test
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*.h)
+
+$(ALL_HEADERS):
+
+../../../../../target/debug/libicu_capi_staticlib.a: FORCE
+ cargo build -p icu_capi_staticlib
+
+a.out: ../../../../../target/debug/libicu_capi_staticlib.a $(ALL_HEADERS) test.c
+ gcc test.c ../../../../../target/debug/libicu_capi_staticlib.a -ldl -lpthread -lm -g
+
+build: a.out
+
+test: build
+ ./a.out
+
+clean:
+ git clean -xf *
+ rm -f ../../../../../target/debug/libicu_capi_staticlib.a
diff --git a/intl/icu_capi/c/examples/pluralrules/test.c b/intl/icu_capi/c/examples/pluralrules/test.c
new file mode 100644
index 0000000000..48558e5101
--- /dev/null
+++ b/intl/icu_capi/c/examples/pluralrules/test.c
@@ -0,0 +1,70 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#include "../../include/ICU4XPluralRules.h"
+#include "../../include/ICU4XLogger.h"
+#include <string.h>
+#include <stdio.h>
+
+int main() {
+ ICU4XLogger_init_simple_logger();
+ diplomat_result_box_ICU4XLocale_ICU4XError locale_result = ICU4XLocale_create_from_string("ar", 2);
+ if (!locale_result.is_ok) {
+ return 1;
+ }
+ ICU4XLocale* locale = locale_result.ok;
+ ICU4XDataProvider* provider = ICU4XDataProvider_create_compiled();
+ diplomat_result_box_ICU4XPluralRules_ICU4XError plural_result = ICU4XPluralRules_create_cardinal(provider, locale);
+ if (!plural_result.is_ok) {
+ printf("Failed to create PluralRules\n");
+ return 1;
+ }
+ ICU4XPluralRules* rules = plural_result.ok;
+
+ ICU4XPluralCategories categories = ICU4XPluralRules_categories(rules);
+ printf("Plural Category zero (should be true): %s\n", categories.zero ? "true" : "false");
+ printf("Plural Category one (should be true): %s\n", categories.one ? "true" : "false");
+ printf("Plural Category two (should be true): %s\n", categories.two ? "true" : "false");
+ printf("Plural Category few (should be true): %s\n", categories.few ? "true" : "false");
+ printf("Plural Category many (should be true): %s\n", categories.many ? "true" : "false");
+ printf("Plural Category other (should be true): %s\n", categories.other ? "true" : "false");
+
+ diplomat_result_box_ICU4XPluralOperands_ICU4XError op1_result = ICU4XPluralOperands_create_from_string("3", 1);
+
+ if (!op1_result.is_ok) {
+ printf("Failed to create PluralOperands from string\n");
+ return 1;
+ }
+
+ ICU4XPluralCategory cat1 = ICU4XPluralRules_category_for(rules, op1_result.ok);
+
+ printf("Plural Category %d (should be %d)\n", (int)cat1, (int)ICU4XPluralCategory_Few);
+
+ diplomat_result_box_ICU4XPluralOperands_ICU4XError op2_result = ICU4XPluralOperands_create_from_string("1011.0", 6);
+
+ if (!op2_result.is_ok) {
+ printf("Failed to create PluralOperands from string\n");
+ return 1;
+ }
+
+ ICU4XPluralCategory cat2 = ICU4XPluralRules_category_for(rules, op2_result.ok);
+
+ printf("Plural Category %d (should be %d)\n", (int)cat2, (int)ICU4XPluralCategory_Many);
+
+ ICU4XPluralRules_destroy(rules);
+ ICU4XDataProvider_destroy(provider);
+ ICU4XLocale_destroy(locale);
+
+ if (!categories.zero) { return 1; }
+ if (!categories.one) { return 1; }
+ if (!categories.two) { return 1; }
+ if (!categories.few) { return 1; }
+ if (!categories.many) { return 1; }
+ if (!categories.other) { return 1; }
+
+ if (cat1 != ICU4XPluralCategory_Few) { return 1; }
+ if (cat2 != ICU4XPluralCategory_Many) { return 1; }
+
+ return 0;
+}
diff --git a/intl/icu_capi/c/examples/segmenter_tiny/.gitignore b/intl/icu_capi/c/examples/segmenter_tiny/.gitignore
new file mode 100644
index 0000000000..586ba666b3
--- /dev/null
+++ b/intl/icu_capi/c/examples/segmenter_tiny/.gitignore
@@ -0,0 +1,8 @@
+a.out
+optim*
+*.i64
+*.dot
+*.elf
+*.o
+a.out.dSYM
+baked_data
diff --git a/intl/icu_capi/c/examples/segmenter_tiny/Makefile b/intl/icu_capi/c/examples/segmenter_tiny/Makefile
new file mode 100644
index 0000000000..da0b98a870
--- /dev/null
+++ b/intl/icu_capi/c/examples/segmenter_tiny/Makefile
@@ -0,0 +1,80 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+# PLEASE KEEP THIS FILE IN SYNC WITH ../fixeddecimal_tiny/Makefile
+
+.DEFAULT_GOAL := test
+.PHONY: build test
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*.h)
+ICU4X_NIGHTLY_TOOLCHAIN ?= "nightly-2022-12-26"
+
+$(ALL_HEADERS):
+
+GCC := gcc
+CLANG := clang-15
+LLD := lld-15
+
+crate/target/debug/libcrate.a: FORCE
+ cd crate && cargo build --features std
+
+crate/target/x86_64-unknown-linux-gnu/debug/libcrate.a: FORCE
+ rustup toolchain install ${ICU4X_NIGHTLY_TOOLCHAIN}
+ rustup component add rust-src --toolchain ${ICU4X_NIGHTLY_TOOLCHAIN}
+ cd crate && \
+ RUSTFLAGS="-Clinker-plugin-lto -Clinker=$(CLANG) -Ccodegen-units=1 -Clink-arg=-flto -Cpanic=abort" cargo +${ICU4X_NIGHTLY_TOOLCHAIN} build -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target x86_64-unknown-linux-gnu
+
+crate/target/x86_64-unknown-linux-gnu/release/libcrate.a: FORCE
+ rustup toolchain install ${ICU4X_NIGHTLY_TOOLCHAIN}
+ rustup component add rust-src --toolchain ${ICU4X_NIGHTLY_TOOLCHAIN}
+ cd crate && \
+ RUSTFLAGS="-Clto -Cembed-bitcode -Clinker-plugin-lto -Clinker=$(CLANG) -Ccodegen-units=1 -Clink-arg=-flto -Cpanic=abort -Copt-level=s" cargo +${ICU4X_NIGHTLY_TOOLCHAIN} build -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target x86_64-unknown-linux-gnu --release
+
+# Naive target: no optimizations, full std
+optim0.elf: crate/target/debug/libcrate.a $(ALL_HEADERS) test.c
+ $(GCC) test.c crate/target/debug/libcrate.a -ldl -lpthread -lm -g -o optim0.elf
+
+# optim.elf: gcc with maximum link-time code stripping (gc-sections and strip-all)
+optim1.elf: crate/target/debug/libcrate.a $(ALL_HEADERS) test.c
+ $(GCC) -fdata-sections -ffunction-sections test.c crate/target/debug/libcrate.a -ldl -lpthread -lm -g -o optim1.elf -Wl,--gc-sections -Wl,--strip-all
+
+# optim2.elf: clang single-step with gc-sections
+optim2.elf: crate/target/x86_64-unknown-linux-gnu/debug/libcrate.a $(ALL_HEADERS) test.c
+ $(CLANG) -flto -fdata-sections -ffunction-sections test.c crate/target/x86_64-unknown-linux-gnu/debug/libcrate.a -g -o optim2.elf -Wl,--gc-sections
+
+optim3.o: $(ALL_HEADERS) test.c
+ $(CLANG) -c -flto=thin -fdata-sections -ffunction-sections --target=x86_64-unknown-linux-gnu test.c -g -o optim3.o
+
+# optim3.elf: clang two-step with lld, debug mode
+optim3.elf: optim3.o crate/target/x86_64-unknown-linux-gnu/debug/libcrate.a
+ $(CLANG) -flto=thin -fuse-ld=$(LLD) -L . -o optim3.elf optim3.o crate/target/x86_64-unknown-linux-gnu/debug/libcrate.a -Wl,--gc-sections
+
+optim4.o: $(ALL_HEADERS) test.c
+ $(CLANG) -c -flto=thin -fdata-sections -ffunction-sections --target=x86_64-unknown-linux-gnu test.c -g -o optim4.o
+
+# optim4.elf: clang two-step with lld, release mode with debug symbols
+optim4.elf: optim4.o crate/target/x86_64-unknown-linux-gnu/release/libcrate.a
+ $(CLANG) -flto=thin -fuse-ld=$(LLD) -L . -o optim4.elf optim4.o crate/target/x86_64-unknown-linux-gnu/release/libcrate.a -Wl,--gc-sections
+
+optim5.o: $(ALL_HEADERS) test.c
+ $(CLANG) -c -flto=thin -fdata-sections -ffunction-sections --target=x86_64-unknown-linux-gnu test.c -o optim5.o
+
+# optim5.elf: clang two-step with lld, release mode stripped of debug symbols
+optim5.elf: optim5.o crate/target/x86_64-unknown-linux-gnu/release/libcrate.a
+ $(CLANG) -flto=thin -fuse-ld=$(LLD) -L . -o optim5.elf optim5.o crate/target/x86_64-unknown-linux-gnu/release/libcrate.a -Wl,--gc-sections -Wl,--strip-all
+
+build: optim0.elf optim1.elf optim2.elf optim3.elf optim4.elf optim5.elf
+ ls -l optim*.elf
+
+test: build
+ ./optim0.elf
+ ./optim1.elf
+ ./optim2.elf
+ ./optim2.elf
+ ./optim4.elf
+ ./optim5.elf
+
+clean:
+ git clean -xf *
diff --git a/intl/icu_capi/c/examples/segmenter_tiny/README.md b/intl/icu_capi/c/examples/segmenter_tiny/README.md
new file mode 100644
index 0000000000..2832999da8
--- /dev/null
+++ b/intl/icu_capi/c/examples/segmenter_tiny/README.md
@@ -0,0 +1,5 @@
+# Tiny Segmenter FFI Demo
+
+This example contains tooling to build a size-optimized binary using Segmenter in C over FFI.
+
+For more information and prerequisites, see ../fixeddecimal_tiny/README.md
diff --git a/intl/icu_capi/c/examples/segmenter_tiny/test.c b/intl/icu_capi/c/examples/segmenter_tiny/test.c
new file mode 100644
index 0000000000..f9814eec2b
--- /dev/null
+++ b/intl/icu_capi/c/examples/segmenter_tiny/test.c
@@ -0,0 +1,42 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#include "../../include/ICU4XLineSegmenter.h"
+#include <string.h>
+#include <stdio.h>
+
+int main(int argc, char *argv[]) {
+ ICU4XDataProvider* provider = ICU4XDataProvider_create_compiled();
+
+ diplomat_result_box_ICU4XLineSegmenter_ICU4XError segmenter_result = ICU4XLineSegmenter_create_auto(provider);
+ if (!segmenter_result.is_ok) {
+ printf("Failed to create ICU4XLineSegmenter\n");
+ return 1;
+ }
+ ICU4XLineSegmenter* segmenter = segmenter_result.ok;
+
+ char output[40];
+ DiplomatWriteable write = diplomat_simple_writeable(output, 40);
+
+ const char* data = "อักษรไทย เป็นอักษรที่ใช้เขียนภาษาไทยและภาษาของกลุ่มชาติพันธุ์ต่างๆ เช่น คำเมือง, อีสาน, ภาษาไทยใต้, มลายูปัตตานี เป็นต้น ในประเทศไทย มีพยัญชนะ 44 รูป สระ 21 รูป วรรณยุกต์ 4 รูป และเครื่องหมายอื่น ๆ อีกจำนวนหนึ่ง";
+
+ ICU4XLineBreakIteratorUtf8* iter = ICU4XLineSegmenter_segment_utf8(segmenter, data, strlen(data));
+
+ printf("Breakpoints:");
+ while (true) {
+ int32_t breakpoint = ICU4XLineBreakIteratorUtf8_next(iter);
+ if (breakpoint == -1) {
+ break;
+ }
+ printf(" %d", breakpoint);
+ }
+
+ printf("\n");
+
+ ICU4XLineBreakIteratorUtf8_destroy(iter);
+ ICU4XLineSegmenter_destroy(segmenter);
+ ICU4XDataProvider_destroy(provider);
+
+ return 0;
+}
diff --git a/intl/icu_capi/c/include/CodePointRangeIterator.h b/intl/icu_capi/c/include/CodePointRangeIterator.h
new file mode 100644
index 0000000000..36d6d23175
--- /dev/null
+++ b/intl/icu_capi/c/include/CodePointRangeIterator.h
@@ -0,0 +1,30 @@
+#ifndef CodePointRangeIterator_H
+#define CodePointRangeIterator_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct CodePointRangeIterator CodePointRangeIterator;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "CodePointRangeIteratorResult.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+CodePointRangeIteratorResult CodePointRangeIterator_next(CodePointRangeIterator* self);
+void CodePointRangeIterator_destroy(CodePointRangeIterator* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/CodePointRangeIteratorResult.h b/intl/icu_capi/c/include/CodePointRangeIteratorResult.h
new file mode 100644
index 0000000000..846873be11
--- /dev/null
+++ b/intl/icu_capi/c/include/CodePointRangeIteratorResult.h
@@ -0,0 +1,32 @@
+#ifndef CodePointRangeIteratorResult_H
+#define CodePointRangeIteratorResult_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct CodePointRangeIteratorResult {
+ uint32_t start;
+ uint32_t end;
+ bool done;
+} CodePointRangeIteratorResult;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void CodePointRangeIteratorResult_destroy(CodePointRangeIteratorResult* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XAnyCalendarKind.h b/intl/icu_capi/c/include/ICU4XAnyCalendarKind.h
new file mode 100644
index 0000000000..329f381577
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XAnyCalendarKind.h
@@ -0,0 +1,55 @@
+#ifndef ICU4XAnyCalendarKind_H
+#define ICU4XAnyCalendarKind_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XAnyCalendarKind {
+ ICU4XAnyCalendarKind_Iso = 0,
+ ICU4XAnyCalendarKind_Gregorian = 1,
+ ICU4XAnyCalendarKind_Buddhist = 2,
+ ICU4XAnyCalendarKind_Japanese = 3,
+ ICU4XAnyCalendarKind_JapaneseExtended = 4,
+ ICU4XAnyCalendarKind_Ethiopian = 5,
+ ICU4XAnyCalendarKind_EthiopianAmeteAlem = 6,
+ ICU4XAnyCalendarKind_Indian = 7,
+ ICU4XAnyCalendarKind_Coptic = 8,
+ ICU4XAnyCalendarKind_Dangi = 9,
+ ICU4XAnyCalendarKind_Chinese = 10,
+ ICU4XAnyCalendarKind_Hebrew = 11,
+ ICU4XAnyCalendarKind_IslamicCivil = 12,
+ ICU4XAnyCalendarKind_IslamicObservational = 13,
+ ICU4XAnyCalendarKind_IslamicTabular = 14,
+ ICU4XAnyCalendarKind_IslamicUmmAlQura = 15,
+ ICU4XAnyCalendarKind_Persian = 16,
+ ICU4XAnyCalendarKind_Roc = 17,
+} ICU4XAnyCalendarKind;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XLocale.h"
+#include "diplomat_result_ICU4XAnyCalendarKind_void.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_ICU4XAnyCalendarKind_void ICU4XAnyCalendarKind_get_for_locale(const ICU4XLocale* locale);
+
+diplomat_result_ICU4XAnyCalendarKind_void ICU4XAnyCalendarKind_get_for_bcp47(const char* s_data, size_t s_len);
+
+diplomat_result_void_ICU4XError ICU4XAnyCalendarKind_bcp47(ICU4XAnyCalendarKind self, DiplomatWriteable* write);
+void ICU4XAnyCalendarKind_destroy(ICU4XAnyCalendarKind* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XBcp47ToIanaMapper.h b/intl/icu_capi/c/include/ICU4XBcp47ToIanaMapper.h
new file mode 100644
index 0000000000..483afe1ec2
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XBcp47ToIanaMapper.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XBcp47ToIanaMapper_H
+#define ICU4XBcp47ToIanaMapper_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XBcp47ToIanaMapper ICU4XBcp47ToIanaMapper;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError ICU4XBcp47ToIanaMapper_create(const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XBcp47ToIanaMapper_get(const ICU4XBcp47ToIanaMapper* self, const char* value_data, size_t value_len, DiplomatWriteable* write);
+void ICU4XBcp47ToIanaMapper_destroy(ICU4XBcp47ToIanaMapper* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XBidi.h b/intl/icu_capi/c/include/ICU4XBidi.h
new file mode 100644
index 0000000000..1ed7cfc8c2
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XBidi.h
@@ -0,0 +1,45 @@
+#ifndef ICU4XBidi_H
+#define ICU4XBidi_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XBidi ICU4XBidi;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XBidi_ICU4XError.h"
+#include "ICU4XBidiInfo.h"
+#include "ICU4XReorderedIndexMap.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XBidi_ICU4XError ICU4XBidi_create(const ICU4XDataProvider* provider);
+
+ICU4XBidiInfo* ICU4XBidi_for_text(const ICU4XBidi* self, const char* text_data, size_t text_len, uint8_t default_level);
+
+ICU4XReorderedIndexMap* ICU4XBidi_reorder_visual(const ICU4XBidi* self, const uint8_t* levels_data, size_t levels_len);
+
+bool ICU4XBidi_level_is_rtl(uint8_t level);
+
+bool ICU4XBidi_level_is_ltr(uint8_t level);
+
+uint8_t ICU4XBidi_level_rtl();
+
+uint8_t ICU4XBidi_level_ltr();
+void ICU4XBidi_destroy(ICU4XBidi* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XBidiDirection.h b/intl/icu_capi/c/include/ICU4XBidiDirection.h
new file mode 100644
index 0000000000..33de81d6e9
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XBidiDirection.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XBidiDirection_H
+#define ICU4XBidiDirection_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XBidiDirection {
+ ICU4XBidiDirection_Ltr = 0,
+ ICU4XBidiDirection_Rtl = 1,
+ ICU4XBidiDirection_Mixed = 2,
+} ICU4XBidiDirection;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XBidiDirection_destroy(ICU4XBidiDirection* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XBidiInfo.h b/intl/icu_capi/c/include/ICU4XBidiInfo.h
new file mode 100644
index 0000000000..02e8c21659
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XBidiInfo.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XBidiInfo_H
+#define ICU4XBidiInfo_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XBidiInfo ICU4XBidiInfo;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XBidiParagraph.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+size_t ICU4XBidiInfo_paragraph_count(const ICU4XBidiInfo* self);
+
+ICU4XBidiParagraph* ICU4XBidiInfo_paragraph_at(const ICU4XBidiInfo* self, size_t n);
+
+size_t ICU4XBidiInfo_size(const ICU4XBidiInfo* self);
+
+uint8_t ICU4XBidiInfo_level_at(const ICU4XBidiInfo* self, size_t pos);
+void ICU4XBidiInfo_destroy(ICU4XBidiInfo* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XBidiParagraph.h b/intl/icu_capi/c/include/ICU4XBidiParagraph.h
new file mode 100644
index 0000000000..269f940cc7
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XBidiParagraph.h
@@ -0,0 +1,43 @@
+#ifndef ICU4XBidiParagraph_H
+#define ICU4XBidiParagraph_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XBidiParagraph ICU4XBidiParagraph;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XBidiDirection.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_void_ICU4XError ICU4XBidiParagraph_set_paragraph_in_text(ICU4XBidiParagraph* self, size_t n);
+
+ICU4XBidiDirection ICU4XBidiParagraph_direction(const ICU4XBidiParagraph* self);
+
+size_t ICU4XBidiParagraph_size(const ICU4XBidiParagraph* self);
+
+size_t ICU4XBidiParagraph_range_start(const ICU4XBidiParagraph* self);
+
+size_t ICU4XBidiParagraph_range_end(const ICU4XBidiParagraph* self);
+
+diplomat_result_void_ICU4XError ICU4XBidiParagraph_reorder_line(const ICU4XBidiParagraph* self, size_t range_start, size_t range_end, DiplomatWriteable* out);
+
+uint8_t ICU4XBidiParagraph_level_at(const ICU4XBidiParagraph* self, size_t pos);
+void ICU4XBidiParagraph_destroy(ICU4XBidiParagraph* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCalendar.h b/intl/icu_capi/c/include/ICU4XCalendar.h
new file mode 100644
index 0000000000..9ea6484b5f
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCalendar.h
@@ -0,0 +1,37 @@
+#ifndef ICU4XCalendar_H
+#define ICU4XCalendar_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCalendar ICU4XCalendar;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "diplomat_result_box_ICU4XCalendar_ICU4XError.h"
+#include "ICU4XAnyCalendarKind.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCalendar_ICU4XError ICU4XCalendar_create_for_locale(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_box_ICU4XCalendar_ICU4XError ICU4XCalendar_create_for_kind(const ICU4XDataProvider* provider, ICU4XAnyCalendarKind kind);
+
+ICU4XAnyCalendarKind ICU4XCalendar_kind(const ICU4XCalendar* self);
+void ICU4XCalendar_destroy(ICU4XCalendar* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCanonicalCombiningClassMap.h b/intl/icu_capi/c/include/ICU4XCanonicalCombiningClassMap.h
new file mode 100644
index 0000000000..f0fc447ba0
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCanonicalCombiningClassMap.h
@@ -0,0 +1,35 @@
+#ifndef ICU4XCanonicalCombiningClassMap_H
+#define ICU4XCanonicalCombiningClassMap_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCanonicalCombiningClassMap ICU4XCanonicalCombiningClassMap;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError ICU4XCanonicalCombiningClassMap_create(const ICU4XDataProvider* provider);
+
+uint8_t ICU4XCanonicalCombiningClassMap_get(const ICU4XCanonicalCombiningClassMap* self, char32_t ch);
+
+uint8_t ICU4XCanonicalCombiningClassMap_get32(const ICU4XCanonicalCombiningClassMap* self, uint32_t ch);
+void ICU4XCanonicalCombiningClassMap_destroy(ICU4XCanonicalCombiningClassMap* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCanonicalComposition.h b/intl/icu_capi/c/include/ICU4XCanonicalComposition.h
new file mode 100644
index 0000000000..e9ae621739
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCanonicalComposition.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XCanonicalComposition_H
+#define ICU4XCanonicalComposition_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCanonicalComposition ICU4XCanonicalComposition;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCanonicalComposition_ICU4XError ICU4XCanonicalComposition_create(const ICU4XDataProvider* provider);
+
+char32_t ICU4XCanonicalComposition_compose(const ICU4XCanonicalComposition* self, char32_t starter, char32_t second);
+void ICU4XCanonicalComposition_destroy(ICU4XCanonicalComposition* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCanonicalDecomposition.h b/intl/icu_capi/c/include/ICU4XCanonicalDecomposition.h
new file mode 100644
index 0000000000..d18d108b90
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCanonicalDecomposition.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XCanonicalDecomposition_H
+#define ICU4XCanonicalDecomposition_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCanonicalDecomposition ICU4XCanonicalDecomposition;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.h"
+#include "ICU4XDecomposed.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError ICU4XCanonicalDecomposition_create(const ICU4XDataProvider* provider);
+
+ICU4XDecomposed ICU4XCanonicalDecomposition_decompose(const ICU4XCanonicalDecomposition* self, char32_t c);
+void ICU4XCanonicalDecomposition_destroy(ICU4XCanonicalDecomposition* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCaseMapCloser.h b/intl/icu_capi/c/include/ICU4XCaseMapCloser.h
new file mode 100644
index 0000000000..ed2129006c
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCaseMapCloser.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XCaseMapCloser_H
+#define ICU4XCaseMapCloser_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCaseMapCloser ICU4XCaseMapCloser;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.h"
+#include "ICU4XCodePointSetBuilder.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCaseMapCloser_ICU4XError ICU4XCaseMapCloser_create(const ICU4XDataProvider* provider);
+
+void ICU4XCaseMapCloser_add_case_closure_to(const ICU4XCaseMapCloser* self, char32_t c, ICU4XCodePointSetBuilder* builder);
+
+bool ICU4XCaseMapCloser_add_string_case_closure_to(const ICU4XCaseMapCloser* self, const char* s_data, size_t s_len, ICU4XCodePointSetBuilder* builder);
+void ICU4XCaseMapCloser_destroy(ICU4XCaseMapCloser* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCaseMapper.h b/intl/icu_capi/c/include/ICU4XCaseMapper.h
new file mode 100644
index 0000000000..aef264f722
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCaseMapper.h
@@ -0,0 +1,57 @@
+#ifndef ICU4XCaseMapper_H
+#define ICU4XCaseMapper_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCaseMapper ICU4XCaseMapper;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCaseMapper_ICU4XError.h"
+#include "ICU4XLocale.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XTitlecaseOptionsV1.h"
+#include "ICU4XCodePointSetBuilder.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCaseMapper_ICU4XError ICU4XCaseMapper_create(const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XCaseMapper_lowercase(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XCaseMapper_uppercase(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XCaseMapper_titlecase_segment_with_only_case_data_v1(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, ICU4XTitlecaseOptionsV1 options, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XCaseMapper_fold(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XCaseMapper_fold_turkic(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, DiplomatWriteable* write);
+
+void ICU4XCaseMapper_add_case_closure_to(const ICU4XCaseMapper* self, char32_t c, ICU4XCodePointSetBuilder* builder);
+
+char32_t ICU4XCaseMapper_simple_lowercase(const ICU4XCaseMapper* self, char32_t ch);
+
+char32_t ICU4XCaseMapper_simple_uppercase(const ICU4XCaseMapper* self, char32_t ch);
+
+char32_t ICU4XCaseMapper_simple_titlecase(const ICU4XCaseMapper* self, char32_t ch);
+
+char32_t ICU4XCaseMapper_simple_fold(const ICU4XCaseMapper* self, char32_t ch);
+
+char32_t ICU4XCaseMapper_simple_fold_turkic(const ICU4XCaseMapper* self, char32_t ch);
+void ICU4XCaseMapper_destroy(ICU4XCaseMapper* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCodePointMapData16.h b/intl/icu_capi/c/include/ICU4XCodePointMapData16.h
new file mode 100644
index 0000000000..19effe2d92
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCodePointMapData16.h
@@ -0,0 +1,43 @@
+#ifndef ICU4XCodePointMapData16_H
+#define ICU4XCodePointMapData16_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCodePointMapData16 ICU4XCodePointMapData16;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "CodePointRangeIterator.h"
+#include "ICU4XCodePointSetData.h"
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+uint16_t ICU4XCodePointMapData16_get(const ICU4XCodePointMapData16* self, char32_t cp);
+
+uint16_t ICU4XCodePointMapData16_get32(const ICU4XCodePointMapData16* self, uint32_t cp);
+
+CodePointRangeIterator* ICU4XCodePointMapData16_iter_ranges_for_value(const ICU4XCodePointMapData16* self, uint16_t value);
+
+CodePointRangeIterator* ICU4XCodePointMapData16_iter_ranges_for_value_complemented(const ICU4XCodePointMapData16* self, uint16_t value);
+
+ICU4XCodePointSetData* ICU4XCodePointMapData16_get_set_for_value(const ICU4XCodePointMapData16* self, uint16_t value);
+
+diplomat_result_box_ICU4XCodePointMapData16_ICU4XError ICU4XCodePointMapData16_load_script(const ICU4XDataProvider* provider);
+void ICU4XCodePointMapData16_destroy(ICU4XCodePointMapData16* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCodePointMapData8.h b/intl/icu_capi/c/include/ICU4XCodePointMapData8.h
new file mode 100644
index 0000000000..87fe8854b2
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCodePointMapData8.h
@@ -0,0 +1,61 @@
+#ifndef ICU4XCodePointMapData8_H
+#define ICU4XCodePointMapData8_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCodePointMapData8 ICU4XCodePointMapData8;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "CodePointRangeIterator.h"
+#include "ICU4XCodePointSetData.h"
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+uint8_t ICU4XCodePointMapData8_get(const ICU4XCodePointMapData8* self, char32_t cp);
+
+uint8_t ICU4XCodePointMapData8_get32(const ICU4XCodePointMapData8* self, uint32_t cp);
+
+uint32_t ICU4XCodePointMapData8_general_category_to_mask(uint8_t gc);
+
+CodePointRangeIterator* ICU4XCodePointMapData8_iter_ranges_for_value(const ICU4XCodePointMapData8* self, uint8_t value);
+
+CodePointRangeIterator* ICU4XCodePointMapData8_iter_ranges_for_value_complemented(const ICU4XCodePointMapData8* self, uint8_t value);
+
+CodePointRangeIterator* ICU4XCodePointMapData8_iter_ranges_for_mask(const ICU4XCodePointMapData8* self, uint32_t mask);
+
+ICU4XCodePointSetData* ICU4XCodePointMapData8_get_set_for_value(const ICU4XCodePointMapData8* self, uint8_t value);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_general_category(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_bidi_class(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_east_asian_width(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_indic_syllabic_category(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_line_break(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_try_grapheme_cluster_break(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_word_break(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_sentence_break(const ICU4XDataProvider* provider);
+void ICU4XCodePointMapData8_destroy(ICU4XCodePointMapData8* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCodePointSetBuilder.h b/intl/icu_capi/c/include/ICU4XCodePointSetBuilder.h
new file mode 100644
index 0000000000..d36697c7cf
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCodePointSetBuilder.h
@@ -0,0 +1,64 @@
+#ifndef ICU4XCodePointSetBuilder_H
+#define ICU4XCodePointSetBuilder_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCodePointSetBuilder ICU4XCodePointSetBuilder;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XCodePointSetData.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+ICU4XCodePointSetBuilder* ICU4XCodePointSetBuilder_create();
+
+ICU4XCodePointSetData* ICU4XCodePointSetBuilder_build(ICU4XCodePointSetBuilder* self);
+
+void ICU4XCodePointSetBuilder_complement(ICU4XCodePointSetBuilder* self);
+
+bool ICU4XCodePointSetBuilder_is_empty(const ICU4XCodePointSetBuilder* self);
+
+void ICU4XCodePointSetBuilder_add_char(ICU4XCodePointSetBuilder* self, char32_t ch);
+
+void ICU4XCodePointSetBuilder_add_u32(ICU4XCodePointSetBuilder* self, uint32_t ch);
+
+void ICU4XCodePointSetBuilder_add_inclusive_range(ICU4XCodePointSetBuilder* self, char32_t start, char32_t end);
+
+void ICU4XCodePointSetBuilder_add_inclusive_range_u32(ICU4XCodePointSetBuilder* self, uint32_t start, uint32_t end);
+
+void ICU4XCodePointSetBuilder_add_set(ICU4XCodePointSetBuilder* self, const ICU4XCodePointSetData* data);
+
+void ICU4XCodePointSetBuilder_remove_char(ICU4XCodePointSetBuilder* self, char32_t ch);
+
+void ICU4XCodePointSetBuilder_remove_inclusive_range(ICU4XCodePointSetBuilder* self, char32_t start, char32_t end);
+
+void ICU4XCodePointSetBuilder_remove_set(ICU4XCodePointSetBuilder* self, const ICU4XCodePointSetData* data);
+
+void ICU4XCodePointSetBuilder_retain_char(ICU4XCodePointSetBuilder* self, char32_t ch);
+
+void ICU4XCodePointSetBuilder_retain_inclusive_range(ICU4XCodePointSetBuilder* self, char32_t start, char32_t end);
+
+void ICU4XCodePointSetBuilder_retain_set(ICU4XCodePointSetBuilder* self, const ICU4XCodePointSetData* data);
+
+void ICU4XCodePointSetBuilder_complement_char(ICU4XCodePointSetBuilder* self, char32_t ch);
+
+void ICU4XCodePointSetBuilder_complement_inclusive_range(ICU4XCodePointSetBuilder* self, char32_t start, char32_t end);
+
+void ICU4XCodePointSetBuilder_complement_set(ICU4XCodePointSetBuilder* self, const ICU4XCodePointSetData* data);
+void ICU4XCodePointSetBuilder_destroy(ICU4XCodePointSetBuilder* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCodePointSetData.h b/intl/icu_capi/c/include/ICU4XCodePointSetData.h
new file mode 100644
index 0000000000..10356e90b7
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCodePointSetData.h
@@ -0,0 +1,172 @@
+#ifndef ICU4XCodePointSetData_H
+#define ICU4XCodePointSetData_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCodePointSetData ICU4XCodePointSetData;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "CodePointRangeIterator.h"
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCodePointSetData_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+bool ICU4XCodePointSetData_contains(const ICU4XCodePointSetData* self, char32_t cp);
+
+bool ICU4XCodePointSetData_contains32(const ICU4XCodePointSetData* self, uint32_t cp);
+
+CodePointRangeIterator* ICU4XCodePointSetData_iter_ranges(const ICU4XCodePointSetData* self);
+
+CodePointRangeIterator* ICU4XCodePointSetData_iter_ranges_complemented(const ICU4XCodePointSetData* self);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_for_general_category_group(const ICU4XDataProvider* provider, uint32_t group);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ascii_hex_digit(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_alnum(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_alphabetic(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_bidi_control(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_bidi_mirrored(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_blank(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_cased(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_case_ignorable(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_full_composition_exclusion(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_casefolded(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_casemapped(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_nfkc_casefolded(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_lowercased(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_titlecased(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_uppercased(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_dash(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_deprecated(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_default_ignorable_code_point(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_diacritic(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_modifier_base(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_component(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_modifier(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_presentation(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_extender(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_extended_pictographic(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_graph(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_grapheme_base(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_grapheme_extend(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_grapheme_link(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_hex_digit(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_hyphen(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_id_continue(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ideographic(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_id_start(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ids_binary_operator(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ids_trinary_operator(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_join_control(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_logical_order_exception(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_lowercase(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_math(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_noncharacter_code_point(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfc_inert(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfd_inert(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfkc_inert(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfkd_inert(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_pattern_syntax(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_pattern_white_space(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_prepended_concatenation_mark(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_print(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_quotation_mark(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_radical(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_regional_indicator(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_soft_dotted(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_segment_starter(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_case_sensitive(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_sentence_terminal(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_terminal_punctuation(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_unified_ideograph(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_uppercase(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_variation_selector(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_white_space(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_xdigit(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_xid_continue(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_xid_start(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_for_ecma262(const ICU4XDataProvider* provider, const char* property_name_data, size_t property_name_len);
+void ICU4XCodePointSetData_destroy(ICU4XCodePointSetData* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCollator.h b/intl/icu_capi/c/include/ICU4XCollator.h
new file mode 100644
index 0000000000..973c2cedd9
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCollator.h
@@ -0,0 +1,40 @@
+#ifndef ICU4XCollator_H
+#define ICU4XCollator_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCollator ICU4XCollator;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XCollatorOptionsV1.h"
+#include "diplomat_result_box_ICU4XCollator_ICU4XError.h"
+#include "ICU4XOrdering.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCollator_ICU4XError ICU4XCollator_create_v1(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XCollatorOptionsV1 options);
+
+ICU4XOrdering ICU4XCollator_compare(const ICU4XCollator* self, const char* left_data, size_t left_len, const char* right_data, size_t right_len);
+
+ICU4XOrdering ICU4XCollator_compare_valid_utf8(const ICU4XCollator* self, const char* left_data, size_t left_len, const char* right_data, size_t right_len);
+
+ICU4XOrdering ICU4XCollator_compare_utf16(const ICU4XCollator* self, const uint16_t* left_data, size_t left_len, const uint16_t* right_data, size_t right_len);
+void ICU4XCollator_destroy(ICU4XCollator* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCollatorAlternateHandling.h b/intl/icu_capi/c/include/ICU4XCollatorAlternateHandling.h
new file mode 100644
index 0000000000..dfc3d595eb
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCollatorAlternateHandling.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XCollatorAlternateHandling_H
+#define ICU4XCollatorAlternateHandling_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XCollatorAlternateHandling {
+ ICU4XCollatorAlternateHandling_Auto = 0,
+ ICU4XCollatorAlternateHandling_NonIgnorable = 1,
+ ICU4XCollatorAlternateHandling_Shifted = 2,
+} ICU4XCollatorAlternateHandling;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorAlternateHandling_destroy(ICU4XCollatorAlternateHandling* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCollatorBackwardSecondLevel.h b/intl/icu_capi/c/include/ICU4XCollatorBackwardSecondLevel.h
new file mode 100644
index 0000000000..659f9b2f10
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCollatorBackwardSecondLevel.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XCollatorBackwardSecondLevel_H
+#define ICU4XCollatorBackwardSecondLevel_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XCollatorBackwardSecondLevel {
+ ICU4XCollatorBackwardSecondLevel_Auto = 0,
+ ICU4XCollatorBackwardSecondLevel_Off = 1,
+ ICU4XCollatorBackwardSecondLevel_On = 2,
+} ICU4XCollatorBackwardSecondLevel;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorBackwardSecondLevel_destroy(ICU4XCollatorBackwardSecondLevel* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCollatorCaseFirst.h b/intl/icu_capi/c/include/ICU4XCollatorCaseFirst.h
new file mode 100644
index 0000000000..c01eb216d0
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCollatorCaseFirst.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XCollatorCaseFirst_H
+#define ICU4XCollatorCaseFirst_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XCollatorCaseFirst {
+ ICU4XCollatorCaseFirst_Auto = 0,
+ ICU4XCollatorCaseFirst_Off = 1,
+ ICU4XCollatorCaseFirst_LowerFirst = 2,
+ ICU4XCollatorCaseFirst_UpperFirst = 3,
+} ICU4XCollatorCaseFirst;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorCaseFirst_destroy(ICU4XCollatorCaseFirst* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCollatorCaseLevel.h b/intl/icu_capi/c/include/ICU4XCollatorCaseLevel.h
new file mode 100644
index 0000000000..cbf6865967
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCollatorCaseLevel.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XCollatorCaseLevel_H
+#define ICU4XCollatorCaseLevel_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XCollatorCaseLevel {
+ ICU4XCollatorCaseLevel_Auto = 0,
+ ICU4XCollatorCaseLevel_Off = 1,
+ ICU4XCollatorCaseLevel_On = 2,
+} ICU4XCollatorCaseLevel;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorCaseLevel_destroy(ICU4XCollatorCaseLevel* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCollatorMaxVariable.h b/intl/icu_capi/c/include/ICU4XCollatorMaxVariable.h
new file mode 100644
index 0000000000..0e5a3a516f
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCollatorMaxVariable.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XCollatorMaxVariable_H
+#define ICU4XCollatorMaxVariable_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XCollatorMaxVariable {
+ ICU4XCollatorMaxVariable_Auto = 0,
+ ICU4XCollatorMaxVariable_Space = 1,
+ ICU4XCollatorMaxVariable_Punctuation = 2,
+ ICU4XCollatorMaxVariable_Symbol = 3,
+ ICU4XCollatorMaxVariable_Currency = 4,
+} ICU4XCollatorMaxVariable;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorMaxVariable_destroy(ICU4XCollatorMaxVariable* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCollatorNumeric.h b/intl/icu_capi/c/include/ICU4XCollatorNumeric.h
new file mode 100644
index 0000000000..4dd2ec0408
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCollatorNumeric.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XCollatorNumeric_H
+#define ICU4XCollatorNumeric_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XCollatorNumeric {
+ ICU4XCollatorNumeric_Auto = 0,
+ ICU4XCollatorNumeric_Off = 1,
+ ICU4XCollatorNumeric_On = 2,
+} ICU4XCollatorNumeric;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorNumeric_destroy(ICU4XCollatorNumeric* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCollatorOptionsV1.h b/intl/icu_capi/c/include/ICU4XCollatorOptionsV1.h
new file mode 100644
index 0000000000..dc73557efe
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCollatorOptionsV1.h
@@ -0,0 +1,50 @@
+#ifndef ICU4XCollatorOptionsV1_H
+#define ICU4XCollatorOptionsV1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XCollatorStrength.h"
+#include "ICU4XCollatorAlternateHandling.h"
+#include "ICU4XCollatorCaseFirst.h"
+#include "ICU4XCollatorMaxVariable.h"
+#include "ICU4XCollatorCaseLevel.h"
+#include "ICU4XCollatorNumeric.h"
+#include "ICU4XCollatorBackwardSecondLevel.h"
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCollatorOptionsV1 {
+ ICU4XCollatorStrength strength;
+ ICU4XCollatorAlternateHandling alternate_handling;
+ ICU4XCollatorCaseFirst case_first;
+ ICU4XCollatorMaxVariable max_variable;
+ ICU4XCollatorCaseLevel case_level;
+ ICU4XCollatorNumeric numeric;
+ ICU4XCollatorBackwardSecondLevel backward_second_level;
+} ICU4XCollatorOptionsV1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XCollatorStrength.h"
+#include "ICU4XCollatorAlternateHandling.h"
+#include "ICU4XCollatorCaseFirst.h"
+#include "ICU4XCollatorMaxVariable.h"
+#include "ICU4XCollatorCaseLevel.h"
+#include "ICU4XCollatorNumeric.h"
+#include "ICU4XCollatorBackwardSecondLevel.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorOptionsV1_destroy(ICU4XCollatorOptionsV1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCollatorStrength.h b/intl/icu_capi/c/include/ICU4XCollatorStrength.h
new file mode 100644
index 0000000000..f230214feb
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCollatorStrength.h
@@ -0,0 +1,35 @@
+#ifndef ICU4XCollatorStrength_H
+#define ICU4XCollatorStrength_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XCollatorStrength {
+ ICU4XCollatorStrength_Auto = 0,
+ ICU4XCollatorStrength_Primary = 1,
+ ICU4XCollatorStrength_Secondary = 2,
+ ICU4XCollatorStrength_Tertiary = 3,
+ ICU4XCollatorStrength_Quaternary = 4,
+ ICU4XCollatorStrength_Identical = 5,
+} ICU4XCollatorStrength;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorStrength_destroy(ICU4XCollatorStrength* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XComposingNormalizer.h b/intl/icu_capi/c/include/ICU4XComposingNormalizer.h
new file mode 100644
index 0000000000..1798af0d8e
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XComposingNormalizer.h
@@ -0,0 +1,38 @@
+#ifndef ICU4XComposingNormalizer_H
+#define ICU4XComposingNormalizer_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XComposingNormalizer ICU4XComposingNormalizer;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XComposingNormalizer_ICU4XError ICU4XComposingNormalizer_create_nfc(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XComposingNormalizer_ICU4XError ICU4XComposingNormalizer_create_nfkc(const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XComposingNormalizer_normalize(const ICU4XComposingNormalizer* self, const char* s_data, size_t s_len, DiplomatWriteable* write);
+
+bool ICU4XComposingNormalizer_is_normalized(const ICU4XComposingNormalizer* self, const char* s_data, size_t s_len);
+void ICU4XComposingNormalizer_destroy(ICU4XComposingNormalizer* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XCustomTimeZone.h b/intl/icu_capi/c/include/ICU4XCustomTimeZone.h
new file mode 100644
index 0000000000..422b7fa382
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XCustomTimeZone.h
@@ -0,0 +1,84 @@
+#ifndef ICU4XCustomTimeZone_H
+#define ICU4XCustomTimeZone_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCustomTimeZone ICU4XCustomTimeZone;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "diplomat_result_int32_t_ICU4XError.h"
+#include "diplomat_result_bool_ICU4XError.h"
+#include "ICU4XIanaToBcp47Mapper.h"
+#include "ICU4XMetazoneCalculator.h"
+#include "ICU4XIsoDateTime.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCustomTimeZone_ICU4XError ICU4XCustomTimeZone_create_from_string(const char* s_data, size_t s_len);
+
+ICU4XCustomTimeZone* ICU4XCustomTimeZone_create_empty();
+
+ICU4XCustomTimeZone* ICU4XCustomTimeZone_create_utc();
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_gmt_offset_seconds(ICU4XCustomTimeZone* self, int32_t offset_seconds);
+
+void ICU4XCustomTimeZone_clear_gmt_offset(ICU4XCustomTimeZone* self);
+
+diplomat_result_int32_t_ICU4XError ICU4XCustomTimeZone_gmt_offset_seconds(const ICU4XCustomTimeZone* self);
+
+diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_is_gmt_offset_positive(const ICU4XCustomTimeZone* self);
+
+diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_is_gmt_offset_zero(const ICU4XCustomTimeZone* self);
+
+diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_gmt_offset_has_minutes(const ICU4XCustomTimeZone* self);
+
+diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_gmt_offset_has_seconds(const ICU4XCustomTimeZone* self);
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_time_zone_id(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len);
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_iana_time_zone_id(ICU4XCustomTimeZone* self, const ICU4XIanaToBcp47Mapper* mapper, const char* id_data, size_t id_len);
+
+void ICU4XCustomTimeZone_clear_time_zone_id(ICU4XCustomTimeZone* self);
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_time_zone_id(const ICU4XCustomTimeZone* self, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_metazone_id(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len);
+
+void ICU4XCustomTimeZone_clear_metazone_id(ICU4XCustomTimeZone* self);
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_metazone_id(const ICU4XCustomTimeZone* self, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_zone_variant(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len);
+
+void ICU4XCustomTimeZone_clear_zone_variant(ICU4XCustomTimeZone* self);
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_zone_variant(const ICU4XCustomTimeZone* self, DiplomatWriteable* write);
+
+void ICU4XCustomTimeZone_set_standard_time(ICU4XCustomTimeZone* self);
+
+void ICU4XCustomTimeZone_set_daylight_time(ICU4XCustomTimeZone* self);
+
+diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_is_standard_time(const ICU4XCustomTimeZone* self);
+
+diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_is_daylight_time(const ICU4XCustomTimeZone* self);
+
+void ICU4XCustomTimeZone_maybe_calculate_metazone(ICU4XCustomTimeZone* self, const ICU4XMetazoneCalculator* metazone_calculator, const ICU4XIsoDateTime* local_datetime);
+void ICU4XCustomTimeZone_destroy(ICU4XCustomTimeZone* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XDataProvider.h b/intl/icu_capi/c/include/ICU4XDataProvider.h
new file mode 100644
index 0000000000..8d7700e224
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XDataProvider.h
@@ -0,0 +1,48 @@
+#ifndef ICU4XDataProvider_H
+#define ICU4XDataProvider_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDataProvider ICU4XDataProvider;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XDataProvider_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XLocaleFallbacker.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+ICU4XDataProvider* ICU4XDataProvider_create_compiled();
+
+diplomat_result_box_ICU4XDataProvider_ICU4XError ICU4XDataProvider_create_fs(const char* path_data, size_t path_len);
+
+ICU4XDataProvider* ICU4XDataProvider_create_test();
+
+diplomat_result_box_ICU4XDataProvider_ICU4XError ICU4XDataProvider_create_from_byte_slice(const uint8_t* blob_data, size_t blob_len);
+
+ICU4XDataProvider* ICU4XDataProvider_create_empty();
+
+diplomat_result_void_ICU4XError ICU4XDataProvider_fork_by_key(ICU4XDataProvider* self, ICU4XDataProvider* other);
+
+diplomat_result_void_ICU4XError ICU4XDataProvider_fork_by_locale(ICU4XDataProvider* self, ICU4XDataProvider* other);
+
+diplomat_result_void_ICU4XError ICU4XDataProvider_enable_locale_fallback(ICU4XDataProvider* self);
+
+diplomat_result_void_ICU4XError ICU4XDataProvider_enable_locale_fallback_with(ICU4XDataProvider* self, const ICU4XLocaleFallbacker* fallbacker);
+void ICU4XDataProvider_destroy(ICU4XDataProvider* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XDataStruct.h b/intl/icu_capi/c/include/ICU4XDataStruct.h
new file mode 100644
index 0000000000..a07ff02fb8
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XDataStruct.h
@@ -0,0 +1,30 @@
+#ifndef ICU4XDataStruct_H
+#define ICU4XDataStruct_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDataStruct ICU4XDataStruct;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XDataStruct_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XDataStruct_ICU4XError ICU4XDataStruct_create_decimal_symbols_v1(const char* plus_sign_prefix_data, size_t plus_sign_prefix_len, const char* plus_sign_suffix_data, size_t plus_sign_suffix_len, const char* minus_sign_prefix_data, size_t minus_sign_prefix_len, const char* minus_sign_suffix_data, size_t minus_sign_suffix_len, const char* decimal_separator_data, size_t decimal_separator_len, const char* grouping_separator_data, size_t grouping_separator_len, uint8_t primary_group_size, uint8_t secondary_group_size, uint8_t min_group_size, const char32_t* digits_data, size_t digits_len);
+void ICU4XDataStruct_destroy(ICU4XDataStruct* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XDate.h b/intl/icu_capi/c/include/ICU4XDate.h
new file mode 100644
index 0000000000..f5a0c06de6
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XDate.h
@@ -0,0 +1,66 @@
+#ifndef ICU4XDate_H
+#define ICU4XDate_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDate ICU4XDate;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XCalendar.h"
+#include "diplomat_result_box_ICU4XDate_ICU4XError.h"
+#include "ICU4XIsoDate.h"
+#include "ICU4XIsoWeekday.h"
+#include "ICU4XWeekCalculator.h"
+#include "diplomat_result_ICU4XWeekOf_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XDate_ICU4XError ICU4XDate_create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, const ICU4XCalendar* calendar);
+
+diplomat_result_box_ICU4XDate_ICU4XError ICU4XDate_create_from_codes_in_calendar(const char* era_code_data, size_t era_code_len, int32_t year, const char* month_code_data, size_t month_code_len, uint8_t day, const ICU4XCalendar* calendar);
+
+ICU4XDate* ICU4XDate_to_calendar(const ICU4XDate* self, const ICU4XCalendar* calendar);
+
+ICU4XIsoDate* ICU4XDate_to_iso(const ICU4XDate* self);
+
+uint32_t ICU4XDate_day_of_month(const ICU4XDate* self);
+
+ICU4XIsoWeekday ICU4XDate_day_of_week(const ICU4XDate* self);
+
+uint32_t ICU4XDate_week_of_month(const ICU4XDate* self, ICU4XIsoWeekday first_weekday);
+
+diplomat_result_ICU4XWeekOf_ICU4XError ICU4XDate_week_of_year(const ICU4XDate* self, const ICU4XWeekCalculator* calculator);
+
+uint32_t ICU4XDate_ordinal_month(const ICU4XDate* self);
+
+diplomat_result_void_ICU4XError ICU4XDate_month_code(const ICU4XDate* self, DiplomatWriteable* write);
+
+int32_t ICU4XDate_year_in_era(const ICU4XDate* self);
+
+diplomat_result_void_ICU4XError ICU4XDate_era(const ICU4XDate* self, DiplomatWriteable* write);
+
+uint8_t ICU4XDate_months_in_year(const ICU4XDate* self);
+
+uint8_t ICU4XDate_days_in_month(const ICU4XDate* self);
+
+uint16_t ICU4XDate_days_in_year(const ICU4XDate* self);
+
+ICU4XCalendar* ICU4XDate_calendar(const ICU4XDate* self);
+void ICU4XDate_destroy(ICU4XDate* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XDateFormatter.h b/intl/icu_capi/c/include/ICU4XDateFormatter.h
new file mode 100644
index 0000000000..8dc5316e47
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XDateFormatter.h
@@ -0,0 +1,46 @@
+#ifndef ICU4XDateFormatter_H
+#define ICU4XDateFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDateFormatter ICU4XDateFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XDateLength.h"
+#include "diplomat_result_box_ICU4XDateFormatter_ICU4XError.h"
+#include "ICU4XDate.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XIsoDate.h"
+#include "ICU4XDateTime.h"
+#include "ICU4XIsoDateTime.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XDateFormatter_ICU4XError ICU4XDateFormatter_create_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length);
+
+diplomat_result_void_ICU4XError ICU4XDateFormatter_format_date(const ICU4XDateFormatter* self, const ICU4XDate* value, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XDateFormatter_format_iso_date(const ICU4XDateFormatter* self, const ICU4XIsoDate* value, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XDateFormatter_format_datetime(const ICU4XDateFormatter* self, const ICU4XDateTime* value, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XDateFormatter_format_iso_datetime(const ICU4XDateFormatter* self, const ICU4XIsoDateTime* value, DiplomatWriteable* write);
+void ICU4XDateFormatter_destroy(ICU4XDateFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XDateLength.h b/intl/icu_capi/c/include/ICU4XDateLength.h
new file mode 100644
index 0000000000..b2ca918233
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XDateLength.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XDateLength_H
+#define ICU4XDateLength_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XDateLength {
+ ICU4XDateLength_Full = 0,
+ ICU4XDateLength_Long = 1,
+ ICU4XDateLength_Medium = 2,
+ ICU4XDateLength_Short = 3,
+} ICU4XDateLength;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XDateLength_destroy(ICU4XDateLength* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XDateTime.h b/intl/icu_capi/c/include/ICU4XDateTime.h
new file mode 100644
index 0000000000..adb0a19798
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XDateTime.h
@@ -0,0 +1,82 @@
+#ifndef ICU4XDateTime_H
+#define ICU4XDateTime_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDateTime ICU4XDateTime;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XCalendar.h"
+#include "diplomat_result_box_ICU4XDateTime_ICU4XError.h"
+#include "ICU4XDate.h"
+#include "ICU4XTime.h"
+#include "ICU4XIsoDateTime.h"
+#include "ICU4XIsoWeekday.h"
+#include "ICU4XWeekCalculator.h"
+#include "diplomat_result_ICU4XWeekOf_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XDateTime_ICU4XError ICU4XDateTime_create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar* calendar);
+
+diplomat_result_box_ICU4XDateTime_ICU4XError ICU4XDateTime_create_from_codes_in_calendar(const char* era_code_data, size_t era_code_len, int32_t year, const char* month_code_data, size_t month_code_len, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar* calendar);
+
+ICU4XDateTime* ICU4XDateTime_create_from_date_and_time(const ICU4XDate* date, const ICU4XTime* time);
+
+ICU4XDate* ICU4XDateTime_date(const ICU4XDateTime* self);
+
+ICU4XTime* ICU4XDateTime_time(const ICU4XDateTime* self);
+
+ICU4XIsoDateTime* ICU4XDateTime_to_iso(const ICU4XDateTime* self);
+
+ICU4XDateTime* ICU4XDateTime_to_calendar(const ICU4XDateTime* self, const ICU4XCalendar* calendar);
+
+uint8_t ICU4XDateTime_hour(const ICU4XDateTime* self);
+
+uint8_t ICU4XDateTime_minute(const ICU4XDateTime* self);
+
+uint8_t ICU4XDateTime_second(const ICU4XDateTime* self);
+
+uint32_t ICU4XDateTime_nanosecond(const ICU4XDateTime* self);
+
+uint32_t ICU4XDateTime_day_of_month(const ICU4XDateTime* self);
+
+ICU4XIsoWeekday ICU4XDateTime_day_of_week(const ICU4XDateTime* self);
+
+uint32_t ICU4XDateTime_week_of_month(const ICU4XDateTime* self, ICU4XIsoWeekday first_weekday);
+
+diplomat_result_ICU4XWeekOf_ICU4XError ICU4XDateTime_week_of_year(const ICU4XDateTime* self, const ICU4XWeekCalculator* calculator);
+
+uint32_t ICU4XDateTime_ordinal_month(const ICU4XDateTime* self);
+
+diplomat_result_void_ICU4XError ICU4XDateTime_month_code(const ICU4XDateTime* self, DiplomatWriteable* write);
+
+int32_t ICU4XDateTime_year_in_era(const ICU4XDateTime* self);
+
+diplomat_result_void_ICU4XError ICU4XDateTime_era(const ICU4XDateTime* self, DiplomatWriteable* write);
+
+uint8_t ICU4XDateTime_months_in_year(const ICU4XDateTime* self);
+
+uint8_t ICU4XDateTime_days_in_month(const ICU4XDateTime* self);
+
+uint16_t ICU4XDateTime_days_in_year(const ICU4XDateTime* self);
+
+ICU4XCalendar* ICU4XDateTime_calendar(const ICU4XDateTime* self);
+void ICU4XDateTime_destroy(ICU4XDateTime* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XDateTimeFormatter.h b/intl/icu_capi/c/include/ICU4XDateTimeFormatter.h
new file mode 100644
index 0000000000..5f0af4ddba
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XDateTimeFormatter.h
@@ -0,0 +1,41 @@
+#ifndef ICU4XDateTimeFormatter_H
+#define ICU4XDateTimeFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDateTimeFormatter ICU4XDateTimeFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XDateLength.h"
+#include "ICU4XTimeLength.h"
+#include "diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError.h"
+#include "ICU4XDateTime.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XIsoDateTime.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError ICU4XDateTimeFormatter_create_with_lengths(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length);
+
+diplomat_result_void_ICU4XError ICU4XDateTimeFormatter_format_datetime(const ICU4XDateTimeFormatter* self, const ICU4XDateTime* value, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XDateTimeFormatter_format_iso_datetime(const ICU4XDateTimeFormatter* self, const ICU4XIsoDateTime* value, DiplomatWriteable* write);
+void ICU4XDateTimeFormatter_destroy(ICU4XDateTimeFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XDecomposed.h b/intl/icu_capi/c/include/ICU4XDecomposed.h
new file mode 100644
index 0000000000..3f287e8192
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XDecomposed.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XDecomposed_H
+#define ICU4XDecomposed_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDecomposed {
+ char32_t first;
+ char32_t second;
+} ICU4XDecomposed;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XDecomposed_destroy(ICU4XDecomposed* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XDecomposingNormalizer.h b/intl/icu_capi/c/include/ICU4XDecomposingNormalizer.h
new file mode 100644
index 0000000000..f542f7a730
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XDecomposingNormalizer.h
@@ -0,0 +1,38 @@
+#ifndef ICU4XDecomposingNormalizer_H
+#define ICU4XDecomposingNormalizer_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDecomposingNormalizer ICU4XDecomposingNormalizer;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError ICU4XDecomposingNormalizer_create_nfd(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError ICU4XDecomposingNormalizer_create_nfkd(const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XDecomposingNormalizer_normalize(const ICU4XDecomposingNormalizer* self, const char* s_data, size_t s_len, DiplomatWriteable* write);
+
+bool ICU4XDecomposingNormalizer_is_normalized(const ICU4XDecomposingNormalizer* self, const char* s_data, size_t s_len);
+void ICU4XDecomposingNormalizer_destroy(ICU4XDecomposingNormalizer* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XDisplayNamesFallback.h b/intl/icu_capi/c/include/ICU4XDisplayNamesFallback.h
new file mode 100644
index 0000000000..085fc8de5d
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XDisplayNamesFallback.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XDisplayNamesFallback_H
+#define ICU4XDisplayNamesFallback_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XDisplayNamesFallback {
+ ICU4XDisplayNamesFallback_Code = 0,
+ ICU4XDisplayNamesFallback_None = 1,
+} ICU4XDisplayNamesFallback;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XDisplayNamesFallback_destroy(ICU4XDisplayNamesFallback* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XDisplayNamesOptionsV1.h b/intl/icu_capi/c/include/ICU4XDisplayNamesOptionsV1.h
new file mode 100644
index 0000000000..e998cde0e7
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XDisplayNamesOptionsV1.h
@@ -0,0 +1,38 @@
+#ifndef ICU4XDisplayNamesOptionsV1_H
+#define ICU4XDisplayNamesOptionsV1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XDisplayNamesStyle.h"
+#include "ICU4XDisplayNamesFallback.h"
+#include "ICU4XLanguageDisplay.h"
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDisplayNamesOptionsV1 {
+ ICU4XDisplayNamesStyle style;
+ ICU4XDisplayNamesFallback fallback;
+ ICU4XLanguageDisplay language_display;
+} ICU4XDisplayNamesOptionsV1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDisplayNamesStyle.h"
+#include "ICU4XDisplayNamesFallback.h"
+#include "ICU4XLanguageDisplay.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XDisplayNamesOptionsV1_destroy(ICU4XDisplayNamesOptionsV1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XDisplayNamesStyle.h b/intl/icu_capi/c/include/ICU4XDisplayNamesStyle.h
new file mode 100644
index 0000000000..048da455da
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XDisplayNamesStyle.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XDisplayNamesStyle_H
+#define ICU4XDisplayNamesStyle_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XDisplayNamesStyle {
+ ICU4XDisplayNamesStyle_Auto = 0,
+ ICU4XDisplayNamesStyle_Narrow = 1,
+ ICU4XDisplayNamesStyle_Short = 2,
+ ICU4XDisplayNamesStyle_Long = 3,
+ ICU4XDisplayNamesStyle_Menu = 4,
+} ICU4XDisplayNamesStyle;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XDisplayNamesStyle_destroy(ICU4XDisplayNamesStyle* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XError.h b/intl/icu_capi/c/include/ICU4XError.h
new file mode 100644
index 0000000000..8836275ac5
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XError.h
@@ -0,0 +1,84 @@
+#ifndef ICU4XError_H
+#define ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XError {
+ ICU4XError_UnknownError = 0,
+ ICU4XError_WriteableError = 1,
+ ICU4XError_OutOfBoundsError = 2,
+ ICU4XError_DataMissingDataKeyError = 256,
+ ICU4XError_DataMissingVariantError = 257,
+ ICU4XError_DataMissingLocaleError = 258,
+ ICU4XError_DataNeedsVariantError = 259,
+ ICU4XError_DataNeedsLocaleError = 260,
+ ICU4XError_DataExtraneousLocaleError = 261,
+ ICU4XError_DataFilteredResourceError = 262,
+ ICU4XError_DataMismatchedTypeError = 263,
+ ICU4XError_DataMissingPayloadError = 264,
+ ICU4XError_DataInvalidStateError = 265,
+ ICU4XError_DataCustomError = 266,
+ ICU4XError_DataIoError = 267,
+ ICU4XError_DataUnavailableBufferFormatError = 268,
+ ICU4XError_DataMismatchedAnyBufferError = 269,
+ ICU4XError_LocaleUndefinedSubtagError = 512,
+ ICU4XError_LocaleParserLanguageError = 513,
+ ICU4XError_LocaleParserSubtagError = 514,
+ ICU4XError_LocaleParserExtensionError = 515,
+ ICU4XError_DataStructValidityError = 768,
+ ICU4XError_PropertyUnknownScriptIdError = 1024,
+ ICU4XError_PropertyUnknownGeneralCategoryGroupError = 1025,
+ ICU4XError_PropertyUnexpectedPropertyNameError = 1026,
+ ICU4XError_FixedDecimalLimitError = 1280,
+ ICU4XError_FixedDecimalSyntaxError = 1281,
+ ICU4XError_PluralsParserError = 1536,
+ ICU4XError_CalendarParseError = 1792,
+ ICU4XError_CalendarOverflowError = 1793,
+ ICU4XError_CalendarUnderflowError = 1794,
+ ICU4XError_CalendarOutOfRangeError = 1795,
+ ICU4XError_CalendarUnknownEraError = 1796,
+ ICU4XError_CalendarUnknownMonthCodeError = 1797,
+ ICU4XError_CalendarMissingInputError = 1798,
+ ICU4XError_CalendarUnknownKindError = 1799,
+ ICU4XError_CalendarMissingError = 1800,
+ ICU4XError_DateTimePatternError = 2048,
+ ICU4XError_DateTimeMissingInputFieldError = 2049,
+ ICU4XError_DateTimeSkeletonError = 2050,
+ ICU4XError_DateTimeUnsupportedFieldError = 2051,
+ ICU4XError_DateTimeUnsupportedOptionsError = 2052,
+ ICU4XError_DateTimeMissingWeekdaySymbolError = 2053,
+ ICU4XError_DateTimeMissingMonthSymbolError = 2054,
+ ICU4XError_DateTimeFixedDecimalError = 2055,
+ ICU4XError_DateTimeMismatchedCalendarError = 2056,
+ ICU4XError_TinyStrTooLargeError = 2304,
+ ICU4XError_TinyStrContainsNullError = 2305,
+ ICU4XError_TinyStrNonAsciiError = 2306,
+ ICU4XError_TimeZoneOffsetOutOfBoundsError = 2560,
+ ICU4XError_TimeZoneInvalidOffsetError = 2561,
+ ICU4XError_TimeZoneMissingInputError = 2562,
+ ICU4XError_TimeZoneInvalidIdError = 2563,
+ ICU4XError_NormalizerFutureExtensionError = 2816,
+ ICU4XError_NormalizerValidationError = 2817,
+} ICU4XError;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XError_destroy(ICU4XError* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XFixedDecimal.h b/intl/icu_capi/c/include/ICU4XFixedDecimal.h
new file mode 100644
index 0000000000..361294b687
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XFixedDecimal.h
@@ -0,0 +1,101 @@
+#ifndef ICU4XFixedDecimal_H
+#define ICU4XFixedDecimal_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XFixedDecimal ICU4XFixedDecimal;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XFixedDecimal_ICU4XError.h"
+#include "ICU4XFixedDecimalSign.h"
+#include "ICU4XFixedDecimalSignDisplay.h"
+#include "diplomat_result_void_void.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_i32(int32_t v);
+
+ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_u32(uint32_t v);
+
+ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_i64(int64_t v);
+
+ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_u64(uint64_t v);
+
+diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_integer_precision(double f);
+
+diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_lower_magnitude(double f, int16_t magnitude);
+
+diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_significant_digits(double f, uint8_t digits);
+
+diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_floating_precision(double f);
+
+diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_string(const char* v_data, size_t v_len);
+
+uint8_t ICU4XFixedDecimal_digit_at(const ICU4XFixedDecimal* self, int16_t magnitude);
+
+int16_t ICU4XFixedDecimal_magnitude_start(const ICU4XFixedDecimal* self);
+
+int16_t ICU4XFixedDecimal_magnitude_end(const ICU4XFixedDecimal* self);
+
+int16_t ICU4XFixedDecimal_nonzero_magnitude_start(const ICU4XFixedDecimal* self);
+
+int16_t ICU4XFixedDecimal_nonzero_magnitude_end(const ICU4XFixedDecimal* self);
+
+bool ICU4XFixedDecimal_is_zero(const ICU4XFixedDecimal* self);
+
+void ICU4XFixedDecimal_multiply_pow10(ICU4XFixedDecimal* self, int16_t power);
+
+ICU4XFixedDecimalSign ICU4XFixedDecimal_sign(const ICU4XFixedDecimal* self);
+
+void ICU4XFixedDecimal_set_sign(ICU4XFixedDecimal* self, ICU4XFixedDecimalSign sign);
+
+void ICU4XFixedDecimal_apply_sign_display(ICU4XFixedDecimal* self, ICU4XFixedDecimalSignDisplay sign_display);
+
+void ICU4XFixedDecimal_trim_start(ICU4XFixedDecimal* self);
+
+void ICU4XFixedDecimal_trim_end(ICU4XFixedDecimal* self);
+
+void ICU4XFixedDecimal_pad_start(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_pad_end(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_set_max_position(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_trunc(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_half_trunc(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_expand(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_half_expand(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_ceil(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_half_ceil(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_floor(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_half_floor(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_half_even(ICU4XFixedDecimal* self, int16_t position);
+
+diplomat_result_void_void ICU4XFixedDecimal_concatenate_end(ICU4XFixedDecimal* self, ICU4XFixedDecimal* other);
+
+void ICU4XFixedDecimal_to_string(const ICU4XFixedDecimal* self, DiplomatWriteable* to);
+void ICU4XFixedDecimal_destroy(ICU4XFixedDecimal* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XFixedDecimalFormatter.h b/intl/icu_capi/c/include/ICU4XFixedDecimalFormatter.h
new file mode 100644
index 0000000000..aa1cfd6a48
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XFixedDecimalFormatter.h
@@ -0,0 +1,40 @@
+#ifndef ICU4XFixedDecimalFormatter_H
+#define ICU4XFixedDecimalFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XFixedDecimalFormatter ICU4XFixedDecimalFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XFixedDecimalGroupingStrategy.h"
+#include "diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.h"
+#include "ICU4XDataStruct.h"
+#include "ICU4XFixedDecimal.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError ICU4XFixedDecimalFormatter_create_with_grouping_strategy(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XFixedDecimalGroupingStrategy grouping_strategy);
+
+diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError ICU4XFixedDecimalFormatter_create_with_decimal_symbols_v1(const ICU4XDataStruct* data_struct, ICU4XFixedDecimalGroupingStrategy grouping_strategy);
+
+diplomat_result_void_ICU4XError ICU4XFixedDecimalFormatter_format(const ICU4XFixedDecimalFormatter* self, const ICU4XFixedDecimal* value, DiplomatWriteable* write);
+void ICU4XFixedDecimalFormatter_destroy(ICU4XFixedDecimalFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XFixedDecimalGroupingStrategy.h b/intl/icu_capi/c/include/ICU4XFixedDecimalGroupingStrategy.h
new file mode 100644
index 0000000000..7648892cc5
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XFixedDecimalGroupingStrategy.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XFixedDecimalGroupingStrategy_H
+#define ICU4XFixedDecimalGroupingStrategy_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XFixedDecimalGroupingStrategy {
+ ICU4XFixedDecimalGroupingStrategy_Auto = 0,
+ ICU4XFixedDecimalGroupingStrategy_Never = 1,
+ ICU4XFixedDecimalGroupingStrategy_Always = 2,
+ ICU4XFixedDecimalGroupingStrategy_Min2 = 3,
+} ICU4XFixedDecimalGroupingStrategy;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XFixedDecimalGroupingStrategy_destroy(ICU4XFixedDecimalGroupingStrategy* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XFixedDecimalSign.h b/intl/icu_capi/c/include/ICU4XFixedDecimalSign.h
new file mode 100644
index 0000000000..12fff3cf1c
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XFixedDecimalSign.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XFixedDecimalSign_H
+#define ICU4XFixedDecimalSign_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XFixedDecimalSign {
+ ICU4XFixedDecimalSign_None = 0,
+ ICU4XFixedDecimalSign_Negative = 1,
+ ICU4XFixedDecimalSign_Positive = 2,
+} ICU4XFixedDecimalSign;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XFixedDecimalSign_destroy(ICU4XFixedDecimalSign* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XFixedDecimalSignDisplay.h b/intl/icu_capi/c/include/ICU4XFixedDecimalSignDisplay.h
new file mode 100644
index 0000000000..8c2612e516
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XFixedDecimalSignDisplay.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XFixedDecimalSignDisplay_H
+#define ICU4XFixedDecimalSignDisplay_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XFixedDecimalSignDisplay {
+ ICU4XFixedDecimalSignDisplay_Auto = 0,
+ ICU4XFixedDecimalSignDisplay_Never = 1,
+ ICU4XFixedDecimalSignDisplay_Always = 2,
+ ICU4XFixedDecimalSignDisplay_ExceptZero = 3,
+ ICU4XFixedDecimalSignDisplay_Negative = 4,
+} ICU4XFixedDecimalSignDisplay;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XFixedDecimalSignDisplay_destroy(ICU4XFixedDecimalSignDisplay* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XGeneralCategoryNameToMaskMapper.h b/intl/icu_capi/c/include/ICU4XGeneralCategoryNameToMaskMapper.h
new file mode 100644
index 0000000000..3a4e2d4d13
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XGeneralCategoryNameToMaskMapper.h
@@ -0,0 +1,35 @@
+#ifndef ICU4XGeneralCategoryNameToMaskMapper_H
+#define ICU4XGeneralCategoryNameToMaskMapper_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGeneralCategoryNameToMaskMapper ICU4XGeneralCategoryNameToMaskMapper;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+uint32_t ICU4XGeneralCategoryNameToMaskMapper_get_strict(const ICU4XGeneralCategoryNameToMaskMapper* self, const char* name_data, size_t name_len);
+
+uint32_t ICU4XGeneralCategoryNameToMaskMapper_get_loose(const ICU4XGeneralCategoryNameToMaskMapper* self, const char* name_data, size_t name_len);
+
+diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError ICU4XGeneralCategoryNameToMaskMapper_load(const ICU4XDataProvider* provider);
+void ICU4XGeneralCategoryNameToMaskMapper_destroy(ICU4XGeneralCategoryNameToMaskMapper* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorLatin1.h b/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorLatin1.h
new file mode 100644
index 0000000000..9e23489fd3
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorLatin1.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XGraphemeClusterBreakIteratorLatin1_H
+#define ICU4XGraphemeClusterBreakIteratorLatin1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGraphemeClusterBreakIteratorLatin1 ICU4XGraphemeClusterBreakIteratorLatin1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XGraphemeClusterBreakIteratorLatin1_next(ICU4XGraphemeClusterBreakIteratorLatin1* self);
+void ICU4XGraphemeClusterBreakIteratorLatin1_destroy(ICU4XGraphemeClusterBreakIteratorLatin1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorUtf16.h b/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorUtf16.h
new file mode 100644
index 0000000000..f0de4c0214
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorUtf16.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XGraphemeClusterBreakIteratorUtf16_H
+#define ICU4XGraphemeClusterBreakIteratorUtf16_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGraphemeClusterBreakIteratorUtf16 ICU4XGraphemeClusterBreakIteratorUtf16;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XGraphemeClusterBreakIteratorUtf16_next(ICU4XGraphemeClusterBreakIteratorUtf16* self);
+void ICU4XGraphemeClusterBreakIteratorUtf16_destroy(ICU4XGraphemeClusterBreakIteratorUtf16* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorUtf8.h b/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorUtf8.h
new file mode 100644
index 0000000000..331b17eac7
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorUtf8.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XGraphemeClusterBreakIteratorUtf8_H
+#define ICU4XGraphemeClusterBreakIteratorUtf8_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGraphemeClusterBreakIteratorUtf8 ICU4XGraphemeClusterBreakIteratorUtf8;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XGraphemeClusterBreakIteratorUtf8_next(ICU4XGraphemeClusterBreakIteratorUtf8* self);
+void ICU4XGraphemeClusterBreakIteratorUtf8_destroy(ICU4XGraphemeClusterBreakIteratorUtf8* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XGraphemeClusterSegmenter.h b/intl/icu_capi/c/include/ICU4XGraphemeClusterSegmenter.h
new file mode 100644
index 0000000000..1805090bfb
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XGraphemeClusterSegmenter.h
@@ -0,0 +1,40 @@
+#ifndef ICU4XGraphemeClusterSegmenter_H
+#define ICU4XGraphemeClusterSegmenter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGraphemeClusterSegmenter ICU4XGraphemeClusterSegmenter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.h"
+#include "ICU4XGraphemeClusterBreakIteratorUtf8.h"
+#include "ICU4XGraphemeClusterBreakIteratorUtf16.h"
+#include "ICU4XGraphemeClusterBreakIteratorLatin1.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError ICU4XGraphemeClusterSegmenter_create(const ICU4XDataProvider* provider);
+
+ICU4XGraphemeClusterBreakIteratorUtf8* ICU4XGraphemeClusterSegmenter_segment_utf8(const ICU4XGraphemeClusterSegmenter* self, const char* input_data, size_t input_len);
+
+ICU4XGraphemeClusterBreakIteratorUtf16* ICU4XGraphemeClusterSegmenter_segment_utf16(const ICU4XGraphemeClusterSegmenter* self, const uint16_t* input_data, size_t input_len);
+
+ICU4XGraphemeClusterBreakIteratorLatin1* ICU4XGraphemeClusterSegmenter_segment_latin1(const ICU4XGraphemeClusterSegmenter* self, const uint8_t* input_data, size_t input_len);
+void ICU4XGraphemeClusterSegmenter_destroy(ICU4XGraphemeClusterSegmenter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XGregorianDateFormatter.h b/intl/icu_capi/c/include/ICU4XGregorianDateFormatter.h
new file mode 100644
index 0000000000..cf3ad9e9f4
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XGregorianDateFormatter.h
@@ -0,0 +1,40 @@
+#ifndef ICU4XGregorianDateFormatter_H
+#define ICU4XGregorianDateFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGregorianDateFormatter ICU4XGregorianDateFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XDateLength.h"
+#include "diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError.h"
+#include "ICU4XIsoDate.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XIsoDateTime.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError ICU4XGregorianDateFormatter_create_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength length);
+
+diplomat_result_void_ICU4XError ICU4XGregorianDateFormatter_format_iso_date(const ICU4XGregorianDateFormatter* self, const ICU4XIsoDate* value, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XGregorianDateFormatter_format_iso_datetime(const ICU4XGregorianDateFormatter* self, const ICU4XIsoDateTime* value, DiplomatWriteable* write);
+void ICU4XGregorianDateFormatter_destroy(ICU4XGregorianDateFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XGregorianDateTimeFormatter.h b/intl/icu_capi/c/include/ICU4XGregorianDateTimeFormatter.h
new file mode 100644
index 0000000000..0b56ddc393
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XGregorianDateTimeFormatter.h
@@ -0,0 +1,38 @@
+#ifndef ICU4XGregorianDateTimeFormatter_H
+#define ICU4XGregorianDateTimeFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGregorianDateTimeFormatter ICU4XGregorianDateTimeFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XDateLength.h"
+#include "ICU4XTimeLength.h"
+#include "diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError.h"
+#include "ICU4XIsoDateTime.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError ICU4XGregorianDateTimeFormatter_create_with_lengths(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length);
+
+diplomat_result_void_ICU4XError ICU4XGregorianDateTimeFormatter_format_iso_datetime(const ICU4XGregorianDateTimeFormatter* self, const ICU4XIsoDateTime* value, DiplomatWriteable* write);
+void ICU4XGregorianDateTimeFormatter_destroy(ICU4XGregorianDateTimeFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XGregorianZonedDateTimeFormatter.h b/intl/icu_capi/c/include/ICU4XGregorianZonedDateTimeFormatter.h
new file mode 100644
index 0000000000..4be60c2b0b
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XGregorianZonedDateTimeFormatter.h
@@ -0,0 +1,42 @@
+#ifndef ICU4XGregorianZonedDateTimeFormatter_H
+#define ICU4XGregorianZonedDateTimeFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGregorianZonedDateTimeFormatter ICU4XGregorianZonedDateTimeFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XDateLength.h"
+#include "ICU4XTimeLength.h"
+#include "diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError.h"
+#include "ICU4XIsoTimeZoneOptions.h"
+#include "ICU4XIsoDateTime.h"
+#include "ICU4XCustomTimeZone.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError ICU4XGregorianZonedDateTimeFormatter_create_with_lengths(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length);
+
+diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError ICU4XGregorianZonedDateTimeFormatter_create_with_lengths_and_iso_8601_time_zone_fallback(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length, ICU4XIsoTimeZoneOptions zone_options);
+
+diplomat_result_void_ICU4XError ICU4XGregorianZonedDateTimeFormatter_format_iso_datetime_with_custom_time_zone(const ICU4XGregorianZonedDateTimeFormatter* self, const ICU4XIsoDateTime* datetime, const ICU4XCustomTimeZone* time_zone, DiplomatWriteable* write);
+void ICU4XGregorianZonedDateTimeFormatter_destroy(ICU4XGregorianZonedDateTimeFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XIanaToBcp47Mapper.h b/intl/icu_capi/c/include/ICU4XIanaToBcp47Mapper.h
new file mode 100644
index 0000000000..e06433b6d0
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XIanaToBcp47Mapper.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XIanaToBcp47Mapper_H
+#define ICU4XIanaToBcp47Mapper_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XIanaToBcp47Mapper ICU4XIanaToBcp47Mapper;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError ICU4XIanaToBcp47Mapper_create(const ICU4XDataProvider* provider);
+void ICU4XIanaToBcp47Mapper_destroy(ICU4XIanaToBcp47Mapper* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XIsoDate.h b/intl/icu_capi/c/include/ICU4XIsoDate.h
new file mode 100644
index 0000000000..d7a018244a
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XIsoDate.h
@@ -0,0 +1,61 @@
+#ifndef ICU4XIsoDate_H
+#define ICU4XIsoDate_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XIsoDate ICU4XIsoDate;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XIsoDate_ICU4XError.h"
+#include "ICU4XCalendar.h"
+#include "ICU4XDate.h"
+#include "ICU4XIsoWeekday.h"
+#include "ICU4XWeekCalculator.h"
+#include "diplomat_result_ICU4XWeekOf_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XIsoDate_ICU4XError ICU4XIsoDate_create(int32_t year, uint8_t month, uint8_t day);
+
+ICU4XIsoDate* ICU4XIsoDate_create_for_unix_epoch();
+
+ICU4XDate* ICU4XIsoDate_to_calendar(const ICU4XIsoDate* self, const ICU4XCalendar* calendar);
+
+ICU4XDate* ICU4XIsoDate_to_any(const ICU4XIsoDate* self);
+
+uint32_t ICU4XIsoDate_day_of_month(const ICU4XIsoDate* self);
+
+ICU4XIsoWeekday ICU4XIsoDate_day_of_week(const ICU4XIsoDate* self);
+
+uint32_t ICU4XIsoDate_week_of_month(const ICU4XIsoDate* self, ICU4XIsoWeekday first_weekday);
+
+diplomat_result_ICU4XWeekOf_ICU4XError ICU4XIsoDate_week_of_year(const ICU4XIsoDate* self, const ICU4XWeekCalculator* calculator);
+
+uint32_t ICU4XIsoDate_month(const ICU4XIsoDate* self);
+
+int32_t ICU4XIsoDate_year(const ICU4XIsoDate* self);
+
+bool ICU4XIsoDate_is_in_leap_year(const ICU4XIsoDate* self);
+
+uint8_t ICU4XIsoDate_months_in_year(const ICU4XIsoDate* self);
+
+uint8_t ICU4XIsoDate_days_in_month(const ICU4XIsoDate* self);
+
+uint16_t ICU4XIsoDate_days_in_year(const ICU4XIsoDate* self);
+void ICU4XIsoDate_destroy(ICU4XIsoDate* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XIsoDateTime.h b/intl/icu_capi/c/include/ICU4XIsoDateTime.h
new file mode 100644
index 0000000000..404cbfedc8
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XIsoDateTime.h
@@ -0,0 +1,79 @@
+#ifndef ICU4XIsoDateTime_H
+#define ICU4XIsoDateTime_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XIsoDateTime ICU4XIsoDateTime;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XIsoDateTime_ICU4XError.h"
+#include "ICU4XIsoDate.h"
+#include "ICU4XTime.h"
+#include "ICU4XDateTime.h"
+#include "ICU4XCalendar.h"
+#include "ICU4XIsoWeekday.h"
+#include "ICU4XWeekCalculator.h"
+#include "diplomat_result_ICU4XWeekOf_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XIsoDateTime_ICU4XError ICU4XIsoDateTime_create(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond);
+
+ICU4XIsoDateTime* ICU4XIsoDateTime_crate_from_date_and_time(const ICU4XIsoDate* date, const ICU4XTime* time);
+
+ICU4XIsoDateTime* ICU4XIsoDateTime_create_from_minutes_since_local_unix_epoch(int32_t minutes);
+
+ICU4XIsoDate* ICU4XIsoDateTime_date(const ICU4XIsoDateTime* self);
+
+ICU4XTime* ICU4XIsoDateTime_time(const ICU4XIsoDateTime* self);
+
+ICU4XDateTime* ICU4XIsoDateTime_to_any(const ICU4XIsoDateTime* self);
+
+int32_t ICU4XIsoDateTime_minutes_since_local_unix_epoch(const ICU4XIsoDateTime* self);
+
+ICU4XDateTime* ICU4XIsoDateTime_to_calendar(const ICU4XIsoDateTime* self, const ICU4XCalendar* calendar);
+
+uint8_t ICU4XIsoDateTime_hour(const ICU4XIsoDateTime* self);
+
+uint8_t ICU4XIsoDateTime_minute(const ICU4XIsoDateTime* self);
+
+uint8_t ICU4XIsoDateTime_second(const ICU4XIsoDateTime* self);
+
+uint32_t ICU4XIsoDateTime_nanosecond(const ICU4XIsoDateTime* self);
+
+uint32_t ICU4XIsoDateTime_day_of_month(const ICU4XIsoDateTime* self);
+
+ICU4XIsoWeekday ICU4XIsoDateTime_day_of_week(const ICU4XIsoDateTime* self);
+
+uint32_t ICU4XIsoDateTime_week_of_month(const ICU4XIsoDateTime* self, ICU4XIsoWeekday first_weekday);
+
+diplomat_result_ICU4XWeekOf_ICU4XError ICU4XIsoDateTime_week_of_year(const ICU4XIsoDateTime* self, const ICU4XWeekCalculator* calculator);
+
+uint32_t ICU4XIsoDateTime_month(const ICU4XIsoDateTime* self);
+
+int32_t ICU4XIsoDateTime_year(const ICU4XIsoDateTime* self);
+
+bool ICU4XIsoDateTime_is_in_leap_year(const ICU4XIsoDateTime* self);
+
+uint8_t ICU4XIsoDateTime_months_in_year(const ICU4XIsoDateTime* self);
+
+uint8_t ICU4XIsoDateTime_days_in_month(const ICU4XIsoDateTime* self);
+
+uint16_t ICU4XIsoDateTime_days_in_year(const ICU4XIsoDateTime* self);
+void ICU4XIsoDateTime_destroy(ICU4XIsoDateTime* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XIsoTimeZoneFormat.h b/intl/icu_capi/c/include/ICU4XIsoTimeZoneFormat.h
new file mode 100644
index 0000000000..e48a1142f2
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XIsoTimeZoneFormat.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XIsoTimeZoneFormat_H
+#define ICU4XIsoTimeZoneFormat_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XIsoTimeZoneFormat {
+ ICU4XIsoTimeZoneFormat_Basic = 0,
+ ICU4XIsoTimeZoneFormat_Extended = 1,
+ ICU4XIsoTimeZoneFormat_UtcBasic = 2,
+ ICU4XIsoTimeZoneFormat_UtcExtended = 3,
+} ICU4XIsoTimeZoneFormat;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XIsoTimeZoneFormat_destroy(ICU4XIsoTimeZoneFormat* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XIsoTimeZoneMinuteDisplay.h b/intl/icu_capi/c/include/ICU4XIsoTimeZoneMinuteDisplay.h
new file mode 100644
index 0000000000..edeee97019
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XIsoTimeZoneMinuteDisplay.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XIsoTimeZoneMinuteDisplay_H
+#define ICU4XIsoTimeZoneMinuteDisplay_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XIsoTimeZoneMinuteDisplay {
+ ICU4XIsoTimeZoneMinuteDisplay_Required = 0,
+ ICU4XIsoTimeZoneMinuteDisplay_Optional = 1,
+} ICU4XIsoTimeZoneMinuteDisplay;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XIsoTimeZoneMinuteDisplay_destroy(ICU4XIsoTimeZoneMinuteDisplay* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XIsoTimeZoneOptions.h b/intl/icu_capi/c/include/ICU4XIsoTimeZoneOptions.h
new file mode 100644
index 0000000000..7ba051c3e6
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XIsoTimeZoneOptions.h
@@ -0,0 +1,38 @@
+#ifndef ICU4XIsoTimeZoneOptions_H
+#define ICU4XIsoTimeZoneOptions_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XIsoTimeZoneFormat.h"
+#include "ICU4XIsoTimeZoneMinuteDisplay.h"
+#include "ICU4XIsoTimeZoneSecondDisplay.h"
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XIsoTimeZoneOptions {
+ ICU4XIsoTimeZoneFormat format;
+ ICU4XIsoTimeZoneMinuteDisplay minutes;
+ ICU4XIsoTimeZoneSecondDisplay seconds;
+} ICU4XIsoTimeZoneOptions;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XIsoTimeZoneFormat.h"
+#include "ICU4XIsoTimeZoneMinuteDisplay.h"
+#include "ICU4XIsoTimeZoneSecondDisplay.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XIsoTimeZoneOptions_destroy(ICU4XIsoTimeZoneOptions* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XIsoTimeZoneSecondDisplay.h b/intl/icu_capi/c/include/ICU4XIsoTimeZoneSecondDisplay.h
new file mode 100644
index 0000000000..487a248f95
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XIsoTimeZoneSecondDisplay.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XIsoTimeZoneSecondDisplay_H
+#define ICU4XIsoTimeZoneSecondDisplay_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XIsoTimeZoneSecondDisplay {
+ ICU4XIsoTimeZoneSecondDisplay_Optional = 0,
+ ICU4XIsoTimeZoneSecondDisplay_Never = 1,
+} ICU4XIsoTimeZoneSecondDisplay;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XIsoTimeZoneSecondDisplay_destroy(ICU4XIsoTimeZoneSecondDisplay* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XIsoWeekday.h b/intl/icu_capi/c/include/ICU4XIsoWeekday.h
new file mode 100644
index 0000000000..a23d0a3b9e
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XIsoWeekday.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XIsoWeekday_H
+#define ICU4XIsoWeekday_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XIsoWeekday {
+ ICU4XIsoWeekday_Monday = 1,
+ ICU4XIsoWeekday_Tuesday = 2,
+ ICU4XIsoWeekday_Wednesday = 3,
+ ICU4XIsoWeekday_Thursday = 4,
+ ICU4XIsoWeekday_Friday = 5,
+ ICU4XIsoWeekday_Saturday = 6,
+ ICU4XIsoWeekday_Sunday = 7,
+} ICU4XIsoWeekday;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XIsoWeekday_destroy(ICU4XIsoWeekday* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLanguageDisplay.h b/intl/icu_capi/c/include/ICU4XLanguageDisplay.h
new file mode 100644
index 0000000000..0b921351fe
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLanguageDisplay.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XLanguageDisplay_H
+#define ICU4XLanguageDisplay_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XLanguageDisplay {
+ ICU4XLanguageDisplay_Dialect = 0,
+ ICU4XLanguageDisplay_Standard = 1,
+} ICU4XLanguageDisplay;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLanguageDisplay_destroy(ICU4XLanguageDisplay* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLeadingAdjustment.h b/intl/icu_capi/c/include/ICU4XLeadingAdjustment.h
new file mode 100644
index 0000000000..91647188ed
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLeadingAdjustment.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XLeadingAdjustment_H
+#define ICU4XLeadingAdjustment_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XLeadingAdjustment {
+ ICU4XLeadingAdjustment_Auto = 0,
+ ICU4XLeadingAdjustment_None = 1,
+ ICU4XLeadingAdjustment_ToCased = 2,
+} ICU4XLeadingAdjustment;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLeadingAdjustment_destroy(ICU4XLeadingAdjustment* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLineBreakIteratorLatin1.h b/intl/icu_capi/c/include/ICU4XLineBreakIteratorLatin1.h
new file mode 100644
index 0000000000..c1a4c39131
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLineBreakIteratorLatin1.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XLineBreakIteratorLatin1_H
+#define ICU4XLineBreakIteratorLatin1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLineBreakIteratorLatin1 ICU4XLineBreakIteratorLatin1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XLineBreakIteratorLatin1_next(ICU4XLineBreakIteratorLatin1* self);
+void ICU4XLineBreakIteratorLatin1_destroy(ICU4XLineBreakIteratorLatin1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLineBreakIteratorUtf16.h b/intl/icu_capi/c/include/ICU4XLineBreakIteratorUtf16.h
new file mode 100644
index 0000000000..78ae12c7e4
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLineBreakIteratorUtf16.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XLineBreakIteratorUtf16_H
+#define ICU4XLineBreakIteratorUtf16_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLineBreakIteratorUtf16 ICU4XLineBreakIteratorUtf16;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XLineBreakIteratorUtf16_next(ICU4XLineBreakIteratorUtf16* self);
+void ICU4XLineBreakIteratorUtf16_destroy(ICU4XLineBreakIteratorUtf16* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLineBreakIteratorUtf8.h b/intl/icu_capi/c/include/ICU4XLineBreakIteratorUtf8.h
new file mode 100644
index 0000000000..3a08c5ad23
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLineBreakIteratorUtf8.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XLineBreakIteratorUtf8_H
+#define ICU4XLineBreakIteratorUtf8_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLineBreakIteratorUtf8 ICU4XLineBreakIteratorUtf8;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XLineBreakIteratorUtf8_next(ICU4XLineBreakIteratorUtf8* self);
+void ICU4XLineBreakIteratorUtf8_destroy(ICU4XLineBreakIteratorUtf8* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLineBreakOptionsV1.h b/intl/icu_capi/c/include/ICU4XLineBreakOptionsV1.h
new file mode 100644
index 0000000000..5fbf4b5814
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLineBreakOptionsV1.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XLineBreakOptionsV1_H
+#define ICU4XLineBreakOptionsV1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XLineBreakStrictness.h"
+#include "ICU4XLineBreakWordOption.h"
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLineBreakOptionsV1 {
+ ICU4XLineBreakStrictness strictness;
+ ICU4XLineBreakWordOption word_option;
+ bool ja_zh;
+} ICU4XLineBreakOptionsV1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XLineBreakStrictness.h"
+#include "ICU4XLineBreakWordOption.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLineBreakOptionsV1_destroy(ICU4XLineBreakOptionsV1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLineBreakStrictness.h b/intl/icu_capi/c/include/ICU4XLineBreakStrictness.h
new file mode 100644
index 0000000000..e3534b7ec7
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLineBreakStrictness.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XLineBreakStrictness_H
+#define ICU4XLineBreakStrictness_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XLineBreakStrictness {
+ ICU4XLineBreakStrictness_Loose = 0,
+ ICU4XLineBreakStrictness_Normal = 1,
+ ICU4XLineBreakStrictness_Strict = 2,
+ ICU4XLineBreakStrictness_Anywhere = 3,
+} ICU4XLineBreakStrictness;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLineBreakStrictness_destroy(ICU4XLineBreakStrictness* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLineBreakWordOption.h b/intl/icu_capi/c/include/ICU4XLineBreakWordOption.h
new file mode 100644
index 0000000000..02a6ca6f2d
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLineBreakWordOption.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XLineBreakWordOption_H
+#define ICU4XLineBreakWordOption_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XLineBreakWordOption {
+ ICU4XLineBreakWordOption_Normal = 0,
+ ICU4XLineBreakWordOption_BreakAll = 1,
+ ICU4XLineBreakWordOption_KeepAll = 2,
+} ICU4XLineBreakWordOption;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLineBreakWordOption_destroy(ICU4XLineBreakWordOption* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLineSegmenter.h b/intl/icu_capi/c/include/ICU4XLineSegmenter.h
new file mode 100644
index 0000000000..f734ec78f8
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLineSegmenter.h
@@ -0,0 +1,51 @@
+#ifndef ICU4XLineSegmenter_H
+#define ICU4XLineSegmenter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLineSegmenter ICU4XLineSegmenter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XLineSegmenter_ICU4XError.h"
+#include "ICU4XLineBreakOptionsV1.h"
+#include "ICU4XLineBreakIteratorUtf8.h"
+#include "ICU4XLineBreakIteratorUtf16.h"
+#include "ICU4XLineBreakIteratorLatin1.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_auto(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_lstm(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_dictionary(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_auto_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options);
+
+diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_lstm_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options);
+
+diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_dictionary_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options);
+
+ICU4XLineBreakIteratorUtf8* ICU4XLineSegmenter_segment_utf8(const ICU4XLineSegmenter* self, const char* input_data, size_t input_len);
+
+ICU4XLineBreakIteratorUtf16* ICU4XLineSegmenter_segment_utf16(const ICU4XLineSegmenter* self, const uint16_t* input_data, size_t input_len);
+
+ICU4XLineBreakIteratorLatin1* ICU4XLineSegmenter_segment_latin1(const ICU4XLineSegmenter* self, const uint8_t* input_data, size_t input_len);
+void ICU4XLineSegmenter_destroy(ICU4XLineSegmenter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XList.h b/intl/icu_capi/c/include/ICU4XList.h
new file mode 100644
index 0000000000..6549561c37
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XList.h
@@ -0,0 +1,35 @@
+#ifndef ICU4XList_H
+#define ICU4XList_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XList ICU4XList;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+ICU4XList* ICU4XList_create();
+
+ICU4XList* ICU4XList_create_with_capacity(size_t capacity);
+
+void ICU4XList_push(ICU4XList* self, const char* val_data, size_t val_len);
+
+size_t ICU4XList_len(const ICU4XList* self);
+void ICU4XList_destroy(ICU4XList* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XListFormatter.h b/intl/icu_capi/c/include/ICU4XListFormatter.h
new file mode 100644
index 0000000000..ee358dc254
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XListFormatter.h
@@ -0,0 +1,41 @@
+#ifndef ICU4XListFormatter_H
+#define ICU4XListFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XListFormatter ICU4XListFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XListLength.h"
+#include "diplomat_result_box_ICU4XListFormatter_ICU4XError.h"
+#include "ICU4XList.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XListFormatter_ICU4XError ICU4XListFormatter_create_and_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length);
+
+diplomat_result_box_ICU4XListFormatter_ICU4XError ICU4XListFormatter_create_or_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length);
+
+diplomat_result_box_ICU4XListFormatter_ICU4XError ICU4XListFormatter_create_unit_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length);
+
+diplomat_result_void_ICU4XError ICU4XListFormatter_format(const ICU4XListFormatter* self, const ICU4XList* list, DiplomatWriteable* write);
+void ICU4XListFormatter_destroy(ICU4XListFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XListLength.h b/intl/icu_capi/c/include/ICU4XListLength.h
new file mode 100644
index 0000000000..7092f6d9df
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XListLength.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XListLength_H
+#define ICU4XListLength_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XListLength {
+ ICU4XListLength_Wide = 0,
+ ICU4XListLength_Short = 1,
+ ICU4XListLength_Narrow = 2,
+} ICU4XListLength;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XListLength_destroy(ICU4XListLength* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLocale.h b/intl/icu_capi/c/include/ICU4XLocale.h
new file mode 100644
index 0000000000..dea8d196b5
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLocale.h
@@ -0,0 +1,64 @@
+#ifndef ICU4XLocale_H
+#define ICU4XLocale_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocale ICU4XLocale;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XLocale_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XOrdering.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XLocale_ICU4XError ICU4XLocale_create_from_string(const char* name_data, size_t name_len);
+
+ICU4XLocale* ICU4XLocale_create_und();
+
+ICU4XLocale* ICU4XLocale_clone(const ICU4XLocale* self);
+
+diplomat_result_void_ICU4XError ICU4XLocale_basename(const ICU4XLocale* self, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XLocale_get_unicode_extension(const ICU4XLocale* self, const char* bytes_data, size_t bytes_len, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XLocale_language(const ICU4XLocale* self, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XLocale_set_language(ICU4XLocale* self, const char* bytes_data, size_t bytes_len);
+
+diplomat_result_void_ICU4XError ICU4XLocale_region(const ICU4XLocale* self, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XLocale_set_region(ICU4XLocale* self, const char* bytes_data, size_t bytes_len);
+
+diplomat_result_void_ICU4XError ICU4XLocale_script(const ICU4XLocale* self, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XLocale_set_script(ICU4XLocale* self, const char* bytes_data, size_t bytes_len);
+
+diplomat_result_void_ICU4XError ICU4XLocale_canonicalize(const char* bytes_data, size_t bytes_len, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XLocale_to_string(const ICU4XLocale* self, DiplomatWriteable* write);
+
+bool ICU4XLocale_normalizing_eq(const ICU4XLocale* self, const char* other_data, size_t other_len);
+
+ICU4XOrdering ICU4XLocale_strict_cmp(const ICU4XLocale* self, const char* other_data, size_t other_len);
+
+ICU4XLocale* ICU4XLocale_create_en();
+
+ICU4XLocale* ICU4XLocale_create_bn();
+void ICU4XLocale_destroy(ICU4XLocale* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLocaleCanonicalizer.h b/intl/icu_capi/c/include/ICU4XLocaleCanonicalizer.h
new file mode 100644
index 0000000000..8b48ad8bb6
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLocaleCanonicalizer.h
@@ -0,0 +1,37 @@
+#ifndef ICU4XLocaleCanonicalizer_H
+#define ICU4XLocaleCanonicalizer_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleCanonicalizer ICU4XLocaleCanonicalizer;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError.h"
+#include "ICU4XLocale.h"
+#include "ICU4XTransformResult.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError ICU4XLocaleCanonicalizer_create(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError ICU4XLocaleCanonicalizer_create_extended(const ICU4XDataProvider* provider);
+
+ICU4XTransformResult ICU4XLocaleCanonicalizer_canonicalize(const ICU4XLocaleCanonicalizer* self, ICU4XLocale* locale);
+void ICU4XLocaleCanonicalizer_destroy(ICU4XLocaleCanonicalizer* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLocaleDirection.h b/intl/icu_capi/c/include/ICU4XLocaleDirection.h
new file mode 100644
index 0000000000..688f04c98c
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLocaleDirection.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XLocaleDirection_H
+#define ICU4XLocaleDirection_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XLocaleDirection {
+ ICU4XLocaleDirection_LeftToRight = 0,
+ ICU4XLocaleDirection_RightToLeft = 1,
+ ICU4XLocaleDirection_Unknown = 2,
+} ICU4XLocaleDirection;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLocaleDirection_destroy(ICU4XLocaleDirection* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLocaleDirectionality.h b/intl/icu_capi/c/include/ICU4XLocaleDirectionality.h
new file mode 100644
index 0000000000..9271b078c7
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLocaleDirectionality.h
@@ -0,0 +1,42 @@
+#ifndef ICU4XLocaleDirectionality_H
+#define ICU4XLocaleDirectionality_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleDirectionality ICU4XLocaleDirectionality;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.h"
+#include "ICU4XLocaleExpander.h"
+#include "ICU4XLocale.h"
+#include "ICU4XLocaleDirection.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError ICU4XLocaleDirectionality_create(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError ICU4XLocaleDirectionality_create_with_expander(const ICU4XDataProvider* provider, const ICU4XLocaleExpander* expander);
+
+ICU4XLocaleDirection ICU4XLocaleDirectionality_get(const ICU4XLocaleDirectionality* self, const ICU4XLocale* locale);
+
+bool ICU4XLocaleDirectionality_is_left_to_right(const ICU4XLocaleDirectionality* self, const ICU4XLocale* locale);
+
+bool ICU4XLocaleDirectionality_is_right_to_left(const ICU4XLocaleDirectionality* self, const ICU4XLocale* locale);
+void ICU4XLocaleDirectionality_destroy(ICU4XLocaleDirectionality* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLocaleDisplayNamesFormatter.h b/intl/icu_capi/c/include/ICU4XLocaleDisplayNamesFormatter.h
new file mode 100644
index 0000000000..bfed8ec411
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLocaleDisplayNamesFormatter.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XLocaleDisplayNamesFormatter_H
+#define ICU4XLocaleDisplayNamesFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleDisplayNamesFormatter ICU4XLocaleDisplayNamesFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XDisplayNamesOptionsV1.h"
+#include "diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError ICU4XLocaleDisplayNamesFormatter_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDisplayNamesOptionsV1 options);
+
+diplomat_result_void_ICU4XError ICU4XLocaleDisplayNamesFormatter_of(const ICU4XLocaleDisplayNamesFormatter* self, const ICU4XLocale* locale, DiplomatWriteable* write);
+void ICU4XLocaleDisplayNamesFormatter_destroy(ICU4XLocaleDisplayNamesFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLocaleExpander.h b/intl/icu_capi/c/include/ICU4XLocaleExpander.h
new file mode 100644
index 0000000000..a7de7be16b
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLocaleExpander.h
@@ -0,0 +1,39 @@
+#ifndef ICU4XLocaleExpander_H
+#define ICU4XLocaleExpander_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleExpander ICU4XLocaleExpander;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XLocaleExpander_ICU4XError.h"
+#include "ICU4XLocale.h"
+#include "ICU4XTransformResult.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XLocaleExpander_ICU4XError ICU4XLocaleExpander_create(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XLocaleExpander_ICU4XError ICU4XLocaleExpander_create_extended(const ICU4XDataProvider* provider);
+
+ICU4XTransformResult ICU4XLocaleExpander_maximize(const ICU4XLocaleExpander* self, ICU4XLocale* locale);
+
+ICU4XTransformResult ICU4XLocaleExpander_minimize(const ICU4XLocaleExpander* self, ICU4XLocale* locale);
+void ICU4XLocaleExpander_destroy(ICU4XLocaleExpander* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLocaleFallbackConfig.h b/intl/icu_capi/c/include/ICU4XLocaleFallbackConfig.h
new file mode 100644
index 0000000000..b40d115418
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLocaleFallbackConfig.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XLocaleFallbackConfig_H
+#define ICU4XLocaleFallbackConfig_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XLocaleFallbackPriority.h"
+#include "ICU4XLocaleFallbackSupplement.h"
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleFallbackConfig {
+ ICU4XLocaleFallbackPriority priority;
+ DiplomatStringView extension_key;
+ ICU4XLocaleFallbackSupplement fallback_supplement;
+} ICU4XLocaleFallbackConfig;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XLocaleFallbackPriority.h"
+#include "ICU4XLocaleFallbackSupplement.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLocaleFallbackConfig_destroy(ICU4XLocaleFallbackConfig* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLocaleFallbackIterator.h b/intl/icu_capi/c/include/ICU4XLocaleFallbackIterator.h
new file mode 100644
index 0000000000..e2dd7a1a3b
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLocaleFallbackIterator.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XLocaleFallbackIterator_H
+#define ICU4XLocaleFallbackIterator_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleFallbackIterator ICU4XLocaleFallbackIterator;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XLocale.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+ICU4XLocale* ICU4XLocaleFallbackIterator_get(const ICU4XLocaleFallbackIterator* self);
+
+void ICU4XLocaleFallbackIterator_step(ICU4XLocaleFallbackIterator* self);
+void ICU4XLocaleFallbackIterator_destroy(ICU4XLocaleFallbackIterator* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLocaleFallbackPriority.h b/intl/icu_capi/c/include/ICU4XLocaleFallbackPriority.h
new file mode 100644
index 0000000000..e4ab748065
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLocaleFallbackPriority.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XLocaleFallbackPriority_H
+#define ICU4XLocaleFallbackPriority_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XLocaleFallbackPriority {
+ ICU4XLocaleFallbackPriority_Language = 0,
+ ICU4XLocaleFallbackPriority_Region = 1,
+ ICU4XLocaleFallbackPriority_Collation = 2,
+} ICU4XLocaleFallbackPriority;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLocaleFallbackPriority_destroy(ICU4XLocaleFallbackPriority* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLocaleFallbackSupplement.h b/intl/icu_capi/c/include/ICU4XLocaleFallbackSupplement.h
new file mode 100644
index 0000000000..952483c724
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLocaleFallbackSupplement.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XLocaleFallbackSupplement_H
+#define ICU4XLocaleFallbackSupplement_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XLocaleFallbackSupplement {
+ ICU4XLocaleFallbackSupplement_None = 0,
+ ICU4XLocaleFallbackSupplement_Collation = 1,
+} ICU4XLocaleFallbackSupplement;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLocaleFallbackSupplement_destroy(ICU4XLocaleFallbackSupplement* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLocaleFallbacker.h b/intl/icu_capi/c/include/ICU4XLocaleFallbacker.h
new file mode 100644
index 0000000000..24efb0602f
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLocaleFallbacker.h
@@ -0,0 +1,37 @@
+#ifndef ICU4XLocaleFallbacker_H
+#define ICU4XLocaleFallbacker_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleFallbacker ICU4XLocaleFallbacker;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.h"
+#include "ICU4XLocaleFallbackConfig.h"
+#include "diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError ICU4XLocaleFallbacker_create(const ICU4XDataProvider* provider);
+
+ICU4XLocaleFallbacker* ICU4XLocaleFallbacker_create_without_data();
+
+diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError ICU4XLocaleFallbacker_for_config(const ICU4XLocaleFallbacker* self, ICU4XLocaleFallbackConfig config);
+void ICU4XLocaleFallbacker_destroy(ICU4XLocaleFallbacker* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLocaleFallbackerWithConfig.h b/intl/icu_capi/c/include/ICU4XLocaleFallbackerWithConfig.h
new file mode 100644
index 0000000000..e8baa9563e
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLocaleFallbackerWithConfig.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XLocaleFallbackerWithConfig_H
+#define ICU4XLocaleFallbackerWithConfig_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleFallbackerWithConfig ICU4XLocaleFallbackerWithConfig;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XLocale.h"
+#include "ICU4XLocaleFallbackIterator.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+ICU4XLocaleFallbackIterator* ICU4XLocaleFallbackerWithConfig_fallback_for_locale(const ICU4XLocaleFallbackerWithConfig* self, const ICU4XLocale* locale);
+void ICU4XLocaleFallbackerWithConfig_destroy(ICU4XLocaleFallbackerWithConfig* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XLogger.h b/intl/icu_capi/c/include/ICU4XLogger.h
new file mode 100644
index 0000000000..0aa1d0b1f9
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XLogger.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XLogger_H
+#define ICU4XLogger_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLogger ICU4XLogger;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+bool ICU4XLogger_init_simple_logger();
+
+bool ICU4XLogger_init_console_logger();
+void ICU4XLogger_destroy(ICU4XLogger* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XMetazoneCalculator.h b/intl/icu_capi/c/include/ICU4XMetazoneCalculator.h
new file mode 100644
index 0000000000..9c66754e90
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XMetazoneCalculator.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XMetazoneCalculator_H
+#define ICU4XMetazoneCalculator_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XMetazoneCalculator ICU4XMetazoneCalculator;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError ICU4XMetazoneCalculator_create(const ICU4XDataProvider* provider);
+void ICU4XMetazoneCalculator_destroy(ICU4XMetazoneCalculator* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XOrdering.h b/intl/icu_capi/c/include/ICU4XOrdering.h
new file mode 100644
index 0000000000..2c1885f43e
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XOrdering.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XOrdering_H
+#define ICU4XOrdering_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XOrdering {
+ ICU4XOrdering_Less = -1,
+ ICU4XOrdering_Equal = 0,
+ ICU4XOrdering_Greater = 1,
+} ICU4XOrdering;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XOrdering_destroy(ICU4XOrdering* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XPluralCategories.h b/intl/icu_capi/c/include/ICU4XPluralCategories.h
new file mode 100644
index 0000000000..931ea2daa7
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XPluralCategories.h
@@ -0,0 +1,35 @@
+#ifndef ICU4XPluralCategories_H
+#define ICU4XPluralCategories_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XPluralCategories {
+ bool zero;
+ bool one;
+ bool two;
+ bool few;
+ bool many;
+ bool other;
+} ICU4XPluralCategories;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XPluralCategories_destroy(ICU4XPluralCategories* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XPluralCategory.h b/intl/icu_capi/c/include/ICU4XPluralCategory.h
new file mode 100644
index 0000000000..543681c746
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XPluralCategory.h
@@ -0,0 +1,37 @@
+#ifndef ICU4XPluralCategory_H
+#define ICU4XPluralCategory_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XPluralCategory {
+ ICU4XPluralCategory_Zero = 0,
+ ICU4XPluralCategory_One = 1,
+ ICU4XPluralCategory_Two = 2,
+ ICU4XPluralCategory_Few = 3,
+ ICU4XPluralCategory_Many = 4,
+ ICU4XPluralCategory_Other = 5,
+} ICU4XPluralCategory;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_ICU4XPluralCategory_void.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_ICU4XPluralCategory_void ICU4XPluralCategory_get_for_cldr_string(const char* s_data, size_t s_len);
+void ICU4XPluralCategory_destroy(ICU4XPluralCategory* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XPluralOperands.h b/intl/icu_capi/c/include/ICU4XPluralOperands.h
new file mode 100644
index 0000000000..14d997555f
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XPluralOperands.h
@@ -0,0 +1,30 @@
+#ifndef ICU4XPluralOperands_H
+#define ICU4XPluralOperands_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XPluralOperands ICU4XPluralOperands;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XPluralOperands_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XPluralOperands_ICU4XError ICU4XPluralOperands_create_from_string(const char* s_data, size_t s_len);
+void ICU4XPluralOperands_destroy(ICU4XPluralOperands* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XPluralRules.h b/intl/icu_capi/c/include/ICU4XPluralRules.h
new file mode 100644
index 0000000000..0794a7ac8e
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XPluralRules.h
@@ -0,0 +1,41 @@
+#ifndef ICU4XPluralRules_H
+#define ICU4XPluralRules_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XPluralRules ICU4XPluralRules;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "diplomat_result_box_ICU4XPluralRules_ICU4XError.h"
+#include "ICU4XPluralOperands.h"
+#include "ICU4XPluralCategory.h"
+#include "ICU4XPluralCategories.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XPluralRules_ICU4XError ICU4XPluralRules_create_cardinal(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_box_ICU4XPluralRules_ICU4XError ICU4XPluralRules_create_ordinal(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+ICU4XPluralCategory ICU4XPluralRules_category_for(const ICU4XPluralRules* self, const ICU4XPluralOperands* op);
+
+ICU4XPluralCategories ICU4XPluralRules_categories(const ICU4XPluralRules* self);
+void ICU4XPluralRules_destroy(ICU4XPluralRules* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XPropertyValueNameToEnumMapper.h b/intl/icu_capi/c/include/ICU4XPropertyValueNameToEnumMapper.h
new file mode 100644
index 0000000000..54000ce338
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XPropertyValueNameToEnumMapper.h
@@ -0,0 +1,51 @@
+#ifndef ICU4XPropertyValueNameToEnumMapper_H
+#define ICU4XPropertyValueNameToEnumMapper_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XPropertyValueNameToEnumMapper ICU4XPropertyValueNameToEnumMapper;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int16_t ICU4XPropertyValueNameToEnumMapper_get_strict(const ICU4XPropertyValueNameToEnumMapper* self, const char* name_data, size_t name_len);
+
+int16_t ICU4XPropertyValueNameToEnumMapper_get_loose(const ICU4XPropertyValueNameToEnumMapper* self, const char* name_data, size_t name_len);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_general_category(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_bidi_class(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_east_asian_width(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_indic_syllabic_category(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_line_break(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_grapheme_cluster_break(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_word_break(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_sentence_break(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_script(const ICU4XDataProvider* provider);
+void ICU4XPropertyValueNameToEnumMapper_destroy(ICU4XPropertyValueNameToEnumMapper* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XRegionDisplayNames.h b/intl/icu_capi/c/include/ICU4XRegionDisplayNames.h
new file mode 100644
index 0000000000..a78ec64865
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XRegionDisplayNames.h
@@ -0,0 +1,35 @@
+#ifndef ICU4XRegionDisplayNames_H
+#define ICU4XRegionDisplayNames_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XRegionDisplayNames ICU4XRegionDisplayNames;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError ICU4XRegionDisplayNames_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_void_ICU4XError ICU4XRegionDisplayNames_of(const ICU4XRegionDisplayNames* self, const char* region_data, size_t region_len, DiplomatWriteable* write);
+void ICU4XRegionDisplayNames_destroy(ICU4XRegionDisplayNames* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XReorderedIndexMap.h b/intl/icu_capi/c/include/ICU4XReorderedIndexMap.h
new file mode 100644
index 0000000000..f5507a7217
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XReorderedIndexMap.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XReorderedIndexMap_H
+#define ICU4XReorderedIndexMap_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XReorderedIndexMap ICU4XReorderedIndexMap;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+DiplomatUsizeView ICU4XReorderedIndexMap_as_slice(const ICU4XReorderedIndexMap* self);
+
+size_t ICU4XReorderedIndexMap_len(const ICU4XReorderedIndexMap* self);
+
+size_t ICU4XReorderedIndexMap_get(const ICU4XReorderedIndexMap* self, size_t index);
+void ICU4XReorderedIndexMap_destroy(ICU4XReorderedIndexMap* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XRoundingIncrement.h b/intl/icu_capi/c/include/ICU4XRoundingIncrement.h
new file mode 100644
index 0000000000..c4b0666bef
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XRoundingIncrement.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XRoundingIncrement_H
+#define ICU4XRoundingIncrement_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XRoundingIncrement {
+ ICU4XRoundingIncrement_MultiplesOf1 = 0,
+ ICU4XRoundingIncrement_MultiplesOf2 = 1,
+ ICU4XRoundingIncrement_MultiplesOf5 = 2,
+ ICU4XRoundingIncrement_MultiplesOf25 = 3,
+} ICU4XRoundingIncrement;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XRoundingIncrement_destroy(ICU4XRoundingIncrement* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XScriptExtensionsSet.h b/intl/icu_capi/c/include/ICU4XScriptExtensionsSet.h
new file mode 100644
index 0000000000..b4982dc22c
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XScriptExtensionsSet.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XScriptExtensionsSet_H
+#define ICU4XScriptExtensionsSet_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XScriptExtensionsSet ICU4XScriptExtensionsSet;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_uint16_t_void.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+bool ICU4XScriptExtensionsSet_contains(const ICU4XScriptExtensionsSet* self, uint16_t script);
+
+size_t ICU4XScriptExtensionsSet_count(const ICU4XScriptExtensionsSet* self);
+
+diplomat_result_uint16_t_void ICU4XScriptExtensionsSet_script_at(const ICU4XScriptExtensionsSet* self, size_t index);
+void ICU4XScriptExtensionsSet_destroy(ICU4XScriptExtensionsSet* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XScriptWithExtensions.h b/intl/icu_capi/c/include/ICU4XScriptWithExtensions.h
new file mode 100644
index 0000000000..df2dd53946
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XScriptWithExtensions.h
@@ -0,0 +1,41 @@
+#ifndef ICU4XScriptWithExtensions_H
+#define ICU4XScriptWithExtensions_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XScriptWithExtensions ICU4XScriptWithExtensions;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.h"
+#include "ICU4XScriptWithExtensionsBorrowed.h"
+#include "CodePointRangeIterator.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError ICU4XScriptWithExtensions_create(const ICU4XDataProvider* provider);
+
+uint16_t ICU4XScriptWithExtensions_get_script_val(const ICU4XScriptWithExtensions* self, uint32_t code_point);
+
+bool ICU4XScriptWithExtensions_has_script(const ICU4XScriptWithExtensions* self, uint32_t code_point, uint16_t script);
+
+ICU4XScriptWithExtensionsBorrowed* ICU4XScriptWithExtensions_as_borrowed(const ICU4XScriptWithExtensions* self);
+
+CodePointRangeIterator* ICU4XScriptWithExtensions_iter_ranges_for_script(const ICU4XScriptWithExtensions* self, uint16_t script);
+void ICU4XScriptWithExtensions_destroy(ICU4XScriptWithExtensions* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XScriptWithExtensionsBorrowed.h b/intl/icu_capi/c/include/ICU4XScriptWithExtensionsBorrowed.h
new file mode 100644
index 0000000000..82faeec178
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XScriptWithExtensionsBorrowed.h
@@ -0,0 +1,37 @@
+#ifndef ICU4XScriptWithExtensionsBorrowed_H
+#define ICU4XScriptWithExtensionsBorrowed_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XScriptWithExtensionsBorrowed ICU4XScriptWithExtensionsBorrowed;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XScriptExtensionsSet.h"
+#include "ICU4XCodePointSetData.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+uint16_t ICU4XScriptWithExtensionsBorrowed_get_script_val(const ICU4XScriptWithExtensionsBorrowed* self, uint32_t code_point);
+
+ICU4XScriptExtensionsSet* ICU4XScriptWithExtensionsBorrowed_get_script_extensions_val(const ICU4XScriptWithExtensionsBorrowed* self, uint32_t code_point);
+
+bool ICU4XScriptWithExtensionsBorrowed_has_script(const ICU4XScriptWithExtensionsBorrowed* self, uint32_t code_point, uint16_t script);
+
+ICU4XCodePointSetData* ICU4XScriptWithExtensionsBorrowed_get_script_extensions_set(const ICU4XScriptWithExtensionsBorrowed* self, uint16_t script);
+void ICU4XScriptWithExtensionsBorrowed_destroy(ICU4XScriptWithExtensionsBorrowed* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XSegmenterWordType.h b/intl/icu_capi/c/include/ICU4XSegmenterWordType.h
new file mode 100644
index 0000000000..9f4f81cf10
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XSegmenterWordType.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XSegmenterWordType_H
+#define ICU4XSegmenterWordType_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XSegmenterWordType {
+ ICU4XSegmenterWordType_None = 0,
+ ICU4XSegmenterWordType_Number = 1,
+ ICU4XSegmenterWordType_Letter = 2,
+} ICU4XSegmenterWordType;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XSegmenterWordType_destroy(ICU4XSegmenterWordType* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorLatin1.h b/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorLatin1.h
new file mode 100644
index 0000000000..6dd7b132dc
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorLatin1.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XSentenceBreakIteratorLatin1_H
+#define ICU4XSentenceBreakIteratorLatin1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XSentenceBreakIteratorLatin1 ICU4XSentenceBreakIteratorLatin1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XSentenceBreakIteratorLatin1_next(ICU4XSentenceBreakIteratorLatin1* self);
+void ICU4XSentenceBreakIteratorLatin1_destroy(ICU4XSentenceBreakIteratorLatin1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorUtf16.h b/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorUtf16.h
new file mode 100644
index 0000000000..3ed0dc18c3
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorUtf16.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XSentenceBreakIteratorUtf16_H
+#define ICU4XSentenceBreakIteratorUtf16_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XSentenceBreakIteratorUtf16 ICU4XSentenceBreakIteratorUtf16;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XSentenceBreakIteratorUtf16_next(ICU4XSentenceBreakIteratorUtf16* self);
+void ICU4XSentenceBreakIteratorUtf16_destroy(ICU4XSentenceBreakIteratorUtf16* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorUtf8.h b/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorUtf8.h
new file mode 100644
index 0000000000..655cb67b6c
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorUtf8.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XSentenceBreakIteratorUtf8_H
+#define ICU4XSentenceBreakIteratorUtf8_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XSentenceBreakIteratorUtf8 ICU4XSentenceBreakIteratorUtf8;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XSentenceBreakIteratorUtf8_next(ICU4XSentenceBreakIteratorUtf8* self);
+void ICU4XSentenceBreakIteratorUtf8_destroy(ICU4XSentenceBreakIteratorUtf8* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XSentenceSegmenter.h b/intl/icu_capi/c/include/ICU4XSentenceSegmenter.h
new file mode 100644
index 0000000000..7701c9f042
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XSentenceSegmenter.h
@@ -0,0 +1,40 @@
+#ifndef ICU4XSentenceSegmenter_H
+#define ICU4XSentenceSegmenter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XSentenceSegmenter ICU4XSentenceSegmenter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.h"
+#include "ICU4XSentenceBreakIteratorUtf8.h"
+#include "ICU4XSentenceBreakIteratorUtf16.h"
+#include "ICU4XSentenceBreakIteratorLatin1.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError ICU4XSentenceSegmenter_create(const ICU4XDataProvider* provider);
+
+ICU4XSentenceBreakIteratorUtf8* ICU4XSentenceSegmenter_segment_utf8(const ICU4XSentenceSegmenter* self, const char* input_data, size_t input_len);
+
+ICU4XSentenceBreakIteratorUtf16* ICU4XSentenceSegmenter_segment_utf16(const ICU4XSentenceSegmenter* self, const uint16_t* input_data, size_t input_len);
+
+ICU4XSentenceBreakIteratorLatin1* ICU4XSentenceSegmenter_segment_latin1(const ICU4XSentenceSegmenter* self, const uint8_t* input_data, size_t input_len);
+void ICU4XSentenceSegmenter_destroy(ICU4XSentenceSegmenter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XTime.h b/intl/icu_capi/c/include/ICU4XTime.h
new file mode 100644
index 0000000000..2f3a9967fa
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XTime.h
@@ -0,0 +1,40 @@
+#ifndef ICU4XTime_H
+#define ICU4XTime_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XTime ICU4XTime;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XTime_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XTime_ICU4XError ICU4XTime_create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond);
+
+diplomat_result_box_ICU4XTime_ICU4XError ICU4XTime_create_midnight();
+
+uint8_t ICU4XTime_hour(const ICU4XTime* self);
+
+uint8_t ICU4XTime_minute(const ICU4XTime* self);
+
+uint8_t ICU4XTime_second(const ICU4XTime* self);
+
+uint32_t ICU4XTime_nanosecond(const ICU4XTime* self);
+void ICU4XTime_destroy(ICU4XTime* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XTimeFormatter.h b/intl/icu_capi/c/include/ICU4XTimeFormatter.h
new file mode 100644
index 0000000000..d200881399
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XTimeFormatter.h
@@ -0,0 +1,43 @@
+#ifndef ICU4XTimeFormatter_H
+#define ICU4XTimeFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XTimeFormatter ICU4XTimeFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XTimeLength.h"
+#include "diplomat_result_box_ICU4XTimeFormatter_ICU4XError.h"
+#include "ICU4XTime.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XDateTime.h"
+#include "ICU4XIsoDateTime.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XTimeFormatter_ICU4XError ICU4XTimeFormatter_create_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XTimeLength length);
+
+diplomat_result_void_ICU4XError ICU4XTimeFormatter_format_time(const ICU4XTimeFormatter* self, const ICU4XTime* value, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XTimeFormatter_format_datetime(const ICU4XTimeFormatter* self, const ICU4XDateTime* value, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XTimeFormatter_format_iso_datetime(const ICU4XTimeFormatter* self, const ICU4XIsoDateTime* value, DiplomatWriteable* write);
+void ICU4XTimeFormatter_destroy(ICU4XTimeFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XTimeLength.h b/intl/icu_capi/c/include/ICU4XTimeLength.h
new file mode 100644
index 0000000000..6d98bc8ccb
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XTimeLength.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XTimeLength_H
+#define ICU4XTimeLength_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XTimeLength {
+ ICU4XTimeLength_Full = 0,
+ ICU4XTimeLength_Long = 1,
+ ICU4XTimeLength_Medium = 2,
+ ICU4XTimeLength_Short = 3,
+} ICU4XTimeLength;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XTimeLength_destroy(ICU4XTimeLength* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XTimeZoneFormatter.h b/intl/icu_capi/c/include/ICU4XTimeZoneFormatter.h
new file mode 100644
index 0000000000..5eb1299543
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XTimeZoneFormatter.h
@@ -0,0 +1,53 @@
+#ifndef ICU4XTimeZoneFormatter_H
+#define ICU4XTimeZoneFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XTimeZoneFormatter ICU4XTimeZoneFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError.h"
+#include "ICU4XIsoTimeZoneOptions.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XCustomTimeZone.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError ICU4XTimeZoneFormatter_create_with_localized_gmt_fallback(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError ICU4XTimeZoneFormatter_create_with_iso_8601_fallback(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XIsoTimeZoneOptions options);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_generic_non_location_long(ICU4XTimeZoneFormatter* self, const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_generic_non_location_short(ICU4XTimeZoneFormatter* self, const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_specific_non_location_long(ICU4XTimeZoneFormatter* self, const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_specific_non_location_short(ICU4XTimeZoneFormatter* self, const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_generic_location_format(ICU4XTimeZoneFormatter* self, const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_include_localized_gmt_format(ICU4XTimeZoneFormatter* self);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_iso_8601_format(ICU4XTimeZoneFormatter* self, ICU4XIsoTimeZoneOptions options);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_format_custom_time_zone(const ICU4XTimeZoneFormatter* self, const ICU4XCustomTimeZone* value, DiplomatWriteable* write);
+void ICU4XTimeZoneFormatter_destroy(ICU4XTimeZoneFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XTitlecaseMapper.h b/intl/icu_capi/c/include/ICU4XTitlecaseMapper.h
new file mode 100644
index 0000000000..04debefbf9
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XTitlecaseMapper.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XTitlecaseMapper_H
+#define ICU4XTitlecaseMapper_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XTitlecaseMapper ICU4XTitlecaseMapper;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.h"
+#include "ICU4XLocale.h"
+#include "ICU4XTitlecaseOptionsV1.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError ICU4XTitlecaseMapper_create(const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XTitlecaseMapper_titlecase_segment_v1(const ICU4XTitlecaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, ICU4XTitlecaseOptionsV1 options, DiplomatWriteable* write);
+void ICU4XTitlecaseMapper_destroy(ICU4XTitlecaseMapper* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XTitlecaseOptionsV1.h b/intl/icu_capi/c/include/ICU4XTitlecaseOptionsV1.h
new file mode 100644
index 0000000000..a828188560
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XTitlecaseOptionsV1.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XTitlecaseOptionsV1_H
+#define ICU4XTitlecaseOptionsV1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XLeadingAdjustment.h"
+#include "ICU4XTrailingCase.h"
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XTitlecaseOptionsV1 {
+ ICU4XLeadingAdjustment leading_adjustment;
+ ICU4XTrailingCase trailing_case;
+} ICU4XTitlecaseOptionsV1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XLeadingAdjustment.h"
+#include "ICU4XTrailingCase.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+ICU4XTitlecaseOptionsV1 ICU4XTitlecaseOptionsV1_default_options();
+void ICU4XTitlecaseOptionsV1_destroy(ICU4XTitlecaseOptionsV1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XTrailingCase.h b/intl/icu_capi/c/include/ICU4XTrailingCase.h
new file mode 100644
index 0000000000..d8957e0088
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XTrailingCase.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XTrailingCase_H
+#define ICU4XTrailingCase_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XTrailingCase {
+ ICU4XTrailingCase_Lower = 0,
+ ICU4XTrailingCase_Unchanged = 1,
+} ICU4XTrailingCase;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XTrailingCase_destroy(ICU4XTrailingCase* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XTransformResult.h b/intl/icu_capi/c/include/ICU4XTransformResult.h
new file mode 100644
index 0000000000..66b268e266
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XTransformResult.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XTransformResult_H
+#define ICU4XTransformResult_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XTransformResult {
+ ICU4XTransformResult_Modified = 0,
+ ICU4XTransformResult_Unmodified = 1,
+} ICU4XTransformResult;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XTransformResult_destroy(ICU4XTransformResult* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XUnicodeSetData.h b/intl/icu_capi/c/include/ICU4XUnicodeSetData.h
new file mode 100644
index 0000000000..3e10e53097
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XUnicodeSetData.h
@@ -0,0 +1,48 @@
+#ifndef ICU4XUnicodeSetData_H
+#define ICU4XUnicodeSetData_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XUnicodeSetData ICU4XUnicodeSetData;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.h"
+#include "ICU4XLocale.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+bool ICU4XUnicodeSetData_contains(const ICU4XUnicodeSetData* self, const char* s_data, size_t s_len);
+
+bool ICU4XUnicodeSetData_contains_char(const ICU4XUnicodeSetData* self, char32_t cp);
+
+bool ICU4XUnicodeSetData_contains32(const ICU4XUnicodeSetData* self, uint32_t cp);
+
+diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_basic_emoji(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_main(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_auxiliary(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_punctuation(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_numbers(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_index(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+void ICU4XUnicodeSetData_destroy(ICU4XUnicodeSetData* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XWeekCalculator.h b/intl/icu_capi/c/include/ICU4XWeekCalculator.h
new file mode 100644
index 0000000000..02a52c6e87
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XWeekCalculator.h
@@ -0,0 +1,39 @@
+#ifndef ICU4XWeekCalculator_H
+#define ICU4XWeekCalculator_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XWeekCalculator ICU4XWeekCalculator;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "diplomat_result_box_ICU4XWeekCalculator_ICU4XError.h"
+#include "ICU4XIsoWeekday.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XWeekCalculator_ICU4XError ICU4XWeekCalculator_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+ICU4XWeekCalculator* ICU4XWeekCalculator_create_from_first_day_of_week_and_min_week_days(ICU4XIsoWeekday first_weekday, uint8_t min_week_days);
+
+ICU4XIsoWeekday ICU4XWeekCalculator_first_weekday(const ICU4XWeekCalculator* self);
+
+uint8_t ICU4XWeekCalculator_min_week_days(const ICU4XWeekCalculator* self);
+void ICU4XWeekCalculator_destroy(ICU4XWeekCalculator* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XWeekOf.h b/intl/icu_capi/c/include/ICU4XWeekOf.h
new file mode 100644
index 0000000000..5441b943d4
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XWeekOf.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XWeekOf_H
+#define ICU4XWeekOf_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XWeekRelativeUnit.h"
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XWeekOf {
+ uint16_t week;
+ ICU4XWeekRelativeUnit unit;
+} ICU4XWeekOf;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XWeekRelativeUnit.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XWeekOf_destroy(ICU4XWeekOf* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XWeekRelativeUnit.h b/intl/icu_capi/c/include/ICU4XWeekRelativeUnit.h
new file mode 100644
index 0000000000..ee6802dc3b
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XWeekRelativeUnit.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XWeekRelativeUnit_H
+#define ICU4XWeekRelativeUnit_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XWeekRelativeUnit {
+ ICU4XWeekRelativeUnit_Previous = 0,
+ ICU4XWeekRelativeUnit_Current = 1,
+ ICU4XWeekRelativeUnit_Next = 2,
+} ICU4XWeekRelativeUnit;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XWeekRelativeUnit_destroy(ICU4XWeekRelativeUnit* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XWordBreakIteratorLatin1.h b/intl/icu_capi/c/include/ICU4XWordBreakIteratorLatin1.h
new file mode 100644
index 0000000000..112025bdf5
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XWordBreakIteratorLatin1.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XWordBreakIteratorLatin1_H
+#define ICU4XWordBreakIteratorLatin1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XWordBreakIteratorLatin1 ICU4XWordBreakIteratorLatin1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XSegmenterWordType.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XWordBreakIteratorLatin1_next(ICU4XWordBreakIteratorLatin1* self);
+
+ICU4XSegmenterWordType ICU4XWordBreakIteratorLatin1_word_type(const ICU4XWordBreakIteratorLatin1* self);
+
+bool ICU4XWordBreakIteratorLatin1_is_word_like(const ICU4XWordBreakIteratorLatin1* self);
+void ICU4XWordBreakIteratorLatin1_destroy(ICU4XWordBreakIteratorLatin1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XWordBreakIteratorUtf16.h b/intl/icu_capi/c/include/ICU4XWordBreakIteratorUtf16.h
new file mode 100644
index 0000000000..676aea3cff
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XWordBreakIteratorUtf16.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XWordBreakIteratorUtf16_H
+#define ICU4XWordBreakIteratorUtf16_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XWordBreakIteratorUtf16 ICU4XWordBreakIteratorUtf16;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XSegmenterWordType.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XWordBreakIteratorUtf16_next(ICU4XWordBreakIteratorUtf16* self);
+
+ICU4XSegmenterWordType ICU4XWordBreakIteratorUtf16_word_type(const ICU4XWordBreakIteratorUtf16* self);
+
+bool ICU4XWordBreakIteratorUtf16_is_word_like(const ICU4XWordBreakIteratorUtf16* self);
+void ICU4XWordBreakIteratorUtf16_destroy(ICU4XWordBreakIteratorUtf16* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XWordBreakIteratorUtf8.h b/intl/icu_capi/c/include/ICU4XWordBreakIteratorUtf8.h
new file mode 100644
index 0000000000..d8e98fb9b1
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XWordBreakIteratorUtf8.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XWordBreakIteratorUtf8_H
+#define ICU4XWordBreakIteratorUtf8_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XWordBreakIteratorUtf8 ICU4XWordBreakIteratorUtf8;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XSegmenterWordType.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XWordBreakIteratorUtf8_next(ICU4XWordBreakIteratorUtf8* self);
+
+ICU4XSegmenterWordType ICU4XWordBreakIteratorUtf8_word_type(const ICU4XWordBreakIteratorUtf8* self);
+
+bool ICU4XWordBreakIteratorUtf8_is_word_like(const ICU4XWordBreakIteratorUtf8* self);
+void ICU4XWordBreakIteratorUtf8_destroy(ICU4XWordBreakIteratorUtf8* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XWordSegmenter.h b/intl/icu_capi/c/include/ICU4XWordSegmenter.h
new file mode 100644
index 0000000000..5bef9437e0
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XWordSegmenter.h
@@ -0,0 +1,44 @@
+#ifndef ICU4XWordSegmenter_H
+#define ICU4XWordSegmenter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XWordSegmenter ICU4XWordSegmenter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XWordSegmenter_ICU4XError.h"
+#include "ICU4XWordBreakIteratorUtf8.h"
+#include "ICU4XWordBreakIteratorUtf16.h"
+#include "ICU4XWordBreakIteratorLatin1.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XWordSegmenter_ICU4XError ICU4XWordSegmenter_create_auto(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XWordSegmenter_ICU4XError ICU4XWordSegmenter_create_lstm(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XWordSegmenter_ICU4XError ICU4XWordSegmenter_create_dictionary(const ICU4XDataProvider* provider);
+
+ICU4XWordBreakIteratorUtf8* ICU4XWordSegmenter_segment_utf8(const ICU4XWordSegmenter* self, const char* input_data, size_t input_len);
+
+ICU4XWordBreakIteratorUtf16* ICU4XWordSegmenter_segment_utf16(const ICU4XWordSegmenter* self, const uint16_t* input_data, size_t input_len);
+
+ICU4XWordBreakIteratorLatin1* ICU4XWordSegmenter_segment_latin1(const ICU4XWordSegmenter* self, const uint8_t* input_data, size_t input_len);
+void ICU4XWordSegmenter_destroy(ICU4XWordSegmenter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/ICU4XZonedDateTimeFormatter.h b/intl/icu_capi/c/include/ICU4XZonedDateTimeFormatter.h
new file mode 100644
index 0000000000..77b228a5a2
--- /dev/null
+++ b/intl/icu_capi/c/include/ICU4XZonedDateTimeFormatter.h
@@ -0,0 +1,45 @@
+#ifndef ICU4XZonedDateTimeFormatter_H
+#define ICU4XZonedDateTimeFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XZonedDateTimeFormatter ICU4XZonedDateTimeFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XDateLength.h"
+#include "ICU4XTimeLength.h"
+#include "diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError.h"
+#include "ICU4XIsoTimeZoneOptions.h"
+#include "ICU4XDateTime.h"
+#include "ICU4XCustomTimeZone.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XIsoDateTime.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError ICU4XZonedDateTimeFormatter_create_with_lengths(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length);
+
+diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError ICU4XZonedDateTimeFormatter_create_with_lengths_and_iso_8601_time_zone_fallback(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length, ICU4XIsoTimeZoneOptions zone_options);
+
+diplomat_result_void_ICU4XError ICU4XZonedDateTimeFormatter_format_datetime_with_custom_time_zone(const ICU4XZonedDateTimeFormatter* self, const ICU4XDateTime* datetime, const ICU4XCustomTimeZone* time_zone, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XZonedDateTimeFormatter_format_iso_datetime_with_custom_time_zone(const ICU4XZonedDateTimeFormatter* self, const ICU4XIsoDateTime* datetime, const ICU4XCustomTimeZone* time_zone, DiplomatWriteable* write);
+void ICU4XZonedDateTimeFormatter_destroy(ICU4XZonedDateTimeFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_ICU4XAnyCalendarKind_void.h b/intl/icu_capi/c/include/diplomat_result_ICU4XAnyCalendarKind_void.h
new file mode 100644
index 0000000000..f67f66ed4d
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_ICU4XAnyCalendarKind_void.h
@@ -0,0 +1,24 @@
+#ifndef diplomat_result_ICU4XAnyCalendarKind_void_H
+#define diplomat_result_ICU4XAnyCalendarKind_void_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XAnyCalendarKind.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_ICU4XAnyCalendarKind_void {
+ union {
+ ICU4XAnyCalendarKind ok;
+ };
+ bool is_ok;
+} diplomat_result_ICU4XAnyCalendarKind_void;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_ICU4XPluralCategory_void.h b/intl/icu_capi/c/include/diplomat_result_ICU4XPluralCategory_void.h
new file mode 100644
index 0000000000..b56ef60acb
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_ICU4XPluralCategory_void.h
@@ -0,0 +1,24 @@
+#ifndef diplomat_result_ICU4XPluralCategory_void_H
+#define diplomat_result_ICU4XPluralCategory_void_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XPluralCategory.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_ICU4XPluralCategory_void {
+ union {
+ ICU4XPluralCategory ok;
+ };
+ bool is_ok;
+} diplomat_result_ICU4XPluralCategory_void;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_ICU4XWeekOf_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_ICU4XWeekOf_ICU4XError.h
new file mode 100644
index 0000000000..4dee8f941f
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_ICU4XWeekOf_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_ICU4XWeekOf_ICU4XError_H
+#define diplomat_result_ICU4XWeekOf_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XWeekOf.h"
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_ICU4XWeekOf_ICU4XError {
+ union {
+ ICU4XWeekOf ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_ICU4XWeekOf_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_bool_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_bool_ICU4XError.h
new file mode 100644
index 0000000000..015930214d
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_bool_ICU4XError.h
@@ -0,0 +1,25 @@
+#ifndef diplomat_result_bool_ICU4XError_H
+#define diplomat_result_bool_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_bool_ICU4XError {
+ union {
+ bool ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_bool_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError.h
new file mode 100644
index 0000000000..0d18fe4076
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError_H
+#define diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XBcp47ToIanaMapper ICU4XBcp47ToIanaMapper;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError {
+ union {
+ ICU4XBcp47ToIanaMapper* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XBidi_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XBidi_ICU4XError.h
new file mode 100644
index 0000000000..f1cd7ca6a3
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XBidi_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XBidi_ICU4XError_H
+#define diplomat_result_box_ICU4XBidi_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XBidi ICU4XBidi;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XBidi_ICU4XError {
+ union {
+ ICU4XBidi* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XBidi_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCalendar_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCalendar_ICU4XError.h
new file mode 100644
index 0000000000..bffa22c6b0
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCalendar_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCalendar_ICU4XError_H
+#define diplomat_result_box_ICU4XCalendar_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCalendar ICU4XCalendar;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCalendar_ICU4XError {
+ union {
+ ICU4XCalendar* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCalendar_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.h
new file mode 100644
index 0000000000..2c05f79671
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError_H
+#define diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCanonicalCombiningClassMap ICU4XCanonicalCombiningClassMap;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError {
+ union {
+ ICU4XCanonicalCombiningClassMap* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.h
new file mode 100644
index 0000000000..66d0386ff8
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCanonicalComposition_ICU4XError_H
+#define diplomat_result_box_ICU4XCanonicalComposition_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCanonicalComposition ICU4XCanonicalComposition;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCanonicalComposition_ICU4XError {
+ union {
+ ICU4XCanonicalComposition* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCanonicalComposition_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.h
new file mode 100644
index 0000000000..cf02637fef
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError_H
+#define diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCanonicalDecomposition ICU4XCanonicalDecomposition;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError {
+ union {
+ ICU4XCanonicalDecomposition* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.h
new file mode 100644
index 0000000000..7b2a957399
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCaseMapCloser_ICU4XError_H
+#define diplomat_result_box_ICU4XCaseMapCloser_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCaseMapCloser ICU4XCaseMapCloser;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCaseMapCloser_ICU4XError {
+ union {
+ ICU4XCaseMapCloser* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCaseMapCloser_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCaseMapper_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCaseMapper_ICU4XError.h
new file mode 100644
index 0000000000..c6e03a748c
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCaseMapper_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCaseMapper_ICU4XError_H
+#define diplomat_result_box_ICU4XCaseMapper_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCaseMapper ICU4XCaseMapper;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCaseMapper_ICU4XError {
+ union {
+ ICU4XCaseMapper* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCaseMapper_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.h
new file mode 100644
index 0000000000..fbe11daad2
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCodePointMapData16_ICU4XError_H
+#define diplomat_result_box_ICU4XCodePointMapData16_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCodePointMapData16 ICU4XCodePointMapData16;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCodePointMapData16_ICU4XError {
+ union {
+ ICU4XCodePointMapData16* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCodePointMapData16_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.h
new file mode 100644
index 0000000000..2e203279e3
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCodePointMapData8_ICU4XError_H
+#define diplomat_result_box_ICU4XCodePointMapData8_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCodePointMapData8 ICU4XCodePointMapData8;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCodePointMapData8_ICU4XError {
+ union {
+ ICU4XCodePointMapData8* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCodePointMapData8_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointSetData_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointSetData_ICU4XError.h
new file mode 100644
index 0000000000..e70e39ba61
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointSetData_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCodePointSetData_ICU4XError_H
+#define diplomat_result_box_ICU4XCodePointSetData_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCodePointSetData ICU4XCodePointSetData;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCodePointSetData_ICU4XError {
+ union {
+ ICU4XCodePointSetData* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCodePointSetData_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCollator_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCollator_ICU4XError.h
new file mode 100644
index 0000000000..abb5c8a598
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCollator_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCollator_ICU4XError_H
+#define diplomat_result_box_ICU4XCollator_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCollator ICU4XCollator;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCollator_ICU4XError {
+ union {
+ ICU4XCollator* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCollator_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.h
new file mode 100644
index 0000000000..d0c381ef03
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XComposingNormalizer_ICU4XError_H
+#define diplomat_result_box_ICU4XComposingNormalizer_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XComposingNormalizer ICU4XComposingNormalizer;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XComposingNormalizer_ICU4XError {
+ union {
+ ICU4XComposingNormalizer* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XComposingNormalizer_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.h
new file mode 100644
index 0000000000..4709a89871
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCustomTimeZone_ICU4XError_H
+#define diplomat_result_box_ICU4XCustomTimeZone_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCustomTimeZone ICU4XCustomTimeZone;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCustomTimeZone_ICU4XError {
+ union {
+ ICU4XCustomTimeZone* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCustomTimeZone_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XDataProvider_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDataProvider_ICU4XError.h
new file mode 100644
index 0000000000..a5be844183
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDataProvider_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XDataProvider_ICU4XError_H
+#define diplomat_result_box_ICU4XDataProvider_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XDataProvider ICU4XDataProvider;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XDataProvider_ICU4XError {
+ union {
+ ICU4XDataProvider* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XDataProvider_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XDataStruct_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDataStruct_ICU4XError.h
new file mode 100644
index 0000000000..d8c1d33e21
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDataStruct_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XDataStruct_ICU4XError_H
+#define diplomat_result_box_ICU4XDataStruct_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XDataStruct ICU4XDataStruct;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XDataStruct_ICU4XError {
+ union {
+ ICU4XDataStruct* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XDataStruct_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateFormatter_ICU4XError.h
new file mode 100644
index 0000000000..b6d9671434
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XDateFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XDateFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XDateFormatter ICU4XDateFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XDateFormatter_ICU4XError {
+ union {
+ ICU4XDateFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XDateFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError.h
new file mode 100644
index 0000000000..855e74fe6c
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XDateTimeFormatter ICU4XDateTimeFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError {
+ union {
+ ICU4XDateTimeFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateTime_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateTime_ICU4XError.h
new file mode 100644
index 0000000000..2d4cb2fe48
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateTime_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XDateTime_ICU4XError_H
+#define diplomat_result_box_ICU4XDateTime_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XDateTime ICU4XDateTime;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XDateTime_ICU4XError {
+ union {
+ ICU4XDateTime* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XDateTime_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XDate_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDate_ICU4XError.h
new file mode 100644
index 0000000000..30461b264a
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDate_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XDate_ICU4XError_H
+#define diplomat_result_box_ICU4XDate_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XDate ICU4XDate;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XDate_ICU4XError {
+ union {
+ ICU4XDate* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XDate_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.h
new file mode 100644
index 0000000000..c51d9907bc
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError_H
+#define diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XDecomposingNormalizer ICU4XDecomposingNormalizer;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError {
+ union {
+ ICU4XDecomposingNormalizer* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.h
new file mode 100644
index 0000000000..8ee245a093
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XFixedDecimalFormatter ICU4XFixedDecimalFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError {
+ union {
+ ICU4XFixedDecimalFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.h
new file mode 100644
index 0000000000..f45cd78fb9
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XFixedDecimal_ICU4XError_H
+#define diplomat_result_box_ICU4XFixedDecimal_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XFixedDecimal ICU4XFixedDecimal;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XFixedDecimal_ICU4XError {
+ union {
+ ICU4XFixedDecimal* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XFixedDecimal_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.h
new file mode 100644
index 0000000000..98ff137a9a
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError_H
+#define diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XGeneralCategoryNameToMaskMapper ICU4XGeneralCategoryNameToMaskMapper;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError {
+ union {
+ ICU4XGeneralCategoryNameToMaskMapper* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.h
new file mode 100644
index 0000000000..d560b381a5
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError_H
+#define diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XGraphemeClusterSegmenter ICU4XGraphemeClusterSegmenter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError {
+ union {
+ ICU4XGraphemeClusterSegmenter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError.h
new file mode 100644
index 0000000000..86b13be912
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XGregorianDateFormatter ICU4XGregorianDateFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError {
+ union {
+ ICU4XGregorianDateFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError.h
new file mode 100644
index 0000000000..4393d9ffb0
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XGregorianDateTimeFormatter ICU4XGregorianDateTimeFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError {
+ union {
+ ICU4XGregorianDateTimeFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError.h
new file mode 100644
index 0000000000..270b38ba94
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XGregorianZonedDateTimeFormatter ICU4XGregorianZonedDateTimeFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError {
+ union {
+ ICU4XGregorianZonedDateTimeFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError.h
new file mode 100644
index 0000000000..2e05730b0b
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError_H
+#define diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XIanaToBcp47Mapper ICU4XIanaToBcp47Mapper;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError {
+ union {
+ ICU4XIanaToBcp47Mapper* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.h
new file mode 100644
index 0000000000..8a55b47a68
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XIsoDateTime_ICU4XError_H
+#define diplomat_result_box_ICU4XIsoDateTime_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XIsoDateTime ICU4XIsoDateTime;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XIsoDateTime_ICU4XError {
+ union {
+ ICU4XIsoDateTime* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XIsoDateTime_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XIsoDate_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XIsoDate_ICU4XError.h
new file mode 100644
index 0000000000..8528d73b07
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XIsoDate_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XIsoDate_ICU4XError_H
+#define diplomat_result_box_ICU4XIsoDate_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XIsoDate ICU4XIsoDate;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XIsoDate_ICU4XError {
+ union {
+ ICU4XIsoDate* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XIsoDate_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.h
new file mode 100644
index 0000000000..004d3494ae
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLineSegmenter_ICU4XError_H
+#define diplomat_result_box_ICU4XLineSegmenter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLineSegmenter ICU4XLineSegmenter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLineSegmenter_ICU4XError {
+ union {
+ ICU4XLineSegmenter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLineSegmenter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XListFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XListFormatter_ICU4XError.h
new file mode 100644
index 0000000000..df40aa2dae
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XListFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XListFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XListFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XListFormatter ICU4XListFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XListFormatter_ICU4XError {
+ union {
+ ICU4XListFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XListFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError.h
new file mode 100644
index 0000000000..a49bb700ca
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError_H
+#define diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLocaleCanonicalizer ICU4XLocaleCanonicalizer;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError {
+ union {
+ ICU4XLocaleCanonicalizer* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.h
new file mode 100644
index 0000000000..740f9d99fa
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError_H
+#define diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLocaleDirectionality ICU4XLocaleDirectionality;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError {
+ union {
+ ICU4XLocaleDirectionality* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.h
new file mode 100644
index 0000000000..6b0f09b2a2
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLocaleDisplayNamesFormatter ICU4XLocaleDisplayNamesFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError {
+ union {
+ ICU4XLocaleDisplayNamesFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleExpander_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleExpander_ICU4XError.h
new file mode 100644
index 0000000000..c7275e699c
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleExpander_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLocaleExpander_ICU4XError_H
+#define diplomat_result_box_ICU4XLocaleExpander_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLocaleExpander ICU4XLocaleExpander;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLocaleExpander_ICU4XError {
+ union {
+ ICU4XLocaleExpander* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLocaleExpander_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.h
new file mode 100644
index 0000000000..0dc002718e
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError_H
+#define diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLocaleFallbackerWithConfig ICU4XLocaleFallbackerWithConfig;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError {
+ union {
+ ICU4XLocaleFallbackerWithConfig* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.h
new file mode 100644
index 0000000000..3427bf3e3a
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError_H
+#define diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLocaleFallbacker ICU4XLocaleFallbacker;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError {
+ union {
+ ICU4XLocaleFallbacker* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocale_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocale_ICU4XError.h
new file mode 100644
index 0000000000..f5720b612f
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocale_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLocale_ICU4XError_H
+#define diplomat_result_box_ICU4XLocale_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLocale ICU4XLocale;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLocale_ICU4XError {
+ union {
+ ICU4XLocale* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLocale_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.h
new file mode 100644
index 0000000000..ebd519e0b5
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError_H
+#define diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XMetazoneCalculator ICU4XMetazoneCalculator;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError {
+ union {
+ ICU4XMetazoneCalculator* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XPluralOperands_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XPluralOperands_ICU4XError.h
new file mode 100644
index 0000000000..7c068ba4b8
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XPluralOperands_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XPluralOperands_ICU4XError_H
+#define diplomat_result_box_ICU4XPluralOperands_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XPluralOperands ICU4XPluralOperands;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XPluralOperands_ICU4XError {
+ union {
+ ICU4XPluralOperands* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XPluralOperands_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XPluralRules_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XPluralRules_ICU4XError.h
new file mode 100644
index 0000000000..4fa522b850
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XPluralRules_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XPluralRules_ICU4XError_H
+#define diplomat_result_box_ICU4XPluralRules_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XPluralRules ICU4XPluralRules;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XPluralRules_ICU4XError {
+ union {
+ ICU4XPluralRules* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XPluralRules_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.h
new file mode 100644
index 0000000000..047ef959b0
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError_H
+#define diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XPropertyValueNameToEnumMapper ICU4XPropertyValueNameToEnumMapper;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError {
+ union {
+ ICU4XPropertyValueNameToEnumMapper* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.h
new file mode 100644
index 0000000000..fcf7e88a23
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError_H
+#define diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XRegionDisplayNames ICU4XRegionDisplayNames;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError {
+ union {
+ ICU4XRegionDisplayNames* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.h
new file mode 100644
index 0000000000..bffd6161aa
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError_H
+#define diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XScriptWithExtensions ICU4XScriptWithExtensions;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError {
+ union {
+ ICU4XScriptWithExtensions* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.h
new file mode 100644
index 0000000000..a8ab968fa9
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError_H
+#define diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XSentenceSegmenter ICU4XSentenceSegmenter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError {
+ union {
+ ICU4XSentenceSegmenter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XTimeFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTimeFormatter_ICU4XError.h
new file mode 100644
index 0000000000..0e63cbbc2a
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTimeFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XTimeFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XTimeFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XTimeFormatter ICU4XTimeFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XTimeFormatter_ICU4XError {
+ union {
+ ICU4XTimeFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XTimeFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError.h
new file mode 100644
index 0000000000..5f4851051e
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XTimeZoneFormatter ICU4XTimeZoneFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError {
+ union {
+ ICU4XTimeZoneFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XTime_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTime_ICU4XError.h
new file mode 100644
index 0000000000..3e58b1e4da
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTime_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XTime_ICU4XError_H
+#define diplomat_result_box_ICU4XTime_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XTime ICU4XTime;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XTime_ICU4XError {
+ union {
+ ICU4XTime* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XTime_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.h
new file mode 100644
index 0000000000..f8b017cfd4
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError_H
+#define diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XTitlecaseMapper ICU4XTitlecaseMapper;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError {
+ union {
+ ICU4XTitlecaseMapper* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.h
new file mode 100644
index 0000000000..6dd14e82b6
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XUnicodeSetData_ICU4XError_H
+#define diplomat_result_box_ICU4XUnicodeSetData_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XUnicodeSetData ICU4XUnicodeSetData;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XUnicodeSetData_ICU4XError {
+ union {
+ ICU4XUnicodeSetData* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XUnicodeSetData_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.h
new file mode 100644
index 0000000000..1f547fd383
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XWeekCalculator_ICU4XError_H
+#define diplomat_result_box_ICU4XWeekCalculator_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XWeekCalculator ICU4XWeekCalculator;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XWeekCalculator_ICU4XError {
+ union {
+ ICU4XWeekCalculator* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XWeekCalculator_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.h
new file mode 100644
index 0000000000..e41c59b661
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XWordSegmenter_ICU4XError_H
+#define diplomat_result_box_ICU4XWordSegmenter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XWordSegmenter ICU4XWordSegmenter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XWordSegmenter_ICU4XError {
+ union {
+ ICU4XWordSegmenter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XWordSegmenter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError.h
new file mode 100644
index 0000000000..52a0ab4462
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XZonedDateTimeFormatter ICU4XZonedDateTimeFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError {
+ union {
+ ICU4XZonedDateTimeFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_int32_t_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_int32_t_ICU4XError.h
new file mode 100644
index 0000000000..adbe148dd1
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_int32_t_ICU4XError.h
@@ -0,0 +1,25 @@
+#ifndef diplomat_result_int32_t_ICU4XError_H
+#define diplomat_result_int32_t_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_int32_t_ICU4XError {
+ union {
+ int32_t ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_int32_t_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_uint16_t_void.h b/intl/icu_capi/c/include/diplomat_result_uint16_t_void.h
new file mode 100644
index 0000000000..3adeb5f36d
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_uint16_t_void.h
@@ -0,0 +1,23 @@
+#ifndef diplomat_result_uint16_t_void_H
+#define diplomat_result_uint16_t_void_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_uint16_t_void {
+ union {
+ uint16_t ok;
+ };
+ bool is_ok;
+} diplomat_result_uint16_t_void;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_void_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_void_ICU4XError.h
new file mode 100644
index 0000000000..f092491e34
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_void_ICU4XError.h
@@ -0,0 +1,24 @@
+#ifndef diplomat_result_void_ICU4XError_H
+#define diplomat_result_void_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_void_ICU4XError {
+ union {
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_void_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_result_void_void.h b/intl/icu_capi/c/include/diplomat_result_void_void.h
new file mode 100644
index 0000000000..2d5cc704e5
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_result_void_void.h
@@ -0,0 +1,20 @@
+#ifndef diplomat_result_void_void_H
+#define diplomat_result_void_void_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_void_void {
+ bool is_ok;
+} diplomat_result_void_void;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/c/include/diplomat_runtime.h b/intl/icu_capi/c/include/diplomat_runtime.h
new file mode 100644
index 0000000000..de0f9c76fe
--- /dev/null
+++ b/intl/icu_capi/c/include/diplomat_runtime.h
@@ -0,0 +1,70 @@
+#ifndef DIPLOMAT_RUNTIME_C_H
+#define DIPLOMAT_RUNTIME_C_H
+
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <sys/types.h>
+
+// uchar.h doesn't always exist, but char32_t is always available
+// in C++ anyway
+#ifndef __cplusplus
+#ifdef __APPLE__
+#include <stdint.h>
+typedef uint16_t char16_t;
+typedef uint32_t char32_t;
+#else
+#include <uchar.h>
+#endif
+#endif
+
+
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+typedef struct DiplomatWriteable {
+ void* context;
+ char* buf;
+ size_t len;
+ size_t cap;
+ void (*flush)(struct DiplomatWriteable*);
+ bool (*grow)(struct DiplomatWriteable*, size_t);
+} DiplomatWriteable;
+
+DiplomatWriteable diplomat_simple_writeable(char* buf, size_t buf_size);
+
+typedef struct DiplomatStringView {
+ const char* data;
+ size_t len;
+} DiplomatStringView;
+
+#define MAKE_SLICE_VIEW(name, c_ty) \
+ typedef struct Diplomat##name##View { \
+ const c_ty* data; \
+ size_t len; \
+ } Diplomat##name##View;
+
+MAKE_SLICE_VIEW(I8, int8_t)
+MAKE_SLICE_VIEW(U8, uint8_t)
+MAKE_SLICE_VIEW(I16, int16_t)
+MAKE_SLICE_VIEW(U16, uint16_t)
+MAKE_SLICE_VIEW(I32, int32_t)
+MAKE_SLICE_VIEW(U32, uint32_t)
+MAKE_SLICE_VIEW(I64, int64_t)
+MAKE_SLICE_VIEW(U64, uint64_t)
+MAKE_SLICE_VIEW(Isize, intptr_t)
+MAKE_SLICE_VIEW(Usize, size_t)
+MAKE_SLICE_VIEW(F32, float)
+MAKE_SLICE_VIEW(F64, double)
+MAKE_SLICE_VIEW(Bool, bool)
+MAKE_SLICE_VIEW(Char, char32_t)
+
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+
+#endif
diff --git a/intl/icu_capi/cpp/README.md b/intl/icu_capi/cpp/README.md
new file mode 100644
index 0000000000..6eda457ddd
--- /dev/null
+++ b/intl/icu_capi/cpp/README.md
@@ -0,0 +1,17 @@
+# C++ FFI for ICU4X
+
+This folder contains the C++ FFI for ICU4X. To re-generate the bindings run:
+
+```sh
+cargo make diplomat-gen-cpp
+```
+
+Or re-generate all of the bindings:
+
+```sh
+cargo make diplomat-gen
+```
+
+## More Information
+
+For more information on development, authorship, contributing etc. please visit [`ICU4X home page`](https://github.com/unicode-org/icu4x).
diff --git a/intl/icu_capi/cpp/docs/.gitignore b/intl/icu_capi/cpp/docs/.gitignore
new file mode 100644
index 0000000000..c795b054e5
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/.gitignore
@@ -0,0 +1 @@
+build \ No newline at end of file
diff --git a/intl/icu_capi/cpp/docs/Makefile b/intl/icu_capi/cpp/docs/Makefile
new file mode 100644
index 0000000000..7916981874
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/Makefile
@@ -0,0 +1,25 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+# This file was autogenerated by `sphinx-quickstart`
+
+# Minimal makefile for Sphinx documentation
+
+# You can set these variables from the command line, and also
+# from the environment for the first two.
+SPHINXOPTS ?=
+SPHINXBUILD ?= sphinx-build
+SOURCEDIR = source
+BUILDDIR = build
+
+# Put it first so that "make" without argument is like "make help".
+help:
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.PHONY: help Makefile
+
+# Catch-all target: route all unknown targets to Sphinx using the new
+# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
+%: Makefile
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff --git a/intl/icu_capi/cpp/docs/make.bat b/intl/icu_capi/cpp/docs/make.bat
new file mode 100644
index 0000000000..dccc519d6d
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/make.bat
@@ -0,0 +1,41 @@
+REM This file is part of ICU4X. For terms of use, please see the file
+REM called LICENSE at the top level of the ICU4X source tree
+REM (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+REM This file was autogenerated by `sphinx-quickstart`
+
+@ECHO OFF
+
+pushd %~dp0
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+set SOURCEDIR=source
+set BUILDDIR=build
+
+if "%1" == "" goto help
+
+%SPHINXBUILD% >NUL 2>NUL
+if errorlevel 9009 (
+ echo.
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
+ echo.installed, then set the SPHINXBUILD environment variable to point
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
+ echo.may add the Sphinx directory to PATH.
+ echo.
+ echo.If you don't have Sphinx installed, grab it from
+ echo.http://sphinx-doc.org/
+ exit /b 1
+)
+
+%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+goto end
+
+:help
+%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+
+:end
+popd
diff --git a/intl/icu_capi/cpp/docs/source/bidi_ffi.rst b/intl/icu_capi/cpp/docs/source/bidi_ffi.rst
new file mode 100644
index 0000000000..90164c4daa
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/bidi_ffi.rst
@@ -0,0 +1,194 @@
+``bidi::ffi``
+=============
+
+.. cpp:class:: ICU4XBidi
+
+ An ICU4X Bidi object, containing loaded bidi data
+
+ See the `Rust documentation for BidiClassAdapter <https://docs.rs/icu/latest/icu/properties/bidi/struct.BidiClassAdapter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XBidi, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ Creates a new :cpp:class:`ICU4XBidi` from locale data.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/properties/bidi/struct.BidiClassAdapter.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: ICU4XBidiInfo for_text(const std::string_view text, uint8_t default_level) const
+
+ Use the data loaded in this object to process a string and calculate bidi information
+
+ Takes in a Level for the default level, if it is an invalid value it will default to LTR
+
+ See the `Rust documentation for new_with_data_source <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html#method.new_with_data_source>`__ for more information.
+
+ Lifetimes: ``text`` must live at least as long as the output.
+
+
+ .. cpp:function:: ICU4XReorderedIndexMap reorder_visual(const diplomat::span<const uint8_t> levels) const
+
+ Utility function for producing reorderings given a list of levels
+
+ Produces a map saying which visual index maps to which source index.
+
+ The levels array must not have values greater than 126 (this is the Bidi maximum explicit depth plus one). Failure to follow this invariant may lead to incorrect results, but is still safe.
+
+ See the `Rust documentation for reorder_visual <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html#method.reorder_visual>`__ for more information.
+
+
+ .. cpp:function:: static bool level_is_rtl(uint8_t level)
+
+ Check if a Level returned by level_at is an RTL level.
+
+ Invalid levels (numbers greater than 125) will be assumed LTR
+
+ See the `Rust documentation for is_rtl <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.is_rtl>`__ for more information.
+
+
+ .. cpp:function:: static bool level_is_ltr(uint8_t level)
+
+ Check if a Level returned by level_at is an LTR level.
+
+ Invalid levels (numbers greater than 125) will be assumed LTR
+
+ See the `Rust documentation for is_ltr <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.is_ltr>`__ for more information.
+
+
+ .. cpp:function:: static uint8_t level_rtl()
+
+ Get a basic RTL Level value
+
+ See the `Rust documentation for rtl <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.rtl>`__ for more information.
+
+
+ .. cpp:function:: static uint8_t level_ltr()
+
+ Get a simple LTR Level value
+
+ See the `Rust documentation for ltr <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.ltr>`__ for more information.
+
+
+.. cpp:enum-struct:: ICU4XBidiDirection
+
+ .. cpp:enumerator:: Ltr
+
+ .. cpp:enumerator:: Rtl
+
+ .. cpp:enumerator:: Mixed
+
+.. cpp:class:: ICU4XBidiInfo
+
+ An object containing bidi information for a given string, produced by ``for_text()`` on ``ICU4XBidi``
+
+ See the `Rust documentation for BidiInfo <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html>`__ for more information.
+
+
+ .. cpp:function:: size_t paragraph_count() const
+
+ The number of paragraphs contained here
+
+
+ .. cpp:function:: std::optional<ICU4XBidiParagraph> paragraph_at(size_t n) const
+
+ Get the nth paragraph, returning ``None`` if out of bounds
+
+ Lifetimes: ``this`` must live at least as long as the output.
+
+
+ .. cpp:function:: size_t size() const
+
+ The number of bytes in this full text
+
+
+ .. cpp:function:: uint8_t level_at(size_t pos) const
+
+ Get the BIDI level at a particular byte index in the full text. This integer is conceptually a ``unicode_bidi::Level``, and can be further inspected using the static methods on ICU4XBidi.
+
+ Returns 0 (equivalent to ``Level::ltr()``) on error
+
+
+.. cpp:class:: ICU4XBidiParagraph
+
+ Bidi information for a single processed paragraph
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> set_paragraph_in_text(size_t n)
+
+ Given a paragraph index ``n`` within the surrounding text, this sets this object to the paragraph at that index. Returns ``ICU4XError::OutOfBoundsError`` when out of bounds.
+
+ This is equivalent to calling ``paragraph_at()`` on ``ICU4XBidiInfo`` but doesn't create a new object
+
+
+ .. cpp:function:: ICU4XBidiDirection direction() const
+
+ The primary direction of this paragraph
+
+ See the `Rust documentation for level_at <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at>`__ for more information.
+
+
+ .. cpp:function:: size_t size() const
+
+ The number of bytes in this paragraph
+
+ See the `Rust documentation for len <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.ParagraphInfo.html#method.len>`__ for more information.
+
+
+ .. cpp:function:: size_t range_start() const
+
+ The start index of this paragraph within the source text
+
+
+ .. cpp:function:: size_t range_end() const
+
+ The end index of this paragraph within the source text
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> reorder_line_to_writeable(size_t range_start, size_t range_end, W& out) const
+
+ Reorder a line based on display order. The ranges are specified relative to the source text and must be contained within this paragraph's range.
+
+ See the `Rust documentation for level_at <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> reorder_line(size_t range_start, size_t range_end) const
+
+ Reorder a line based on display order. The ranges are specified relative to the source text and must be contained within this paragraph's range.
+
+ See the `Rust documentation for level_at <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at>`__ for more information.
+
+
+ .. cpp:function:: uint8_t level_at(size_t pos) const
+
+ Get the BIDI level at a particular byte index in this paragraph. This integer is conceptually a ``unicode_bidi::Level``, and can be further inspected using the static methods on ICU4XBidi.
+
+ Returns 0 (equivalent to ``Level::ltr()``) on error
+
+ See the `Rust documentation for level_at <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at>`__ for more information.
+
+
+.. cpp:class:: ICU4XReorderedIndexMap
+
+ Thin wrapper around a vector that maps visual indices to source indices
+
+ ``map[visualIndex] = sourceIndex``
+
+ Produced by ``reorder_visual()`` on :cpp:class:`ICU4XBidi`.
+
+
+ .. cpp:function:: const diplomat::span<const size_t> as_slice() const
+
+ Get this as a slice/array of indices
+
+ Lifetimes: ``this`` must live at least as long as the output.
+
+
+ .. cpp:function:: size_t len() const
+
+ The length of this map
+
+
+ .. cpp:function:: size_t get(size_t index) const
+
+ Get element at ``index``. Returns 0 when out of bounds (note that 0 is also a valid in-bounds value, please use ``len()`` to avoid out-of-bounds)
+
diff --git a/intl/icu_capi/cpp/docs/source/calendar_ffi.rst b/intl/icu_capi/cpp/docs/source/calendar_ffi.rst
new file mode 100644
index 0000000000..fdae690d0d
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/calendar_ffi.rst
@@ -0,0 +1,157 @@
+``calendar::ffi``
+=================
+
+.. cpp:enum-struct:: ICU4XAnyCalendarKind
+
+ The various calendar types currently supported by :cpp:class:`ICU4XCalendar`
+
+ See the `Rust documentation for AnyCalendarKind <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Iso
+
+ The kind of an Iso calendar
+
+
+ .. cpp:enumerator:: Gregorian
+
+ The kind of a Gregorian calendar
+
+
+ .. cpp:enumerator:: Buddhist
+
+ The kind of a Buddhist calendar
+
+
+ .. cpp:enumerator:: Japanese
+
+ The kind of a Japanese calendar with modern eras
+
+
+ .. cpp:enumerator:: JapaneseExtended
+
+ The kind of a Japanese calendar with modern and historic eras
+
+
+ .. cpp:enumerator:: Ethiopian
+
+ The kind of an Ethiopian calendar, with Amete Mihret era
+
+
+ .. cpp:enumerator:: EthiopianAmeteAlem
+
+ The kind of an Ethiopian calendar, with Amete Alem era
+
+
+ .. cpp:enumerator:: Indian
+
+ The kind of a Indian calendar
+
+
+ .. cpp:enumerator:: Coptic
+
+ The kind of a Coptic calendar
+
+
+ .. cpp:enumerator:: Dangi
+
+ The kind of a Dangi calendar
+
+
+ .. cpp:enumerator:: Chinese
+
+ The kind of a Chinese calendar
+
+
+ .. cpp:enumerator:: Hebrew
+
+ The kind of a Hebrew calendar
+
+
+ .. cpp:enumerator:: IslamicCivil
+
+ The kind of a Islamic civil calendar
+
+
+ .. cpp:enumerator:: IslamicObservational
+
+ The kind of a Islamic observational calendar
+
+
+ .. cpp:enumerator:: IslamicTabular
+
+ The kind of a Islamic tabular calendar
+
+
+ .. cpp:enumerator:: IslamicUmmAlQura
+
+ The kind of a Islamic Umm al-Qura calendar
+
+
+ .. cpp:enumerator:: Persian
+
+ The kind of a Persian calendar
+
+
+ .. cpp:enumerator:: Roc
+
+ The kind of a Roc calendar
+
+
+ .. cpp:function:: static diplomat::result<ICU4XAnyCalendarKind, std::monostate> get_for_locale(const ICU4XLocale& locale)
+
+ Read the calendar type off of the -u-ca- extension on a locale.
+
+ Errors if there is no calendar on the locale or if the locale's calendar is not known or supported.
+
+ See the `Rust documentation for get_for_locale <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html#method.get_for_locale>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XAnyCalendarKind, std::monostate> get_for_bcp47(const std::string_view s)
+
+ Obtain the calendar type given a BCP-47 -u-ca- extension string.
+
+ Errors if the calendar is not known or supported.
+
+ See the `Rust documentation for get_for_bcp47_value <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html#method.get_for_bcp47_value>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> bcp47_to_writeable(W& write)
+
+ Obtain the string suitable for use in the -u-ca- extension in a BCP47 locale.
+
+ See the `Rust documentation for as_bcp47_string <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html#method.as_bcp47_string>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> bcp47()
+
+ Obtain the string suitable for use in the -u-ca- extension in a BCP47 locale.
+
+ See the `Rust documentation for as_bcp47_string <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html#method.as_bcp47_string>`__ for more information.
+
+
+.. cpp:class:: ICU4XCalendar
+
+ See the `Rust documentation for AnyCalendar <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCalendar, ICU4XError> create_for_locale(const ICU4XDataProvider& provider, const ICU4XLocale& locale)
+
+ Creates a new :cpp:class:`ICU4XCalendar` from the specified date and time.
+
+ See the `Rust documentation for new_for_locale <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new_for_locale>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCalendar, ICU4XError> create_for_kind(const ICU4XDataProvider& provider, ICU4XAnyCalendarKind kind)
+
+ Creates a new :cpp:class:`ICU4XCalendar` from the specified date and time.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: ICU4XAnyCalendarKind kind() const
+
+ Returns the kind of this calendar
+
+ See the `Rust documentation for kind <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.kind>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/casemap_ffi.rst b/intl/icu_capi/cpp/docs/source/casemap_ffi.rst
new file mode 100644
index 0000000000..051eb1038b
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/casemap_ffi.rst
@@ -0,0 +1,238 @@
+``casemap::ffi``
+================
+
+.. cpp:class:: ICU4XCaseMapCloser
+
+ See the `Rust documentation for CaseMapCloser <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCaseMapCloser, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ Construct a new ICU4XCaseMapper instance
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: void add_case_closure_to(char32_t c, ICU4XCodePointSetBuilder& builder) const
+
+ Adds all simple case mappings and the full case folding for ``c`` to ``builder``. Also adds special case closure mappings.
+
+ See the `Rust documentation for add_case_closure_to <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.add_case_closure_to>`__ for more information.
+
+
+ .. cpp:function:: bool add_string_case_closure_to(const std::string_view s, ICU4XCodePointSetBuilder& builder) const
+
+ Finds all characters and strings which may casemap to ``s`` as their full case folding string and adds them to the set.
+
+ Returns true if the string was found
+
+ See the `Rust documentation for add_string_case_closure_to <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.add_string_case_closure_to>`__ for more information.
+
+
+.. cpp:class:: ICU4XCaseMapper
+
+ See the `Rust documentation for CaseMapper <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCaseMapper, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ Construct a new ICU4XCaseMapper instance
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> lowercase_to_writeable(const std::string_view s, const ICU4XLocale& locale, W& write) const
+
+ Returns the full lowercase mapping of the given string
+
+ See the `Rust documentation for lowercase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.lowercase>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> lowercase(const std::string_view s, const ICU4XLocale& locale) const
+
+ Returns the full lowercase mapping of the given string
+
+ See the `Rust documentation for lowercase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.lowercase>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> uppercase_to_writeable(const std::string_view s, const ICU4XLocale& locale, W& write) const
+
+ Returns the full uppercase mapping of the given string
+
+ See the `Rust documentation for uppercase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.uppercase>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> uppercase(const std::string_view s, const ICU4XLocale& locale) const
+
+ Returns the full uppercase mapping of the given string
+
+ See the `Rust documentation for uppercase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.uppercase>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> titlecase_segment_with_only_case_data_v1_to_writeable(const std::string_view s, const ICU4XLocale& locale, ICU4XTitlecaseOptionsV1 options, W& write) const
+
+ Returns the full titlecase mapping of the given string, performing head adjustment without loading additional data. (if head adjustment is enabled in the options)
+
+ The ``v1`` refers to the version of the options struct, which may change as we add more options
+
+ See the `Rust documentation for titlecase_segment_with_only_case_data <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.titlecase_segment_with_only_case_data>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> titlecase_segment_with_only_case_data_v1(const std::string_view s, const ICU4XLocale& locale, ICU4XTitlecaseOptionsV1 options) const
+
+ Returns the full titlecase mapping of the given string, performing head adjustment without loading additional data. (if head adjustment is enabled in the options)
+
+ The ``v1`` refers to the version of the options struct, which may change as we add more options
+
+ See the `Rust documentation for titlecase_segment_with_only_case_data <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.titlecase_segment_with_only_case_data>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> fold_to_writeable(const std::string_view s, W& write) const
+
+ Case-folds the characters in the given string
+
+ See the `Rust documentation for fold <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> fold(const std::string_view s) const
+
+ Case-folds the characters in the given string
+
+ See the `Rust documentation for fold <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> fold_turkic_to_writeable(const std::string_view s, W& write) const
+
+ Case-folds the characters in the given string using Turkic (T) mappings for dotted/dotless I.
+
+ See the `Rust documentation for fold_turkic <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold_turkic>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> fold_turkic(const std::string_view s) const
+
+ Case-folds the characters in the given string using Turkic (T) mappings for dotted/dotless I.
+
+ See the `Rust documentation for fold_turkic <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold_turkic>`__ for more information.
+
+
+ .. cpp:function:: void add_case_closure_to(char32_t c, ICU4XCodePointSetBuilder& builder) const
+
+ Adds all simple case mappings and the full case folding for ``c`` to ``builder``. Also adds special case closure mappings.
+
+ In other words, this adds all characters that this casemaps to, as well as all characters that may casemap to this one.
+
+ Note that since ICU4XCodePointSetBuilder does not contain strings, this will ignore string mappings.
+
+ Identical to the similarly named method on ``ICU4XCaseMapCloser``, use that if you plan on using string case closure mappings too.
+
+ See the `Rust documentation for add_case_closure_to <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.add_case_closure_to>`__ for more information.
+
+
+ .. cpp:function:: char32_t simple_lowercase(char32_t ch) const
+
+ Returns the simple lowercase mapping of the given character.
+
+ This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use ``ICU4XCaseMapper::lowercase``.
+
+ See the `Rust documentation for simple_lowercase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_lowercase>`__ for more information.
+
+
+ .. cpp:function:: char32_t simple_uppercase(char32_t ch) const
+
+ Returns the simple uppercase mapping of the given character.
+
+ This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use ``ICU4XCaseMapper::uppercase``.
+
+ See the `Rust documentation for simple_uppercase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_uppercase>`__ for more information.
+
+
+ .. cpp:function:: char32_t simple_titlecase(char32_t ch) const
+
+ Returns the simple titlecase mapping of the given character.
+
+ This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use ``ICU4XCaseMapper::titlecase_segment``.
+
+ See the `Rust documentation for simple_titlecase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_titlecase>`__ for more information.
+
+
+ .. cpp:function:: char32_t simple_fold(char32_t ch) const
+
+ Returns the simple casefolding of the given character.
+
+ This function only implements simple folding. For full folding, use ``ICU4XCaseMapper::fold``.
+
+ See the `Rust documentation for simple_fold <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_fold>`__ for more information.
+
+
+ .. cpp:function:: char32_t simple_fold_turkic(char32_t ch) const
+
+ Returns the simple casefolding of the given character in the Turkic locale
+
+ This function only implements simple folding. For full folding, use ``ICU4XCaseMapper::fold_turkic``.
+
+ See the `Rust documentation for simple_fold_turkic <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_fold_turkic>`__ for more information.
+
+
+.. cpp:enum-struct:: ICU4XLeadingAdjustment
+
+ See the `Rust documentation for LeadingAdjustment <https://docs.rs/icu/latest/icu/casemap/titlecase/enum.LeadingAdjustment.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Auto
+
+ .. cpp:enumerator:: None
+
+ .. cpp:enumerator:: ToCased
+
+.. cpp:class:: ICU4XTitlecaseMapper
+
+ See the `Rust documentation for TitlecaseMapper <https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XTitlecaseMapper, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ Construct a new ``ICU4XTitlecaseMapper`` instance
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> titlecase_segment_v1_to_writeable(const std::string_view s, const ICU4XLocale& locale, ICU4XTitlecaseOptionsV1 options, W& write) const
+
+ Returns the full titlecase mapping of the given string
+
+ The ``v1`` refers to the version of the options struct, which may change as we add more options
+
+ See the `Rust documentation for titlecase_segment <https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.titlecase_segment>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> titlecase_segment_v1(const std::string_view s, const ICU4XLocale& locale, ICU4XTitlecaseOptionsV1 options) const
+
+ Returns the full titlecase mapping of the given string
+
+ The ``v1`` refers to the version of the options struct, which may change as we add more options
+
+ See the `Rust documentation for titlecase_segment <https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.titlecase_segment>`__ for more information.
+
+
+.. cpp:struct:: ICU4XTitlecaseOptionsV1
+
+ See the `Rust documentation for TitlecaseOptions <https://docs.rs/icu/latest/icu/casemap/titlecase/struct.TitlecaseOptions.html>`__ for more information.
+
+
+ .. cpp:member:: ICU4XLeadingAdjustment leading_adjustment
+
+ .. cpp:member:: ICU4XTrailingCase trailing_case
+
+ .. cpp:function:: static ICU4XTitlecaseOptionsV1 default_options()
+
+ See the `Rust documentation for default <https://docs.rs/icu/latest/icu/casemap/titlecase/struct.TitlecaseOptions.html#method.default>`__ for more information.
+
+
+.. cpp:enum-struct:: ICU4XTrailingCase
+
+ See the `Rust documentation for TrailingCase <https://docs.rs/icu/latest/icu/casemap/titlecase/enum.TrailingCase.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Lower
+
+ .. cpp:enumerator:: Unchanged
diff --git a/intl/icu_capi/cpp/docs/source/collator_ffi.rst b/intl/icu_capi/cpp/docs/source/collator_ffi.rst
new file mode 100644
index 0000000000..ce3c24f07b
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/collator_ffi.rst
@@ -0,0 +1,147 @@
+``collator::ffi``
+=================
+
+.. cpp:class:: ICU4XCollator
+
+ See the `Rust documentation for Collator <https://docs.rs/icu/latest/icu/collator/struct.Collator.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCollator, ICU4XError> create_v1(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XCollatorOptionsV1 options)
+
+ Construct a new Collator instance.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.try_new>`__ for more information.
+
+
+ .. cpp:function:: ICU4XOrdering compare(const std::string_view left, const std::string_view right) const
+
+ Compare potentially ill-formed UTF-8 strings.
+
+ Ill-formed input is compared as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
+
+ See the `Rust documentation for compare_utf8 <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf8>`__ for more information.
+
+
+ .. cpp:function:: ICU4XOrdering compare_valid_utf8(const std::string_view left, const std::string_view right) const
+
+ Compare guaranteed well-formed UTF-8 strings.
+
+ Note: In C++, passing ill-formed UTF-8 strings is undefined behavior (and may be memory-unsafe to do so, too).
+
+ See the `Rust documentation for compare <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare>`__ for more information.
+
+
+ .. cpp:function:: ICU4XOrdering compare_utf16(const diplomat::span<const uint16_t> left, const diplomat::span<const uint16_t> right) const
+
+ Compare potentially ill-formed UTF-16 strings, with unpaired surrogates compared as REPLACEMENT CHARACTER.
+
+ See the `Rust documentation for compare_utf16 <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf16>`__ for more information.
+
+
+.. cpp:enum-struct:: ICU4XCollatorAlternateHandling
+
+ See the `Rust documentation for AlternateHandling <https://docs.rs/icu/latest/icu/collator/enum.AlternateHandling.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Auto
+
+ .. cpp:enumerator:: NonIgnorable
+
+ .. cpp:enumerator:: Shifted
+
+.. cpp:enum-struct:: ICU4XCollatorBackwardSecondLevel
+
+ See the `Rust documentation for BackwardSecondLevel <https://docs.rs/icu/latest/icu/collator/enum.BackwardSecondLevel.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Auto
+
+ .. cpp:enumerator:: Off
+
+ .. cpp:enumerator:: On
+
+.. cpp:enum-struct:: ICU4XCollatorCaseFirst
+
+ See the `Rust documentation for CaseFirst <https://docs.rs/icu/latest/icu/collator/enum.CaseFirst.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Auto
+
+ .. cpp:enumerator:: Off
+
+ .. cpp:enumerator:: LowerFirst
+
+ .. cpp:enumerator:: UpperFirst
+
+.. cpp:enum-struct:: ICU4XCollatorCaseLevel
+
+ See the `Rust documentation for CaseLevel <https://docs.rs/icu/latest/icu/collator/enum.CaseLevel.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Auto
+
+ .. cpp:enumerator:: Off
+
+ .. cpp:enumerator:: On
+
+.. cpp:enum-struct:: ICU4XCollatorMaxVariable
+
+ See the `Rust documentation for MaxVariable <https://docs.rs/icu/latest/icu/collator/enum.MaxVariable.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Auto
+
+ .. cpp:enumerator:: Space
+
+ .. cpp:enumerator:: Punctuation
+
+ .. cpp:enumerator:: Symbol
+
+ .. cpp:enumerator:: Currency
+
+.. cpp:enum-struct:: ICU4XCollatorNumeric
+
+ See the `Rust documentation for Numeric <https://docs.rs/icu/latest/icu/collator/enum.Numeric.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Auto
+
+ .. cpp:enumerator:: Off
+
+ .. cpp:enumerator:: On
+
+.. cpp:struct:: ICU4XCollatorOptionsV1
+
+ See the `Rust documentation for CollatorOptions <https://docs.rs/icu/latest/icu/collator/struct.CollatorOptions.html>`__ for more information.
+
+
+ .. cpp:member:: ICU4XCollatorStrength strength
+
+ .. cpp:member:: ICU4XCollatorAlternateHandling alternate_handling
+
+ .. cpp:member:: ICU4XCollatorCaseFirst case_first
+
+ .. cpp:member:: ICU4XCollatorMaxVariable max_variable
+
+ .. cpp:member:: ICU4XCollatorCaseLevel case_level
+
+ .. cpp:member:: ICU4XCollatorNumeric numeric
+
+ .. cpp:member:: ICU4XCollatorBackwardSecondLevel backward_second_level
+
+.. cpp:enum-struct:: ICU4XCollatorStrength
+
+ See the `Rust documentation for Strength <https://docs.rs/icu/latest/icu/collator/enum.Strength.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Auto
+
+ .. cpp:enumerator:: Primary
+
+ .. cpp:enumerator:: Secondary
+
+ .. cpp:enumerator:: Tertiary
+
+ .. cpp:enumerator:: Quaternary
+
+ .. cpp:enumerator:: Identical
diff --git a/intl/icu_capi/cpp/docs/source/collections_sets_ffi.rst b/intl/icu_capi/cpp/docs/source/collections_sets_ffi.rst
new file mode 100644
index 0000000000..cdf1e1c046
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/collections_sets_ffi.rst
@@ -0,0 +1,143 @@
+``collections_sets::ffi``
+=========================
+
+.. cpp:class:: ICU4XCodePointSetBuilder
+
+ See the `Rust documentation for CodePointInversionListBuilder <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XCodePointSetBuilder create()
+
+ Make a new set builder containing nothing
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: ICU4XCodePointSetData build()
+
+ Build this into a set
+
+ This object is repopulated with an empty builder
+
+ See the `Rust documentation for build <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.build>`__ for more information.
+
+
+ .. cpp:function:: void complement()
+
+ Complements this set
+
+ (Elements in this set are removed and vice versa)
+
+ See the `Rust documentation for complement <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement>`__ for more information.
+
+
+ .. cpp:function:: bool is_empty() const
+
+ Returns whether this set is empty
+
+ See the `Rust documentation for is_empty <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.is_empty>`__ for more information.
+
+
+ .. cpp:function:: void add_char(char32_t ch)
+
+ Add a single character to the set
+
+ See the `Rust documentation for add_char <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_char>`__ for more information.
+
+
+ .. cpp:function:: void add_u32(uint32_t ch)
+
+ Add a single u32 value to the set
+
+ See the `Rust documentation for add_u32 <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_u32>`__ for more information.
+
+
+ .. cpp:function:: void add_inclusive_range(char32_t start, char32_t end)
+
+ Add an inclusive range of characters to the set
+
+ See the `Rust documentation for add_range <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_range>`__ for more information.
+
+
+ .. cpp:function:: void add_inclusive_range_u32(uint32_t start, uint32_t end)
+
+ Add an inclusive range of u32s to the set
+
+ See the `Rust documentation for add_range_u32 <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_range_u32>`__ for more information.
+
+
+ .. cpp:function:: void add_set(const ICU4XCodePointSetData& data)
+
+ Add all elements that belong to the provided set to the set
+
+ See the `Rust documentation for add_set <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_set>`__ for more information.
+
+
+ .. cpp:function:: void remove_char(char32_t ch)
+
+ Remove a single character to the set
+
+ See the `Rust documentation for remove_char <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_char>`__ for more information.
+
+
+ .. cpp:function:: void remove_inclusive_range(char32_t start, char32_t end)
+
+ Remove an inclusive range of characters from the set
+
+ See the `Rust documentation for remove_range <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_range>`__ for more information.
+
+
+ .. cpp:function:: void remove_set(const ICU4XCodePointSetData& data)
+
+ Remove all elements that belong to the provided set from the set
+
+ See the `Rust documentation for remove_set <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_set>`__ for more information.
+
+
+ .. cpp:function:: void retain_char(char32_t ch)
+
+ Removes all elements from the set except a single character
+
+ See the `Rust documentation for retain_char <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_char>`__ for more information.
+
+
+ .. cpp:function:: void retain_inclusive_range(char32_t start, char32_t end)
+
+ Removes all elements from the set except an inclusive range of characters f
+
+ See the `Rust documentation for retain_range <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_range>`__ for more information.
+
+
+ .. cpp:function:: void retain_set(const ICU4XCodePointSetData& data)
+
+ Removes all elements from the set except all elements in the provided set
+
+ See the `Rust documentation for retain_set <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_set>`__ for more information.
+
+
+ .. cpp:function:: void complement_char(char32_t ch)
+
+ Complement a single character to the set
+
+ (Characters which are in this set are removed and vice versa)
+
+ See the `Rust documentation for complement_char <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_char>`__ for more information.
+
+
+ .. cpp:function:: void complement_inclusive_range(char32_t start, char32_t end)
+
+ Complement an inclusive range of characters from the set
+
+ (Characters which are in this set are removed and vice versa)
+
+ See the `Rust documentation for complement_range <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_range>`__ for more information.
+
+
+ .. cpp:function:: void complement_set(const ICU4XCodePointSetData& data)
+
+ Complement all elements that belong to the provided set from the set
+
+ (Characters which are in this set are removed and vice versa)
+
+ See the `Rust documentation for complement_set <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_set>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/common_ffi.rst b/intl/icu_capi/cpp/docs/source/common_ffi.rst
new file mode 100644
index 0000000000..738c3c9219
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/common_ffi.rst
@@ -0,0 +1,13 @@
+``common::ffi``
+===============
+
+.. cpp:enum-struct:: ICU4XOrdering
+
+ See the `Rust documentation for Ordering <https://docs.rs/core/latest/core/cmp/enum.Ordering.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Less
+
+ .. cpp:enumerator:: Equal
+
+ .. cpp:enumerator:: Greater
diff --git a/intl/icu_capi/cpp/docs/source/conf.py b/intl/icu_capi/cpp/docs/source/conf.py
new file mode 100644
index 0000000000..e74a0a03a2
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/conf.py
@@ -0,0 +1,60 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+# Configuration file for the Sphinx documentation builder.
+#
+# This file only contains a selection of the most common options. For a full
+# list see the documentation:
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
+
+# -- Path setup --------------------------------------------------------------
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+# import os
+# import sys
+# sys.path.insert(0, os.path.abspath('.'))
+
+
+# -- Project information -----------------------------------------------------
+
+project = 'ICU4X'
+copyright = '2022, The ICU4X Developers'
+author = 'The ICU4X Developers'
+
+
+# -- General configuration ---------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path.
+exclude_patterns = []
+
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+#
+html_theme = 'sphinx_rtd_theme'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = []
+
+html_theme_options = {
+ 'navigation_depth': 4,
+} \ No newline at end of file
diff --git a/intl/icu_capi/cpp/docs/source/data_struct_ffi.rst b/intl/icu_capi/cpp/docs/source/data_struct_ffi.rst
new file mode 100644
index 0000000000..2ba8663bd3
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/data_struct_ffi.rst
@@ -0,0 +1,18 @@
+``data_struct::ffi``
+====================
+
+.. cpp:class:: ICU4XDataStruct
+
+ A generic data struct to be used by ICU4X
+
+ This can be used to construct a StructDataProvider.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XDataStruct, ICU4XError> create_decimal_symbols_v1(const std::string_view plus_sign_prefix, const std::string_view plus_sign_suffix, const std::string_view minus_sign_prefix, const std::string_view minus_sign_suffix, const std::string_view decimal_separator, const std::string_view grouping_separator, uint8_t primary_group_size, uint8_t secondary_group_size, uint8_t min_group_size, const diplomat::span<const char32_t> digits)
+
+ Construct a new DecimalSymbolsV1 data struct.
+
+ C++ users: All string arguments must be valid UTF8
+
+ See the `Rust documentation for DecimalSymbolsV1 <https://docs.rs/icu/latest/icu/decimal/provider/struct.DecimalSymbolsV1.html>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/date_ffi.rst b/intl/icu_capi/cpp/docs/source/date_ffi.rst
new file mode 100644
index 0000000000..0e7a5bfe32
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/date_ffi.rst
@@ -0,0 +1,264 @@
+``date::ffi``
+=============
+
+.. cpp:class:: ICU4XDate
+
+ An ICU4X Date object capable of containing a date and time for any calendar.
+
+ See the `Rust documentation for Date <https://docs.rs/icu/latest/icu/calendar/struct.Date.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XDate, ICU4XError> create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, const ICU4XCalendar& calendar)
+
+ Creates a new :cpp:class:`ICU4XDate` representing the ISO date and time given but in a given calendar
+
+ See the `Rust documentation for new_from_iso <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.new_from_iso>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XDate, ICU4XError> create_from_codes_in_calendar(const std::string_view era_code, int32_t year, const std::string_view month_code, uint8_t day, const ICU4XCalendar& calendar)
+
+ Creates a new :cpp:class:`ICU4XDate` from the given codes, which are interpreted in the given calendar system
+
+ See the `Rust documentation for try_new_from_codes <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_from_codes>`__ for more information.
+
+
+ .. cpp:function:: ICU4XDate to_calendar(const ICU4XCalendar& calendar) const
+
+ Convert this date to one in a different calendar
+
+ See the `Rust documentation for to_calendar <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_calendar>`__ for more information.
+
+
+ .. cpp:function:: ICU4XIsoDate to_iso() const
+
+ Converts this date to ISO
+
+ See the `Rust documentation for to_iso <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_iso>`__ for more information.
+
+
+ .. cpp:function:: uint32_t day_of_month() const
+
+ Returns the 1-indexed day in the month for this date
+
+ See the `Rust documentation for day_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month>`__ for more information.
+
+
+ .. cpp:function:: ICU4XIsoWeekday day_of_week() const
+
+ Returns the day in the week for this day
+
+ See the `Rust documentation for day_of_week <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week>`__ for more information.
+
+
+ .. cpp:function:: uint32_t week_of_month(ICU4XIsoWeekday first_weekday) const
+
+ Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ ``first_weekday`` can be obtained via ``first_weekday()`` on :cpp:class:`ICU4XWeekCalculator`
+
+ See the `Rust documentation for week_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<ICU4XWeekOf, ICU4XError> week_of_year(const ICU4XWeekCalculator& calculator) const
+
+ Returns the week number in this year, using week data
+
+ See the `Rust documentation for week_of_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year>`__ for more information.
+
+
+ .. cpp:function:: uint32_t ordinal_month() const
+
+ Returns 1-indexed number of the month of this date in its year
+
+ Note that for lunar calendars this may not lead to the same month having the same ordinal month across years; use month_code if you care about month identity.
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> month_code_to_writeable(W& write) const
+
+ Returns the month code for this date. Typically something like "M01", "M02", but can be more complicated for lunar calendars.
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> month_code() const
+
+ Returns the month code for this date. Typically something like "M01", "M02", but can be more complicated for lunar calendars.
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. cpp:function:: int32_t year_in_era() const
+
+ Returns the year number in the current era for this date
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> era_to_writeable(W& write) const
+
+ Returns the era for this date,
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/struct.Date.html#method.year>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/types/struct.Era.html>`__
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> era() const
+
+ Returns the era for this date,
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/struct.Date.html#method.year>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/types/struct.Era.html>`__
+
+
+ .. cpp:function:: uint8_t months_in_year() const
+
+ Returns the number of months in the year represented by this date
+
+ See the `Rust documentation for months_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year>`__ for more information.
+
+
+ .. cpp:function:: uint8_t days_in_month() const
+
+ Returns the number of days in the month represented by this date
+
+ See the `Rust documentation for days_in_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month>`__ for more information.
+
+
+ .. cpp:function:: uint16_t days_in_year() const
+
+ Returns the number of days in the year represented by this date
+
+ See the `Rust documentation for days_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year>`__ for more information.
+
+
+ .. cpp:function:: ICU4XCalendar calendar() const
+
+ Returns the :cpp:class:`ICU4XCalendar` object backing this date
+
+ See the `Rust documentation for calendar <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.calendar>`__ for more information.
+
+
+.. cpp:class:: ICU4XIsoDate
+
+ An ICU4X Date object capable of containing a ISO-8601 date
+
+ See the `Rust documentation for Date <https://docs.rs/icu/latest/icu/calendar/struct.Date.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XIsoDate, ICU4XError> create(int32_t year, uint8_t month, uint8_t day)
+
+ Creates a new :cpp:class:`ICU4XIsoDate` from the specified date and time.
+
+ See the `Rust documentation for try_new_iso_date <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_iso_date>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XIsoDate create_for_unix_epoch()
+
+ Creates a new :cpp:class:`ICU4XIsoDate` representing January 1, 1970.
+
+ See the `Rust documentation for unix_epoch <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.unix_epoch>`__ for more information.
+
+
+ .. cpp:function:: ICU4XDate to_calendar(const ICU4XCalendar& calendar) const
+
+ Convert this date to one in a different calendar
+
+ See the `Rust documentation for to_calendar <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_calendar>`__ for more information.
+
+
+ .. cpp:function:: ICU4XDate to_any() const
+
+ See the `Rust documentation for to_any <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_any>`__ for more information.
+
+
+ .. cpp:function:: uint32_t day_of_month() const
+
+ Returns the 1-indexed day in the month for this date
+
+ See the `Rust documentation for day_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month>`__ for more information.
+
+
+ .. cpp:function:: ICU4XIsoWeekday day_of_week() const
+
+ Returns the day in the week for this day
+
+ See the `Rust documentation for day_of_week <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week>`__ for more information.
+
+
+ .. cpp:function:: uint32_t week_of_month(ICU4XIsoWeekday first_weekday) const
+
+ Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ ``first_weekday`` can be obtained via ``first_weekday()`` on :cpp:class:`ICU4XWeekCalculator`
+
+ See the `Rust documentation for week_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<ICU4XWeekOf, ICU4XError> week_of_year(const ICU4XWeekCalculator& calculator) const
+
+ Returns the week number in this year, using week data
+
+ See the `Rust documentation for week_of_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year>`__ for more information.
+
+
+ .. cpp:function:: uint32_t month() const
+
+ Returns 1-indexed number of the month of this date in its year
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. cpp:function:: int32_t year() const
+
+ Returns the year number for this date
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. cpp:function:: bool is_in_leap_year() const
+
+ Returns if the year is a leap year for this date
+
+ See the `Rust documentation for is_in_leap_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.is_in_leap_year>`__ for more information.
+
+
+ .. cpp:function:: uint8_t months_in_year() const
+
+ Returns the number of months in the year represented by this date
+
+ See the `Rust documentation for months_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year>`__ for more information.
+
+
+ .. cpp:function:: uint8_t days_in_month() const
+
+ Returns the number of days in the month represented by this date
+
+ See the `Rust documentation for days_in_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month>`__ for more information.
+
+
+ .. cpp:function:: uint16_t days_in_year() const
+
+ Returns the number of days in the year represented by this date
+
+ See the `Rust documentation for days_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year>`__ for more information.
+
+
+.. cpp:enum-struct:: ICU4XIsoWeekday
+
+ .. cpp:enumerator:: Monday
+
+ .. cpp:enumerator:: Tuesday
+
+ .. cpp:enumerator:: Wednesday
+
+ .. cpp:enumerator:: Thursday
+
+ .. cpp:enumerator:: Friday
+
+ .. cpp:enumerator:: Saturday
+
+ .. cpp:enumerator:: Sunday
diff --git a/intl/icu_capi/cpp/docs/source/datetime_ffi.rst b/intl/icu_capi/cpp/docs/source/datetime_ffi.rst
new file mode 100644
index 0000000000..85a04b18a1
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/datetime_ffi.rst
@@ -0,0 +1,351 @@
+``datetime::ffi``
+=================
+
+.. cpp:class:: ICU4XDateTime
+
+ An ICU4X DateTime object capable of containing a date and time for any calendar.
+
+ See the `Rust documentation for DateTime <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XDateTime, ICU4XError> create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar& calendar)
+
+ Creates a new :cpp:class:`ICU4XDateTime` representing the ISO date and time given but in a given calendar
+
+ See the `Rust documentation for new_from_iso <https://docs.rs/icu/latest/icu/struct.DateTime.html#method.new_from_iso>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XDateTime, ICU4XError> create_from_codes_in_calendar(const std::string_view era_code, int32_t year, const std::string_view month_code, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar& calendar)
+
+ Creates a new :cpp:class:`ICU4XDateTime` from the given codes, which are interpreted in the given calendar system
+
+ See the `Rust documentation for try_new_from_codes <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_from_codes>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XDateTime create_from_date_and_time(const ICU4XDate& date, const ICU4XTime& time)
+
+ Creates a new :cpp:class:`ICU4XDateTime` from an :cpp:class:`ICU4XDate` and :cpp:class:`ICU4XTime` object
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: ICU4XDate date() const
+
+ Gets a copy of the date contained in this object
+
+ See the `Rust documentation for date <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.date>`__ for more information.
+
+
+ .. cpp:function:: ICU4XTime time() const
+
+ Gets the time contained in this object
+
+ See the `Rust documentation for time <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.time>`__ for more information.
+
+
+ .. cpp:function:: ICU4XIsoDateTime to_iso() const
+
+ Converts this date to ISO
+
+ See the `Rust documentation for to_iso <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_iso>`__ for more information.
+
+
+ .. cpp:function:: ICU4XDateTime to_calendar(const ICU4XCalendar& calendar) const
+
+ Convert this datetime to one in a different calendar
+
+ See the `Rust documentation for to_calendar <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_calendar>`__ for more information.
+
+
+ .. cpp:function:: uint8_t hour() const
+
+ Returns the hour in this time
+
+ See the `Rust documentation for hour <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour>`__ for more information.
+
+
+ .. cpp:function:: uint8_t minute() const
+
+ Returns the minute in this time
+
+ See the `Rust documentation for minute <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute>`__ for more information.
+
+
+ .. cpp:function:: uint8_t second() const
+
+ Returns the second in this time
+
+ See the `Rust documentation for second <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second>`__ for more information.
+
+
+ .. cpp:function:: uint32_t nanosecond() const
+
+ Returns the nanosecond in this time
+
+ See the `Rust documentation for nanosecond <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond>`__ for more information.
+
+
+ .. cpp:function:: uint32_t day_of_month() const
+
+ Returns the 1-indexed day in the month for this date
+
+ See the `Rust documentation for day_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month>`__ for more information.
+
+
+ .. cpp:function:: ICU4XIsoWeekday day_of_week() const
+
+ Returns the day in the week for this day
+
+ See the `Rust documentation for day_of_week <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week>`__ for more information.
+
+
+ .. cpp:function:: uint32_t week_of_month(ICU4XIsoWeekday first_weekday) const
+
+ Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ ``first_weekday`` can be obtained via ``first_weekday()`` on :cpp:class:`ICU4XWeekCalculator`
+
+ See the `Rust documentation for week_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<ICU4XWeekOf, ICU4XError> week_of_year(const ICU4XWeekCalculator& calculator) const
+
+ Returns the week number in this year, using week data
+
+ See the `Rust documentation for week_of_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year>`__ for more information.
+
+
+ .. cpp:function:: uint32_t ordinal_month() const
+
+ Returns 1-indexed number of the month of this date in its year
+
+ Note that for lunar calendars this may not lead to the same month having the same ordinal month across years; use month_code if you care about month identity.
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> month_code_to_writeable(W& write) const
+
+ Returns the month code for this date. Typically something like "M01", "M02", but can be more complicated for lunar calendars.
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> month_code() const
+
+ Returns the month code for this date. Typically something like "M01", "M02", but can be more complicated for lunar calendars.
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. cpp:function:: int32_t year_in_era() const
+
+ Returns the year number in the current era for this date
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> era_to_writeable(W& write) const
+
+ Returns the era for this date,
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> era() const
+
+ Returns the era for this date,
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. cpp:function:: uint8_t months_in_year() const
+
+ Returns the number of months in the year represented by this date
+
+ See the `Rust documentation for months_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year>`__ for more information.
+
+
+ .. cpp:function:: uint8_t days_in_month() const
+
+ Returns the number of days in the month represented by this date
+
+ See the `Rust documentation for days_in_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month>`__ for more information.
+
+
+ .. cpp:function:: uint16_t days_in_year() const
+
+ Returns the number of days in the year represented by this date
+
+ See the `Rust documentation for days_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year>`__ for more information.
+
+
+ .. cpp:function:: ICU4XCalendar calendar() const
+
+ Returns the :cpp:class:`ICU4XCalendar` object backing this date
+
+ See the `Rust documentation for calendar <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.calendar>`__ for more information.
+
+
+.. cpp:class:: ICU4XIsoDateTime
+
+ An ICU4X DateTime object capable of containing a ISO-8601 date and time.
+
+ See the `Rust documentation for DateTime <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XIsoDateTime, ICU4XError> create(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond)
+
+ Creates a new :cpp:class:`ICU4XIsoDateTime` from the specified date and time.
+
+ See the `Rust documentation for try_new_iso_datetime <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_iso_datetime>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XIsoDateTime crate_from_date_and_time(const ICU4XIsoDate& date, const ICU4XTime& time)
+
+ Creates a new :cpp:class:`ICU4XIsoDateTime` from an :cpp:class:`ICU4XIsoDate` and :cpp:class:`ICU4XTime` object
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XIsoDateTime create_from_minutes_since_local_unix_epoch(int32_t minutes)
+
+ Construct from the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)
+
+ See the `Rust documentation for from_minutes_since_local_unix_epoch <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.from_minutes_since_local_unix_epoch>`__ for more information.
+
+
+ .. cpp:function:: ICU4XIsoDate date() const
+
+ Gets the date contained in this object
+
+ See the `Rust documentation for date <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.date>`__ for more information.
+
+
+ .. cpp:function:: ICU4XTime time() const
+
+ Gets the time contained in this object
+
+ See the `Rust documentation for time <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.time>`__ for more information.
+
+
+ .. cpp:function:: ICU4XDateTime to_any() const
+
+ Converts this to an :cpp:class:`ICU4XDateTime` capable of being mixed with dates of other calendars
+
+ See the `Rust documentation for to_any <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_any>`__ for more information.
+
+
+ .. cpp:function:: int32_t minutes_since_local_unix_epoch() const
+
+ Gets the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)
+
+ See the `Rust documentation for minutes_since_local_unix_epoch <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.minutes_since_local_unix_epoch>`__ for more information.
+
+
+ .. cpp:function:: ICU4XDateTime to_calendar(const ICU4XCalendar& calendar) const
+
+ Convert this datetime to one in a different calendar
+
+ See the `Rust documentation for to_calendar <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_calendar>`__ for more information.
+
+
+ .. cpp:function:: uint8_t hour() const
+
+ Returns the hour in this time
+
+ See the `Rust documentation for hour <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour>`__ for more information.
+
+
+ .. cpp:function:: uint8_t minute() const
+
+ Returns the minute in this time
+
+ See the `Rust documentation for minute <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute>`__ for more information.
+
+
+ .. cpp:function:: uint8_t second() const
+
+ Returns the second in this time
+
+ See the `Rust documentation for second <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second>`__ for more information.
+
+
+ .. cpp:function:: uint32_t nanosecond() const
+
+ Returns the nanosecond in this time
+
+ See the `Rust documentation for nanosecond <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond>`__ for more information.
+
+
+ .. cpp:function:: uint32_t day_of_month() const
+
+ Returns the 1-indexed day in the month for this date
+
+ See the `Rust documentation for day_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month>`__ for more information.
+
+
+ .. cpp:function:: ICU4XIsoWeekday day_of_week() const
+
+ Returns the day in the week for this day
+
+ See the `Rust documentation for day_of_week <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week>`__ for more information.
+
+
+ .. cpp:function:: uint32_t week_of_month(ICU4XIsoWeekday first_weekday) const
+
+ Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ ``first_weekday`` can be obtained via ``first_weekday()`` on :cpp:class:`ICU4XWeekCalculator`
+
+ See the `Rust documentation for week_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<ICU4XWeekOf, ICU4XError> week_of_year(const ICU4XWeekCalculator& calculator) const
+
+ Returns the week number in this year, using week data
+
+ See the `Rust documentation for week_of_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year>`__ for more information.
+
+
+ .. cpp:function:: uint32_t month() const
+
+ Returns 1-indexed number of the month of this date in its year
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. cpp:function:: int32_t year() const
+
+ Returns the year number for this date
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. cpp:function:: bool is_in_leap_year() const
+
+ Returns whether this date is in a leap year
+
+ See the `Rust documentation for is_in_leap_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.is_in_leap_year>`__ for more information.
+
+
+ .. cpp:function:: uint8_t months_in_year() const
+
+ Returns the number of months in the year represented by this date
+
+ See the `Rust documentation for months_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year>`__ for more information.
+
+
+ .. cpp:function:: uint8_t days_in_month() const
+
+ Returns the number of days in the month represented by this date
+
+ See the `Rust documentation for days_in_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month>`__ for more information.
+
+
+ .. cpp:function:: uint16_t days_in_year() const
+
+ Returns the number of days in the year represented by this date
+
+ See the `Rust documentation for days_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/datetime_formatter_ffi.rst b/intl/icu_capi/cpp/docs/source/datetime_formatter_ffi.rst
new file mode 100644
index 0000000000..7b55d90b54
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/datetime_formatter_ffi.rst
@@ -0,0 +1,278 @@
+``datetime_formatter::ffi``
+===========================
+
+.. cpp:class:: ICU4XDateFormatter
+
+ An ICU4X DateFormatter object capable of formatting a :cpp:class:`ICU4XDate` as a string, using some calendar specified at runtime in the locale.
+
+ See the `Rust documentation for DateFormatter <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XDateFormatter, ICU4XError> create_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length)
+
+ Creates a new :cpp:class:`ICU4XDateFormatter` from locale data.
+
+ See the `Rust documentation for try_new_with_length <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.try_new_with_length>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_date_to_writeable(const ICU4XDate& value, W& write) const
+
+ Formats a :cpp:class:`ICU4XDate` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_date(const ICU4XDate& value) const
+
+ Formats a :cpp:class:`ICU4XDate` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_date_to_writeable(const ICU4XIsoDate& value, W& write) const
+
+ Formats a :cpp:class:`ICU4XIsoDate` to a string.
+
+ Will convert to this formatter's calendar first
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_iso_date(const ICU4XIsoDate& value) const
+
+ Formats a :cpp:class:`ICU4XIsoDate` to a string.
+
+ Will convert to this formatter's calendar first
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_datetime_to_writeable(const ICU4XDateTime& value, W& write) const
+
+ Formats a :cpp:class:`ICU4XDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_datetime(const ICU4XDateTime& value) const
+
+ Formats a :cpp:class:`ICU4XDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_datetime_to_writeable(const ICU4XIsoDateTime& value, W& write) const
+
+ Formats a :cpp:class:`ICU4XIsoDateTime` to a string.
+
+ Will convert to this formatter's calendar first
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_iso_datetime(const ICU4XIsoDateTime& value) const
+
+ Formats a :cpp:class:`ICU4XIsoDateTime` to a string.
+
+ Will convert to this formatter's calendar first
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+.. cpp:enum-struct:: ICU4XDateLength
+
+ See the `Rust documentation for Date <https://docs.rs/icu/latest/icu/datetime/options/length/enum.Date.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Full
+
+ .. cpp:enumerator:: Long
+
+ .. cpp:enumerator:: Medium
+
+ .. cpp:enumerator:: Short
+
+.. cpp:class:: ICU4XDateTimeFormatter
+
+ An ICU4X DateFormatter object capable of formatting a :cpp:class:`ICU4XDateTime` as a string, using some calendar specified at runtime in the locale.
+
+ See the `Rust documentation for DateTimeFormatter <https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XDateTimeFormatter, ICU4XError> create_with_lengths(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length)
+
+ Creates a new :cpp:class:`ICU4XDateTimeFormatter` from locale data.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_datetime_to_writeable(const ICU4XDateTime& value, W& write) const
+
+ Formats a :cpp:class:`ICU4XDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_datetime(const ICU4XDateTime& value) const
+
+ Formats a :cpp:class:`ICU4XDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_datetime_to_writeable(const ICU4XIsoDateTime& value, W& write) const
+
+ Formats a :cpp:class:`ICU4XIsoDateTime` to a string.
+
+ Will convert to this formatter's calendar first
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_iso_datetime(const ICU4XIsoDateTime& value) const
+
+ Formats a :cpp:class:`ICU4XIsoDateTime` to a string.
+
+ Will convert to this formatter's calendar first
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format>`__ for more information.
+
+
+.. cpp:class:: ICU4XGregorianDateFormatter
+
+ An ICU4X TypedDateFormatter object capable of formatting a :cpp:class:`ICU4XIsoDateTime` as a string, using the Gregorian Calendar.
+
+ See the `Rust documentation for TypedDateFormatter <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XGregorianDateFormatter, ICU4XError> create_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength length)
+
+ Creates a new :cpp:class:`ICU4XGregorianDateFormatter` from locale data.
+
+ See the `Rust documentation for try_new_with_length <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.try_new_with_length>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_date_to_writeable(const ICU4XIsoDate& value, W& write) const
+
+ Formats a :cpp:class:`ICU4XIsoDate` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_iso_date(const ICU4XIsoDate& value) const
+
+ Formats a :cpp:class:`ICU4XIsoDate` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_datetime_to_writeable(const ICU4XIsoDateTime& value, W& write) const
+
+ Formats a :cpp:class:`ICU4XIsoDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_iso_datetime(const ICU4XIsoDateTime& value) const
+
+ Formats a :cpp:class:`ICU4XIsoDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format>`__ for more information.
+
+
+.. cpp:class:: ICU4XGregorianDateTimeFormatter
+
+ An ICU4X TypedDateTimeFormatter object capable of formatting a :cpp:class:`ICU4XIsoDateTime` as a string, using the Gregorian Calendar.
+
+ See the `Rust documentation for TypedDateTimeFormatter <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XGregorianDateTimeFormatter, ICU4XError> create_with_lengths(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length)
+
+ Creates a new :cpp:class:`ICU4XGregorianDateFormatter` from locale data.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_datetime_to_writeable(const ICU4XIsoDateTime& value, W& write) const
+
+ Formats a :cpp:class:`ICU4XIsoDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_iso_datetime(const ICU4XIsoDateTime& value) const
+
+ Formats a :cpp:class:`ICU4XIsoDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html#method.format>`__ for more information.
+
+
+.. cpp:class:: ICU4XTimeFormatter
+
+ An ICU4X TimeFormatter object capable of formatting an :cpp:class:`ICU4XTime` type (and others) as a string
+
+ See the `Rust documentation for TimeFormatter <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XTimeFormatter, ICU4XError> create_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XTimeLength length)
+
+ Creates a new :cpp:class:`ICU4XTimeFormatter` from locale data.
+
+ See the `Rust documentation for try_new_with_length <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.try_new_with_length>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_time_to_writeable(const ICU4XTime& value, W& write) const
+
+ Formats a :cpp:class:`ICU4XTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_time(const ICU4XTime& value) const
+
+ Formats a :cpp:class:`ICU4XTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_datetime_to_writeable(const ICU4XDateTime& value, W& write) const
+
+ Formats a :cpp:class:`ICU4XDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_datetime(const ICU4XDateTime& value) const
+
+ Formats a :cpp:class:`ICU4XDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_datetime_to_writeable(const ICU4XIsoDateTime& value, W& write) const
+
+ Formats a :cpp:class:`ICU4XIsoDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_iso_datetime(const ICU4XIsoDateTime& value) const
+
+ Formats a :cpp:class:`ICU4XIsoDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format>`__ for more information.
+
+
+.. cpp:enum-struct:: ICU4XTimeLength
+
+ See the `Rust documentation for Time <https://docs.rs/icu/latest/icu/datetime/options/length/enum.Time.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Full
+
+ .. cpp:enumerator:: Long
+
+ .. cpp:enumerator:: Medium
+
+ .. cpp:enumerator:: Short
diff --git a/intl/icu_capi/cpp/docs/source/decimal_ffi.rst b/intl/icu_capi/cpp/docs/source/decimal_ffi.rst
new file mode 100644
index 0000000000..bd975f8f4c
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/decimal_ffi.rst
@@ -0,0 +1,50 @@
+``decimal::ffi``
+================
+
+.. cpp:class:: ICU4XFixedDecimalFormatter
+
+ An ICU4X Fixed Decimal Format object, capable of formatting a :cpp:class:`ICU4XFixedDecimal` as a string.
+
+ See the `Rust documentation for FixedDecimalFormatter <https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XFixedDecimalFormatter, ICU4XError> create_with_grouping_strategy(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XFixedDecimalGroupingStrategy grouping_strategy)
+
+ Creates a new :cpp:class:`ICU4XFixedDecimalFormatter` from locale data.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.try_new>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XFixedDecimalFormatter, ICU4XError> create_with_decimal_symbols_v1(const ICU4XDataStruct& data_struct, ICU4XFixedDecimalGroupingStrategy grouping_strategy)
+
+ Creates a new :cpp:class:`ICU4XFixedDecimalFormatter` from preconstructed locale data in the form of an :cpp:class:`ICU4XDataStruct` constructed from ``ICU4XDataStruct::create_decimal_symbols()``.
+
+ The contents of the data struct will be consumed: if you wish to use the struct again it will have to be reconstructed. Passing a consumed struct to this method will return an error.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_to_writeable(const ICU4XFixedDecimal& value, W& write) const
+
+ Formats a :cpp:class:`ICU4XFixedDecimal` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format(const ICU4XFixedDecimal& value) const
+
+ Formats a :cpp:class:`ICU4XFixedDecimal` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.format>`__ for more information.
+
+
+.. cpp:enum-struct:: ICU4XFixedDecimalGroupingStrategy
+
+ See the `Rust documentation for GroupingStrategy <https://docs.rs/icu/latest/icu/decimal/options/enum.GroupingStrategy.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Auto
+
+ .. cpp:enumerator:: Never
+
+ .. cpp:enumerator:: Always
+
+ .. cpp:enumerator:: Min2
diff --git a/intl/icu_capi/cpp/docs/source/displaynames_ffi.rst b/intl/icu_capi/cpp/docs/source/displaynames_ffi.rst
new file mode 100644
index 0000000000..070f23b643
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/displaynames_ffi.rst
@@ -0,0 +1,107 @@
+``displaynames::ffi``
+=====================
+
+.. cpp:enum-struct:: ICU4XDisplayNamesFallback
+
+ See the `Rust documentation for Fallback <https://docs.rs/icu/latest/icu/displaynames/options/enum.Fallback.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Code
+
+ .. cpp:enumerator:: None
+
+.. cpp:struct:: ICU4XDisplayNamesOptionsV1
+
+ See the `Rust documentation for DisplayNamesOptions <https://docs.rs/icu/latest/icu/displaynames/options/struct.DisplayNamesOptions.html>`__ for more information.
+
+
+ .. cpp:member:: ICU4XDisplayNamesStyle style
+
+ The optional formatting style to use for display name.
+
+
+ .. cpp:member:: ICU4XDisplayNamesFallback fallback
+
+ The fallback return when the system does not have the requested display name, defaults to "code".
+
+
+ .. cpp:member:: ICU4XLanguageDisplay language_display
+
+ The language display kind, defaults to "dialect".
+
+
+.. cpp:enum-struct:: ICU4XDisplayNamesStyle
+
+ See the `Rust documentation for Style <https://docs.rs/icu/latest/icu/displaynames/options/enum.Style.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Auto
+
+ .. cpp:enumerator:: Narrow
+
+ .. cpp:enumerator:: Short
+
+ .. cpp:enumerator:: Long
+
+ .. cpp:enumerator:: Menu
+
+.. cpp:enum-struct:: ICU4XLanguageDisplay
+
+ See the `Rust documentation for LanguageDisplay <https://docs.rs/icu/latest/icu/displaynames/options/enum.LanguageDisplay.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Dialect
+
+ .. cpp:enumerator:: Standard
+
+.. cpp:class:: ICU4XLocaleDisplayNamesFormatter
+
+ See the `Rust documentation for LocaleDisplayNamesFormatter <https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XLocaleDisplayNamesFormatter, ICU4XError> create(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDisplayNamesOptionsV1 options)
+
+ Creates a new ``LocaleDisplayNamesFormatter`` from locale data and an options bag.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.try_new>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> of_to_writeable(const ICU4XLocale& locale, W& write) const
+
+ Returns the locale-specific display name of a locale.
+
+ See the `Rust documentation for of <https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.of>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> of(const ICU4XLocale& locale) const
+
+ Returns the locale-specific display name of a locale.
+
+ See the `Rust documentation for of <https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.of>`__ for more information.
+
+
+.. cpp:class:: ICU4XRegionDisplayNames
+
+ See the `Rust documentation for RegionDisplayNames <https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XRegionDisplayNames, ICU4XError> create(const ICU4XDataProvider& provider, const ICU4XLocale& locale)
+
+ Creates a new ``RegionDisplayNames`` from locale data and an options bag.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.try_new>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> of_to_writeable(const std::string_view region, W& write) const
+
+ Returns the locale specific display name of a region. Note that the funtion returns an empty string in case the display name for a given region code is not found.
+
+ See the `Rust documentation for of <https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.of>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> of(const std::string_view region) const
+
+ Returns the locale specific display name of a region. Note that the funtion returns an empty string in case the display name for a given region code is not found.
+
+ See the `Rust documentation for of <https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.of>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/errors_ffi.rst b/intl/icu_capi/cpp/docs/source/errors_ffi.rst
new file mode 100644
index 0000000000..a4a1346b15
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/errors_ffi.rst
@@ -0,0 +1,136 @@
+``errors::ffi``
+===============
+
+.. cpp:enum-struct:: ICU4XError
+
+ A common enum for errors that ICU4X may return, organized by API
+
+ The error names are stable and can be checked against as strings in the JS API
+
+ Additional information: `1 <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FixedDecimalError.html>`__, `2 <https://docs.rs/icu/latest/icu/calendar/enum.CalendarError.html>`__, `3 <https://docs.rs/icu/latest/icu/collator/enum.CollatorError.html>`__, `4 <https://docs.rs/icu/latest/icu/datetime/enum.DateTimeError.html>`__, `5 <https://docs.rs/icu/latest/icu/decimal/enum.DecimalError.html>`__, `6 <https://docs.rs/icu/latest/icu/list/enum.ListError.html>`__, `7 <https://docs.rs/icu/latest/icu/locid/enum.ParserError.html>`__, `8 <https://docs.rs/icu/latest/icu/locid_transform/enum.LocaleTransformError.html>`__, `9 <https://docs.rs/icu/latest/icu/normalizer/enum.NormalizerError.html>`__, `10 <https://docs.rs/icu/latest/icu/plurals/enum.PluralsError.html>`__, `11 <https://docs.rs/icu/latest/icu/properties/enum.PropertiesError.html>`__, `12 <https://docs.rs/icu/latest/icu/provider/struct.DataError.html>`__, `13 <https://docs.rs/icu/latest/icu/provider/enum.DataErrorKind.html>`__, `14 <https://docs.rs/icu/latest/icu/segmenter/enum.SegmenterError.html>`__, `15 <https://docs.rs/icu/latest/icu/timezone/enum.TimeZoneError.html>`__
+
+
+ .. cpp:enumerator:: UnknownError
+
+ The error is not currently categorized as ICU4XError. Please file a bug
+
+
+ .. cpp:enumerator:: WriteableError
+
+ An error arising from writing to a string Typically found when not enough space is allocated Most APIs that return a string may return this error
+
+
+ .. cpp:enumerator:: OutOfBoundsError
+
+ .. cpp:enumerator:: DataMissingDataKeyError
+
+ .. cpp:enumerator:: DataMissingVariantError
+
+ .. cpp:enumerator:: DataMissingLocaleError
+
+ .. cpp:enumerator:: DataNeedsVariantError
+
+ .. cpp:enumerator:: DataNeedsLocaleError
+
+ .. cpp:enumerator:: DataExtraneousLocaleError
+
+ .. cpp:enumerator:: DataFilteredResourceError
+
+ .. cpp:enumerator:: DataMismatchedTypeError
+
+ .. cpp:enumerator:: DataMissingPayloadError
+
+ .. cpp:enumerator:: DataInvalidStateError
+
+ .. cpp:enumerator:: DataCustomError
+
+ .. cpp:enumerator:: DataIoError
+
+ .. cpp:enumerator:: DataUnavailableBufferFormatError
+
+ .. cpp:enumerator:: DataMismatchedAnyBufferError
+
+ .. cpp:enumerator:: LocaleUndefinedSubtagError
+
+ The subtag being requested was not set
+
+
+ .. cpp:enumerator:: LocaleParserLanguageError
+
+ The locale or subtag string failed to parse
+
+
+ .. cpp:enumerator:: LocaleParserSubtagError
+
+ .. cpp:enumerator:: LocaleParserExtensionError
+
+ .. cpp:enumerator:: DataStructValidityError
+
+ Attempted to construct an invalid data struct
+
+
+ .. cpp:enumerator:: PropertyUnknownScriptIdError
+
+ .. cpp:enumerator:: PropertyUnknownGeneralCategoryGroupError
+
+ .. cpp:enumerator:: PropertyUnexpectedPropertyNameError
+
+ .. cpp:enumerator:: FixedDecimalLimitError
+
+ .. cpp:enumerator:: FixedDecimalSyntaxError
+
+ .. cpp:enumerator:: PluralsParserError
+
+ .. cpp:enumerator:: CalendarParseError
+
+ .. cpp:enumerator:: CalendarOverflowError
+
+ .. cpp:enumerator:: CalendarUnderflowError
+
+ .. cpp:enumerator:: CalendarOutOfRangeError
+
+ .. cpp:enumerator:: CalendarUnknownEraError
+
+ .. cpp:enumerator:: CalendarUnknownMonthCodeError
+
+ .. cpp:enumerator:: CalendarMissingInputError
+
+ .. cpp:enumerator:: CalendarUnknownKindError
+
+ .. cpp:enumerator:: CalendarMissingError
+
+ .. cpp:enumerator:: DateTimePatternError
+
+ .. cpp:enumerator:: DateTimeMissingInputFieldError
+
+ .. cpp:enumerator:: DateTimeSkeletonError
+
+ .. cpp:enumerator:: DateTimeUnsupportedFieldError
+
+ .. cpp:enumerator:: DateTimeUnsupportedOptionsError
+
+ .. cpp:enumerator:: DateTimeMissingWeekdaySymbolError
+
+ .. cpp:enumerator:: DateTimeMissingMonthSymbolError
+
+ .. cpp:enumerator:: DateTimeFixedDecimalError
+
+ .. cpp:enumerator:: DateTimeMismatchedCalendarError
+
+ .. cpp:enumerator:: TinyStrTooLargeError
+
+ .. cpp:enumerator:: TinyStrContainsNullError
+
+ .. cpp:enumerator:: TinyStrNonAsciiError
+
+ .. cpp:enumerator:: TimeZoneOffsetOutOfBoundsError
+
+ .. cpp:enumerator:: TimeZoneInvalidOffsetError
+
+ .. cpp:enumerator:: TimeZoneMissingInputError
+
+ .. cpp:enumerator:: TimeZoneInvalidIdError
+
+ .. cpp:enumerator:: NormalizerFutureExtensionError
+
+ .. cpp:enumerator:: NormalizerValidationError
diff --git a/intl/icu_capi/cpp/docs/source/fallbacker_ffi.rst b/intl/icu_capi/cpp/docs/source/fallbacker_ffi.rst
new file mode 100644
index 0000000000..a4b17b785c
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/fallbacker_ffi.rst
@@ -0,0 +1,117 @@
+``fallbacker::ffi``
+===================
+
+.. cpp:struct:: ICU4XLocaleFallbackConfig
+
+ Collection of configurations for the ICU4X fallback algorithm.
+
+ See the `Rust documentation for LocaleFallbackConfig <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackConfig.html>`__ for more information.
+
+
+ .. cpp:member:: ICU4XLocaleFallbackPriority priority
+
+ Choice of priority mode.
+
+
+ .. cpp:member:: std::string_view extension_key
+
+ An empty string is considered ``None``.
+
+
+ .. cpp:member:: ICU4XLocaleFallbackSupplement fallback_supplement
+
+ Fallback supplement data key to customize fallback rules.
+
+
+.. cpp:class:: ICU4XLocaleFallbackIterator
+
+ An iterator over the locale under fallback.
+
+ See the `Rust documentation for LocaleFallbackIterator <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html>`__ for more information.
+
+
+ .. cpp:function:: ICU4XLocale get() const
+
+ Gets a snapshot of the current state of the locale.
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html#method.get>`__ for more information.
+
+
+ .. cpp:function:: void step()
+
+ Performs one step of the fallback algorithm, mutating the locale.
+
+ See the `Rust documentation for step <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html#method.step>`__ for more information.
+
+
+.. cpp:enum-struct:: ICU4XLocaleFallbackPriority
+
+ Priority mode for the ICU4X fallback algorithm.
+
+ See the `Rust documentation for LocaleFallbackPriority <https://docs.rs/icu/latest/icu/locid_transform/fallback/enum.LocaleFallbackPriority.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Language
+
+ .. cpp:enumerator:: Region
+
+ .. cpp:enumerator:: Collation
+
+.. cpp:enum-struct:: ICU4XLocaleFallbackSupplement
+
+ What additional data is required to load when performing fallback.
+
+ See the `Rust documentation for LocaleFallbackSupplement <https://docs.rs/icu/latest/icu/locid_transform/fallback/enum.LocaleFallbackSupplement.html>`__ for more information.
+
+
+ .. cpp:enumerator:: None
+
+ .. cpp:enumerator:: Collation
+
+.. cpp:class:: ICU4XLocaleFallbacker
+
+ An object that runs the ICU4X locale fallback algorithm.
+
+ See the `Rust documentation for LocaleFallbacker <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XLocaleFallbacker, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ Creates a new ``ICU4XLocaleFallbacker`` from a data provider.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XLocaleFallbacker create_without_data()
+
+ Creates a new ``ICU4XLocaleFallbacker`` without data for limited functionality.
+
+ See the `Rust documentation for new_without_data <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.new_without_data>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<ICU4XLocaleFallbackerWithConfig, ICU4XError> for_config(ICU4XLocaleFallbackConfig config) const
+
+ Associates this ``ICU4XLocaleFallbacker`` with configuration options.
+
+ See the `Rust documentation for for_config <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.for_config>`__ for more information.
+
+ Lifetimes: ``this`` must live at least as long as the output.
+
+
+.. cpp:class:: ICU4XLocaleFallbackerWithConfig
+
+ An object that runs the ICU4X locale fallback algorithm with specific configurations.
+
+ See the `Rust documentation for LocaleFallbacker <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html>`__ for more information.
+
+ See the `Rust documentation for LocaleFallbackerWithConfig <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackerWithConfig.html>`__ for more information.
+
+
+ .. cpp:function:: ICU4XLocaleFallbackIterator fallback_for_locale(const ICU4XLocale& locale) const
+
+ Creates an iterator from a locale with each step of fallback.
+
+ See the `Rust documentation for fallback_for <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.fallback_for>`__ for more information.
+
+ Lifetimes: ``this`` must live at least as long as the output.
+
diff --git a/intl/icu_capi/cpp/docs/source/fixed_decimal_ffi.rst b/intl/icu_capi/cpp/docs/source/fixed_decimal_ffi.rst
new file mode 100644
index 0000000000..7adcddfc75
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/fixed_decimal_ffi.rst
@@ -0,0 +1,287 @@
+``fixed_decimal::ffi``
+======================
+
+.. cpp:class:: ICU4XFixedDecimal
+
+ See the `Rust documentation for FixedDecimal <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XFixedDecimal create_from_i32(int32_t v)
+
+ Construct an :cpp:class:`ICU4XFixedDecimal` from an integer.
+
+ See the `Rust documentation for FixedDecimal <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XFixedDecimal create_from_u32(uint32_t v)
+
+ Construct an :cpp:class:`ICU4XFixedDecimal` from an integer.
+
+ See the `Rust documentation for FixedDecimal <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XFixedDecimal create_from_i64(int64_t v)
+
+ Construct an :cpp:class:`ICU4XFixedDecimal` from an integer.
+
+ See the `Rust documentation for FixedDecimal <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XFixedDecimal create_from_u64(uint64_t v)
+
+ Construct an :cpp:class:`ICU4XFixedDecimal` from an integer.
+
+ See the `Rust documentation for FixedDecimal <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XFixedDecimal, ICU4XError> create_from_f64_with_integer_precision(double f)
+
+ Construct an :cpp:class:`ICU4XFixedDecimal` from an integer-valued float
+
+ See the `Rust documentation for try_from_f64 <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64>`__ for more information.
+
+ See the `Rust documentation for FloatPrecision <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XFixedDecimal, ICU4XError> create_from_f64_with_lower_magnitude(double f, int16_t magnitude)
+
+ Construct an :cpp:class:`ICU4XFixedDecimal` from an float, with a given power of 10 for the lower magnitude
+
+ See the `Rust documentation for try_from_f64 <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64>`__ for more information.
+
+ See the `Rust documentation for FloatPrecision <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XFixedDecimal, ICU4XError> create_from_f64_with_significant_digits(double f, uint8_t digits)
+
+ Construct an :cpp:class:`ICU4XFixedDecimal` from an float, for a given number of significant digits
+
+ See the `Rust documentation for try_from_f64 <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64>`__ for more information.
+
+ See the `Rust documentation for FloatPrecision <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XFixedDecimal, ICU4XError> create_from_f64_with_floating_precision(double f)
+
+ Construct an :cpp:class:`ICU4XFixedDecimal` from an float, with enough digits to recover the original floating point in IEEE 754 without needing trailing zeros
+
+ See the `Rust documentation for try_from_f64 <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64>`__ for more information.
+
+ See the `Rust documentation for FloatPrecision <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XFixedDecimal, ICU4XError> create_from_string(const std::string_view v)
+
+ Construct an :cpp:class:`ICU4XFixedDecimal` from a string.
+
+ See the `Rust documentation for from_str <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.from_str>`__ for more information.
+
+
+ .. cpp:function:: uint8_t digit_at(int16_t magnitude) const
+
+ See the `Rust documentation for digit_at <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.digit_at>`__ for more information.
+
+
+ .. cpp:function:: int16_t magnitude_start() const
+
+ See the `Rust documentation for magnitude_range <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.magnitude_range>`__ for more information.
+
+
+ .. cpp:function:: int16_t magnitude_end() const
+
+ See the `Rust documentation for magnitude_range <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.magnitude_range>`__ for more information.
+
+
+ .. cpp:function:: int16_t nonzero_magnitude_start() const
+
+ See the `Rust documentation for nonzero_magnitude_start <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.nonzero_magnitude_start>`__ for more information.
+
+
+ .. cpp:function:: int16_t nonzero_magnitude_end() const
+
+ See the `Rust documentation for nonzero_magnitude_end <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.nonzero_magnitude_end>`__ for more information.
+
+
+ .. cpp:function:: bool is_zero() const
+
+ See the `Rust documentation for is_zero <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.is_zero>`__ for more information.
+
+
+ .. cpp:function:: void multiply_pow10(int16_t power)
+
+ Multiply the :cpp:class:`ICU4XFixedDecimal` by a given power of ten.
+
+ See the `Rust documentation for multiply_pow10 <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.multiply_pow10>`__ for more information.
+
+
+ .. cpp:function:: ICU4XFixedDecimalSign sign() const
+
+ See the `Rust documentation for sign <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.sign>`__ for more information.
+
+
+ .. cpp:function:: void set_sign(ICU4XFixedDecimalSign sign)
+
+ Set the sign of the :cpp:class:`ICU4XFixedDecimal`.
+
+ See the `Rust documentation for set_sign <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.set_sign>`__ for more information.
+
+
+ .. cpp:function:: void apply_sign_display(ICU4XFixedDecimalSignDisplay sign_display)
+
+ See the `Rust documentation for apply_sign_display <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.apply_sign_display>`__ for more information.
+
+
+ .. cpp:function:: void trim_start()
+
+ See the `Rust documentation for trim_start <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trim_start>`__ for more information.
+
+
+ .. cpp:function:: void trim_end()
+
+ See the `Rust documentation for trim_end <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trim_end>`__ for more information.
+
+
+ .. cpp:function:: void pad_start(int16_t position)
+
+ Zero-pad the :cpp:class:`ICU4XFixedDecimal` on the left to a particular position
+
+ See the `Rust documentation for pad_start <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.pad_start>`__ for more information.
+
+
+ .. cpp:function:: void pad_end(int16_t position)
+
+ Zero-pad the :cpp:class:`ICU4XFixedDecimal` on the right to a particular position
+
+ See the `Rust documentation for pad_end <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.pad_end>`__ for more information.
+
+
+ .. cpp:function:: void set_max_position(int16_t position)
+
+ Truncate the :cpp:class:`ICU4XFixedDecimal` on the left to a particular position, deleting digits if necessary. This is useful for, e.g. abbreviating years ("2022" -> "22")
+
+ See the `Rust documentation for set_max_position <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.set_max_position>`__ for more information.
+
+
+ .. cpp:function:: void trunc(int16_t position)
+
+ See the `Rust documentation for trunc <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trunc>`__ for more information.
+
+
+ .. cpp:function:: void half_trunc(int16_t position)
+
+ See the `Rust documentation for half_trunc <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_trunc>`__ for more information.
+
+
+ .. cpp:function:: void expand(int16_t position)
+
+ See the `Rust documentation for expand <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.expand>`__ for more information.
+
+
+ .. cpp:function:: void half_expand(int16_t position)
+
+ See the `Rust documentation for half_expand <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_expand>`__ for more information.
+
+
+ .. cpp:function:: void ceil(int16_t position)
+
+ See the `Rust documentation for ceil <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.ceil>`__ for more information.
+
+
+ .. cpp:function:: void half_ceil(int16_t position)
+
+ See the `Rust documentation for half_ceil <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_ceil>`__ for more information.
+
+
+ .. cpp:function:: void floor(int16_t position)
+
+ See the `Rust documentation for floor <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.floor>`__ for more information.
+
+
+ .. cpp:function:: void half_floor(int16_t position)
+
+ See the `Rust documentation for half_floor <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_floor>`__ for more information.
+
+
+ .. cpp:function:: void half_even(int16_t position)
+
+ See the `Rust documentation for half_even <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_even>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::monostate, std::monostate> concatenate_end(ICU4XFixedDecimal& other)
+
+ Concatenates ``other`` to the end of ``self``.
+
+ If successful, ``other`` will be set to 0 and a successful status is returned.
+
+ If not successful, ``other`` will be unchanged and an error is returned.
+
+ See the `Rust documentation for concatenate_end <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.concatenate_end>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> void to_string_to_writeable(W& to) const
+
+ Format the :cpp:class:`ICU4XFixedDecimal` as a string.
+
+ See the `Rust documentation for write_to <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.write_to>`__ for more information.
+
+
+ .. cpp:function:: std::string to_string() const
+
+ Format the :cpp:class:`ICU4XFixedDecimal` as a string.
+
+ See the `Rust documentation for write_to <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.write_to>`__ for more information.
+
+
+.. cpp:enum-struct:: ICU4XFixedDecimalSign
+
+ The sign of a FixedDecimal, as shown in formatting.
+
+ See the `Rust documentation for Sign <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.Sign.html>`__ for more information.
+
+
+ .. cpp:enumerator:: None
+
+ No sign (implicitly positive, e.g., 1729).
+
+
+ .. cpp:enumerator:: Negative
+
+ A negative sign, e.g., -1729.
+
+
+ .. cpp:enumerator:: Positive
+
+ An explicit positive sign, e.g., +1729.
+
+
+.. cpp:enum-struct:: ICU4XFixedDecimalSignDisplay
+
+ ECMA-402 compatible sign display preference.
+
+ See the `Rust documentation for SignDisplay <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.SignDisplay.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Auto
+
+ .. cpp:enumerator:: Never
+
+ .. cpp:enumerator:: Always
+
+ .. cpp:enumerator:: ExceptZero
+
+ .. cpp:enumerator:: Negative
+
+.. cpp:enum-struct:: ICU4XRoundingIncrement
+
+ Increment used in a rounding operation.
+
+ See the `Rust documentation for RoundingIncrement <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.RoundingIncrement.html>`__ for more information.
+
+
+ .. cpp:enumerator:: MultiplesOf1
+
+ .. cpp:enumerator:: MultiplesOf2
+
+ .. cpp:enumerator:: MultiplesOf5
+
+ .. cpp:enumerator:: MultiplesOf25
diff --git a/intl/icu_capi/cpp/docs/source/iana_bcp47_mapper_ffi.rst b/intl/icu_capi/cpp/docs/source/iana_bcp47_mapper_ffi.rst
new file mode 100644
index 0000000000..a10006a04b
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/iana_bcp47_mapper_ffi.rst
@@ -0,0 +1,42 @@
+``iana_bcp47_mapper::ffi``
+==========================
+
+.. cpp:class:: ICU4XBcp47ToIanaMapper
+
+ An object capable of mapping from a BCP-47 time zone ID to an IANA ID.
+
+ See the `Rust documentation for IanaBcp47RoundTripMapper <https://docs.rs/icu/latest/icu/timezone/struct.IanaBcp47RoundTripMapper.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XBcp47ToIanaMapper, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/timezone/struct.IanaBcp47RoundTripMapper.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> get_to_writeable(const std::string_view value, W& write) const
+
+ Writes out the canonical IANA time zone ID corresponding to the given BCP-47 ID.
+
+ See the `Rust documentation for bcp47_to_iana <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.IanaBcp47RoundTripMapper.html#method.bcp47_to_iana>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> get(const std::string_view value) const
+
+ Writes out the canonical IANA time zone ID corresponding to the given BCP-47 ID.
+
+ See the `Rust documentation for bcp47_to_iana <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.IanaBcp47RoundTripMapper.html#method.bcp47_to_iana>`__ for more information.
+
+
+.. cpp:class:: ICU4XIanaToBcp47Mapper
+
+ An object capable of mapping from an IANA time zone ID to a BCP-47 ID.
+
+ This can be used via ``try_set_iana_time_zone_id()`` on ```ICU4XCustomTimeZone`` <crate::timezone::ffi::ICU4XCustomTimeZone>`__.
+
+ See the `Rust documentation for IanaToBcp47Mapper <https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47Mapper.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XIanaToBcp47Mapper, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47Mapper.html#method.new>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/index.rst b/intl/icu_capi/cpp/docs/source/index.rst
new file mode 100644
index 0000000000..57e246325f
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/index.rst
@@ -0,0 +1,54 @@
+Documentation
+=============
+
+.. toctree::
+ :maxdepth: 3
+ :caption: Modules:
+
+ bidi_ffi
+ calendar_ffi
+ casemap_ffi
+ collator_ffi
+ collections_sets_ffi
+ common_ffi
+ data_struct_ffi
+ date_ffi
+ datetime_ffi
+ datetime_formatter_ffi
+ decimal_ffi
+ displaynames_ffi
+ errors_ffi
+ fallbacker_ffi
+ fixed_decimal_ffi
+ iana_bcp47_mapper_ffi
+ list_ffi
+ locale_ffi
+ locale_directionality_ffi
+ locid_transform_ffi
+ logging_ffi
+ metazone_calculator_ffi
+ normalizer_ffi
+ normalizer_properties_ffi
+ pluralrules_ffi
+ properties_iter_ffi
+ properties_maps_ffi
+ properties_names_ffi
+ properties_sets_ffi
+ properties_unisets_ffi
+ provider_ffi
+ script_ffi
+ segmenter_grapheme_ffi
+ segmenter_line_ffi
+ segmenter_sentence_ffi
+ segmenter_word_ffi
+ time_ffi
+ timezone_ffi
+ timezone_formatter_ffi
+ week_ffi
+ zoned_formatter_ffi
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`search`
diff --git a/intl/icu_capi/cpp/docs/source/list_ffi.rst b/intl/icu_capi/cpp/docs/source/list_ffi.rst
new file mode 100644
index 0000000000..f880a58887
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/list_ffi.rst
@@ -0,0 +1,76 @@
+``list::ffi``
+=============
+
+.. cpp:class:: ICU4XList
+
+ A list of strings
+
+
+ .. cpp:function:: static ICU4XList create()
+
+ Create a new list of strings
+
+
+ .. cpp:function:: static ICU4XList create_with_capacity(size_t capacity)
+
+ Create a new list of strings with preallocated space to hold at least ``capacity`` elements
+
+
+ .. cpp:function:: void push(const std::string_view val)
+
+ Push a string to the list
+
+ For C++ users, potentially invalid UTF8 will be handled via REPLACEMENT CHARACTERs
+
+
+ .. cpp:function:: size_t len() const
+
+ The number of elements in this list
+
+
+.. cpp:class:: ICU4XListFormatter
+
+ See the `Rust documentation for ListFormatter <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XListFormatter, ICU4XError> create_and_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length)
+
+ Construct a new ICU4XListFormatter instance for And patterns
+
+ See the `Rust documentation for try_new_and_with_length <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_and_with_length>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XListFormatter, ICU4XError> create_or_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length)
+
+ Construct a new ICU4XListFormatter instance for And patterns
+
+ See the `Rust documentation for try_new_or_with_length <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_or_with_length>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XListFormatter, ICU4XError> create_unit_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length)
+
+ Construct a new ICU4XListFormatter instance for And patterns
+
+ See the `Rust documentation for try_new_unit_with_length <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_unit_with_length>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_to_writeable(const ICU4XList& list, W& write) const
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format(const ICU4XList& list) const
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.format>`__ for more information.
+
+
+.. cpp:enum-struct:: ICU4XListLength
+
+ See the `Rust documentation for ListLength <https://docs.rs/icu/latest/icu/list/enum.ListLength.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Wide
+
+ .. cpp:enumerator:: Short
+
+ .. cpp:enumerator:: Narrow
diff --git a/intl/icu_capi/cpp/docs/source/locale_directionality_ffi.rst b/intl/icu_capi/cpp/docs/source/locale_directionality_ffi.rst
new file mode 100644
index 0000000000..3a051ac481
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/locale_directionality_ffi.rst
@@ -0,0 +1,47 @@
+``locale_directionality::ffi``
+==============================
+
+.. cpp:enum-struct:: ICU4XLocaleDirection
+
+ See the `Rust documentation for Direction <https://docs.rs/icu/latest/icu/locid_transform/enum.Direction.html>`__ for more information.
+
+
+ .. cpp:enumerator:: LeftToRight
+
+ .. cpp:enumerator:: RightToLeft
+
+ .. cpp:enumerator:: Unknown
+
+.. cpp:class:: ICU4XLocaleDirectionality
+
+ See the `Rust documentation for LocaleDirectionality <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XLocaleDirectionality, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ Construct a new ICU4XLocaleDirectionality instance
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XLocaleDirectionality, ICU4XError> create_with_expander(const ICU4XDataProvider& provider, const ICU4XLocaleExpander& expander)
+
+ Construct a new ICU4XLocaleDirectionality instance with a custom expander
+
+ See the `Rust documentation for new_with_expander <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.new_with_expander>`__ for more information.
+
+
+ .. cpp:function:: ICU4XLocaleDirection get(const ICU4XLocale& locale) const
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.get>`__ for more information.
+
+
+ .. cpp:function:: bool is_left_to_right(const ICU4XLocale& locale) const
+
+ See the `Rust documentation for is_left_to_right <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.is_left_to_right>`__ for more information.
+
+
+ .. cpp:function:: bool is_right_to_left(const ICU4XLocale& locale) const
+
+ See the `Rust documentation for is_right_to_left <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.is_right_to_left>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/locale_ffi.rst b/intl/icu_capi/cpp/docs/source/locale_ffi.rst
new file mode 100644
index 0000000000..f65b658972
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/locale_ffi.rst
@@ -0,0 +1,179 @@
+``locale::ffi``
+===============
+
+.. cpp:class:: ICU4XLocale
+
+ An ICU4X Locale, capable of representing strings like ``"en-US"``.
+
+ See the `Rust documentation for Locale <https://docs.rs/icu/latest/icu/locid/struct.Locale.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XLocale, ICU4XError> create_from_string(const std::string_view name)
+
+ Construct an :cpp:class:`ICU4XLocale` from an locale identifier.
+
+ This will run the complete locale parsing algorithm. If code size and performance are critical and the locale is of a known shape (such as ``aa-BB``) use ``create_und``, ``set_language``, ``set_script``, and ``set_region``.
+
+ See the `Rust documentation for try_from_bytes <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XLocale create_und()
+
+ Construct a default undefined :cpp:class:`ICU4XLocale` "und".
+
+ See the `Rust documentation for UND <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#associatedconstant.UND>`__ for more information.
+
+
+ .. cpp:function:: ICU4XLocale clone() const
+
+ Clones the :cpp:class:`ICU4XLocale`.
+
+ See the `Rust documentation for Locale <https://docs.rs/icu/latest/icu/locid/struct.Locale.html>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> basename_to_writeable(W& write) const
+
+ Write a string representation of the ``LanguageIdentifier`` part of :cpp:class:`ICU4XLocale` to ``write``.
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> basename() const
+
+ Write a string representation of the ``LanguageIdentifier`` part of :cpp:class:`ICU4XLocale` to ``write``.
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> get_unicode_extension_to_writeable(const std::string_view bytes, W& write) const
+
+ Write a string representation of the unicode extension to ``write``
+
+ See the `Rust documentation for extensions <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.extensions>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> get_unicode_extension(const std::string_view bytes) const
+
+ Write a string representation of the unicode extension to ``write``
+
+ See the `Rust documentation for extensions <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.extensions>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> language_to_writeable(W& write) const
+
+ Write a string representation of :cpp:class:`ICU4XLocale` language to ``write``
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> language() const
+
+ Write a string representation of :cpp:class:`ICU4XLocale` language to ``write``
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> set_language(const std::string_view bytes)
+
+ Set the language part of the :cpp:class:`ICU4XLocale`.
+
+ See the `Rust documentation for try_from_bytes <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> region_to_writeable(W& write) const
+
+ Write a string representation of :cpp:class:`ICU4XLocale` region to ``write``
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> region() const
+
+ Write a string representation of :cpp:class:`ICU4XLocale` region to ``write``
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> set_region(const std::string_view bytes)
+
+ Set the region part of the :cpp:class:`ICU4XLocale`.
+
+ See the `Rust documentation for try_from_bytes <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> script_to_writeable(W& write) const
+
+ Write a string representation of :cpp:class:`ICU4XLocale` script to ``write``
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> script() const
+
+ Write a string representation of :cpp:class:`ICU4XLocale` script to ``write``
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> set_script(const std::string_view bytes)
+
+ Set the script part of the :cpp:class:`ICU4XLocale`. Pass an empty string to remove the script.
+
+ See the `Rust documentation for try_from_bytes <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> static diplomat::result<std::monostate, ICU4XError> canonicalize_to_writeable(const std::string_view bytes, W& write)
+
+ Best effort locale canonicalizer that doesn't need any data
+
+ Use ICU4XLocaleCanonicalizer for better control and functionality
+
+ See the `Rust documentation for canonicalize <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.canonicalize>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<std::string, ICU4XError> canonicalize(const std::string_view bytes)
+
+ Best effort locale canonicalizer that doesn't need any data
+
+ Use ICU4XLocaleCanonicalizer for better control and functionality
+
+ See the `Rust documentation for canonicalize <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.canonicalize>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> to_string_to_writeable(W& write) const
+
+ Write a string representation of :cpp:class:`ICU4XLocale` to ``write``
+
+ See the `Rust documentation for write_to <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.write_to>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> to_string() const
+
+ Write a string representation of :cpp:class:`ICU4XLocale` to ``write``
+
+ See the `Rust documentation for write_to <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.write_to>`__ for more information.
+
+
+ .. cpp:function:: bool normalizing_eq(const std::string_view other) const
+
+ See the `Rust documentation for normalizing_eq <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.normalizing_eq>`__ for more information.
+
+
+ .. cpp:function:: ICU4XOrdering strict_cmp(const std::string_view other) const
+
+ See the `Rust documentation for strict_cmp <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.strict_cmp>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XLocale create_en()
+
+ Deprecated
+
+ Use `create_from_string("en").
+
+
+ .. cpp:function:: static ICU4XLocale create_bn()
+
+ Deprecated
+
+ Use `create_from_string("bn").
+
diff --git a/intl/icu_capi/cpp/docs/source/locid_transform_ffi.rst b/intl/icu_capi/cpp/docs/source/locid_transform_ffi.rst
new file mode 100644
index 0000000000..10d17a9cdf
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/locid_transform_ffi.rst
@@ -0,0 +1,76 @@
+``locid_transform::ffi``
+========================
+
+.. cpp:class:: ICU4XLocaleCanonicalizer
+
+ A locale canonicalizer.
+
+ See the `Rust documentation for LocaleCanonicalizer <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XLocaleCanonicalizer, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ Create a new :cpp:class:`ICU4XLocaleCanonicalizer`.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XLocaleCanonicalizer, ICU4XError> create_extended(const ICU4XDataProvider& provider)
+
+ Create a new :cpp:class:`ICU4XLocaleCanonicalizer` with extended data.
+
+ See the `Rust documentation for new_with_expander <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.new_with_expander>`__ for more information.
+
+
+ .. cpp:function:: ICU4XTransformResult canonicalize(ICU4XLocale& locale) const
+
+ FFI version of ``LocaleCanonicalizer::canonicalize()``.
+
+ See the `Rust documentation for canonicalize <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.canonicalize>`__ for more information.
+
+
+.. cpp:class:: ICU4XLocaleExpander
+
+ A locale expander.
+
+ See the `Rust documentation for LocaleExpander <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XLocaleExpander, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ Create a new :cpp:class:`ICU4XLocaleExpander`.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XLocaleExpander, ICU4XError> create_extended(const ICU4XDataProvider& provider)
+
+ Create a new :cpp:class:`ICU4XLocaleExpander` with extended data.
+
+ See the `Rust documentation for new_extended <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.new_extended>`__ for more information.
+
+
+ .. cpp:function:: ICU4XTransformResult maximize(ICU4XLocale& locale) const
+
+ FFI version of ``LocaleExpander::maximize()``.
+
+ See the `Rust documentation for maximize <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.maximize>`__ for more information.
+
+
+ .. cpp:function:: ICU4XTransformResult minimize(ICU4XLocale& locale) const
+
+ FFI version of ``LocaleExpander::minimize()``.
+
+ See the `Rust documentation for minimize <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.minimize>`__ for more information.
+
+
+.. cpp:enum-struct:: ICU4XTransformResult
+
+ FFI version of ``TransformResult``.
+
+ See the `Rust documentation for TransformResult <https://docs.rs/icu/latest/icu/locid_transform/enum.TransformResult.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Modified
+
+ .. cpp:enumerator:: Unmodified
diff --git a/intl/icu_capi/cpp/docs/source/logging_ffi.rst b/intl/icu_capi/cpp/docs/source/logging_ffi.rst
new file mode 100644
index 0000000000..29c7e3d8fb
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/logging_ffi.rst
@@ -0,0 +1,21 @@
+``logging::ffi``
+================
+
+.. cpp:class:: ICU4XLogger
+
+ An object allowing control over the logging used
+
+
+ .. cpp:function:: static bool init_simple_logger()
+
+ Initialize the logger using ``simple_logger``
+
+ Requires the ``simple_logger`` Cargo feature.
+
+ Returns ``false`` if there was already a logger set.
+
+
+ .. cpp:function:: static bool init_console_logger()
+
+ Deprecated: since ICU4X 1.4, this now happens automatically if the ``log`` feature is enabled.
+
diff --git a/intl/icu_capi/cpp/docs/source/metazone_calculator_ffi.rst b/intl/icu_capi/cpp/docs/source/metazone_calculator_ffi.rst
new file mode 100644
index 0000000000..5cddfce650
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/metazone_calculator_ffi.rst
@@ -0,0 +1,16 @@
+``metazone_calculator::ffi``
+============================
+
+.. cpp:class:: ICU4XMetazoneCalculator
+
+ An object capable of computing the metazone from a timezone.
+
+ This can be used via ``maybe_calculate_metazone()`` on ```ICU4XCustomTimeZone`` <crate::timezone::ffi::ICU4XCustomTimeZone>`__.
+
+ See the `Rust documentation for MetazoneCalculator <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XMetazoneCalculator, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html#method.new>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/normalizer_ffi.rst b/intl/icu_capi/cpp/docs/source/normalizer_ffi.rst
new file mode 100644
index 0000000000..033cd4e71b
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/normalizer_ffi.rst
@@ -0,0 +1,94 @@
+``normalizer::ffi``
+===================
+
+.. cpp:class:: ICU4XComposingNormalizer
+
+ See the `Rust documentation for ComposingNormalizer <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XComposingNormalizer, ICU4XError> create_nfc(const ICU4XDataProvider& provider)
+
+ Construct a new ICU4XComposingNormalizer instance for NFC
+
+ See the `Rust documentation for new_nfc <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfc>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XComposingNormalizer, ICU4XError> create_nfkc(const ICU4XDataProvider& provider)
+
+ Construct a new ICU4XComposingNormalizer instance for NFKC
+
+ See the `Rust documentation for new_nfkc <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfkc>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> normalize_to_writeable(const std::string_view s, W& write) const
+
+ Normalize a (potentially ill-formed) UTF8 string
+
+ Errors are mapped to REPLACEMENT CHARACTER
+
+ See the `Rust documentation for normalize_utf8 <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.normalize_utf8>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> normalize(const std::string_view s) const
+
+ Normalize a (potentially ill-formed) UTF8 string
+
+ Errors are mapped to REPLACEMENT CHARACTER
+
+ See the `Rust documentation for normalize_utf8 <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.normalize_utf8>`__ for more information.
+
+
+ .. cpp:function:: bool is_normalized(const std::string_view s) const
+
+ Check if a (potentially ill-formed) UTF8 string is normalized
+
+ Errors are mapped to REPLACEMENT CHARACTER
+
+ See the `Rust documentation for is_normalized_utf8 <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.is_normalized_utf8>`__ for more information.
+
+
+.. cpp:class:: ICU4XDecomposingNormalizer
+
+ See the `Rust documentation for DecomposingNormalizer <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XDecomposingNormalizer, ICU4XError> create_nfd(const ICU4XDataProvider& provider)
+
+ Construct a new ICU4XDecomposingNormalizer instance for NFC
+
+ See the `Rust documentation for new_nfd <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfd>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XDecomposingNormalizer, ICU4XError> create_nfkd(const ICU4XDataProvider& provider)
+
+ Construct a new ICU4XDecomposingNormalizer instance for NFKC
+
+ See the `Rust documentation for new_nfkd <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfkd>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> normalize_to_writeable(const std::string_view s, W& write) const
+
+ Normalize a (potentially ill-formed) UTF8 string
+
+ Errors are mapped to REPLACEMENT CHARACTER
+
+ See the `Rust documentation for normalize_utf8 <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.normalize_utf8>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> normalize(const std::string_view s) const
+
+ Normalize a (potentially ill-formed) UTF8 string
+
+ Errors are mapped to REPLACEMENT CHARACTER
+
+ See the `Rust documentation for normalize_utf8 <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.normalize_utf8>`__ for more information.
+
+
+ .. cpp:function:: bool is_normalized(const std::string_view s) const
+
+ Check if a (potentially ill-formed) UTF8 string is normalized
+
+ Errors are mapped to REPLACEMENT CHARACTER
+
+ See the `Rust documentation for is_normalized_utf8 <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.is_normalized_utf8>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/normalizer_properties_ffi.rst b/intl/icu_capi/cpp/docs/source/normalizer_properties_ffi.rst
new file mode 100644
index 0000000000..57759a81ed
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/normalizer_properties_ffi.rst
@@ -0,0 +1,87 @@
+``normalizer_properties::ffi``
+==============================
+
+.. cpp:class:: ICU4XCanonicalCombiningClassMap
+
+ Lookup of the Canonical_Combining_Class Unicode property
+
+ See the `Rust documentation for CanonicalCombiningClassMap <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCanonicalCombiningClassMap, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ Construct a new ICU4XCanonicalCombiningClassMap instance for NFC
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: uint8_t get(char32_t ch) const
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.get>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/properties/properties/struct.CanonicalCombiningClass.html>`__
+
+
+ .. cpp:function:: uint8_t get32(uint32_t ch) const
+
+ See the `Rust documentation for get32 <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.get32>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/properties/properties/struct.CanonicalCombiningClass.html>`__
+
+
+.. cpp:class:: ICU4XCanonicalComposition
+
+ The raw canonical composition operation.
+
+ Callers should generally use ICU4XComposingNormalizer unless they specifically need raw composition operations
+
+ See the `Rust documentation for CanonicalComposition <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCanonicalComposition, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ Construct a new ICU4XCanonicalComposition instance for NFC
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: char32_t compose(char32_t starter, char32_t second) const
+
+ Performs canonical composition (including Hangul) on a pair of characters or returns NUL if these characters don’t compose. Composition exclusions are taken into account.
+
+ See the `Rust documentation for compose <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html#method.compose>`__ for more information.
+
+
+.. cpp:class:: ICU4XCanonicalDecomposition
+
+ The raw (non-recursive) canonical decomposition operation.
+
+ Callers should generally use ICU4XDecomposingNormalizer unless they specifically need raw composition operations
+
+ See the `Rust documentation for CanonicalDecomposition <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCanonicalDecomposition, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ Construct a new ICU4XCanonicalDecomposition instance for NFC
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: ICU4XDecomposed decompose(char32_t c) const
+
+ Performs non-recursive canonical decomposition (including for Hangul).
+
+ See the `Rust documentation for decompose <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html#method.decompose>`__ for more information.
+
+
+.. cpp:struct:: ICU4XDecomposed
+
+ The outcome of non-recursive canonical decomposition of a character. ``second`` will be NUL when the decomposition expands to a single character (which may or may not be the original one)
+
+ See the `Rust documentation for Decomposed <https://docs.rs/icu/latest/icu/normalizer/properties/enum.Decomposed.html>`__ for more information.
+
+
+ .. cpp:member:: char32_t first
+
+ .. cpp:member:: char32_t second
diff --git a/intl/icu_capi/cpp/docs/source/pluralrules_ffi.rst b/intl/icu_capi/cpp/docs/source/pluralrules_ffi.rst
new file mode 100644
index 0000000000..80a01d258a
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/pluralrules_ffi.rst
@@ -0,0 +1,96 @@
+``pluralrules::ffi``
+====================
+
+.. cpp:struct:: ICU4XPluralCategories
+
+ FFI version of ``PluralRules::categories()`` data.
+
+
+ .. cpp:member:: bool zero
+
+ .. cpp:member:: bool one
+
+ .. cpp:member:: bool two
+
+ .. cpp:member:: bool few
+
+ .. cpp:member:: bool many
+
+ .. cpp:member:: bool other
+
+.. cpp:enum-struct:: ICU4XPluralCategory
+
+ FFI version of ``PluralCategory``.
+
+ See the `Rust documentation for PluralCategory <https://docs.rs/icu/latest/icu/plurals/enum.PluralCategory.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Zero
+
+ .. cpp:enumerator:: One
+
+ .. cpp:enumerator:: Two
+
+ .. cpp:enumerator:: Few
+
+ .. cpp:enumerator:: Many
+
+ .. cpp:enumerator:: Other
+
+ .. cpp:function:: static diplomat::result<ICU4XPluralCategory, std::monostate> get_for_cldr_string(const std::string_view s)
+
+ Construct from a string in the format `specified in TR35 <https://unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules>`__
+
+ See the `Rust documentation for get_for_cldr_string <https://docs.rs/icu/latest/icu/plurals/enum.PluralCategory.html#method.get_for_cldr_string>`__ for more information.
+
+ See the `Rust documentation for get_for_cldr_bytes <https://docs.rs/icu/latest/icu/plurals/enum.PluralCategory.html#method.get_for_cldr_bytes>`__ for more information.
+
+
+.. cpp:class:: ICU4XPluralOperands
+
+ FFI version of ``PluralOperands``.
+
+ See the `Rust documentation for PluralOperands <https://docs.rs/icu/latest/icu/plurals/struct.PluralOperands.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XPluralOperands, ICU4XError> create_from_string(const std::string_view s)
+
+ Construct for a given string representing a number
+
+ See the `Rust documentation for from_str <https://docs.rs/icu/latest/icu/plurals/struct.PluralOperands.html#method.from_str>`__ for more information.
+
+
+.. cpp:class:: ICU4XPluralRules
+
+ FFI version of ``PluralRules``.
+
+ See the `Rust documentation for PluralRules <https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XPluralRules, ICU4XError> create_cardinal(const ICU4XDataProvider& provider, const ICU4XLocale& locale)
+
+ Construct an :cpp:class:`ICU4XPluralRules` for the given locale, for cardinal numbers
+
+ See the `Rust documentation for try_new_cardinal <https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_cardinal>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XPluralRules, ICU4XError> create_ordinal(const ICU4XDataProvider& provider, const ICU4XLocale& locale)
+
+ Construct an :cpp:class:`ICU4XPluralRules` for the given locale, for ordinal numbers
+
+ See the `Rust documentation for try_new_ordinal <https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_ordinal>`__ for more information.
+
+
+ .. cpp:function:: ICU4XPluralCategory category_for(const ICU4XPluralOperands& op) const
+
+ Get the category for a given number represented as operands
+
+ See the `Rust documentation for category_for <https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.category_for>`__ for more information.
+
+
+ .. cpp:function:: ICU4XPluralCategories categories() const
+
+ Get all of the categories needed in the current locale
+
+ See the `Rust documentation for categories <https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.categories>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/properties_iter_ffi.rst b/intl/icu_capi/cpp/docs/source/properties_iter_ffi.rst
new file mode 100644
index 0000000000..b96d80b3c7
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/properties_iter_ffi.rst
@@ -0,0 +1,27 @@
+``properties_iter::ffi``
+========================
+
+.. cpp:class:: CodePointRangeIterator
+
+ An iterator over code point ranges, produced by ``ICU4XCodePointSetData`` or one of the ``ICU4XCodePointMapData`` types
+
+
+ .. cpp:function:: CodePointRangeIteratorResult next()
+
+ Advance the iterator by one and return the next range.
+
+ If the iterator is out of items, ``done`` will be true
+
+
+.. cpp:struct:: CodePointRangeIteratorResult
+
+ Result of a single iteration of :cpp:class:`CodePointRangeIterator`. Logically can be considered to be an ``Option<RangeInclusive<u32>>``,
+
+ ``start`` and ``end`` represent an inclusive range of code points start, end, and ``done`` will be true if the iterator has already finished. The last contentful iteration will NOT produce a range done=true, in other words ``start`` and ``end`` are useful values if and only if ``done=false``.
+
+
+ .. cpp:member:: uint32_t start
+
+ .. cpp:member:: uint32_t end
+
+ .. cpp:member:: bool done
diff --git a/intl/icu_capi/cpp/docs/source/properties_maps_ffi.rst b/intl/icu_capi/cpp/docs/source/properties_maps_ffi.rst
new file mode 100644
index 0000000000..200c95427d
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/properties_maps_ffi.rst
@@ -0,0 +1,169 @@
+``properties_maps::ffi``
+========================
+
+.. cpp:class:: ICU4XCodePointMapData16
+
+ An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property.
+
+ For properties whose values fit into 16 bits.
+
+ See the `Rust documentation for properties <https://docs.rs/icu/latest/icu/properties/index.html>`__ for more information.
+
+ See the `Rust documentation for CodePointMapData <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapData.html>`__ for more information.
+
+ See the `Rust documentation for CodePointMapDataBorrowed <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html>`__ for more information.
+
+
+ .. cpp:function:: uint16_t get(char32_t cp) const
+
+ Gets the value for a code point.
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get>`__ for more information.
+
+
+ .. cpp:function:: uint16_t get32(uint32_t cp) const
+
+ Gets the value for a code point (specified as a 32 bit integer, in UTF-32)
+
+
+ .. cpp:function:: CodePointRangeIterator iter_ranges_for_value(uint16_t value) const
+
+ Produces an iterator over ranges of code points that map to ``value``
+
+ See the `Rust documentation for iter_ranges_for_value <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value>`__ for more information.
+
+ Lifetimes: ``this`` must live at least as long as the output.
+
+
+ .. cpp:function:: CodePointRangeIterator iter_ranges_for_value_complemented(uint16_t value) const
+
+ Produces an iterator over ranges of code points that do not map to ``value``
+
+ See the `Rust documentation for iter_ranges_for_value_complemented <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value_complemented>`__ for more information.
+
+ Lifetimes: ``this`` must live at least as long as the output.
+
+
+ .. cpp:function:: ICU4XCodePointSetData get_set_for_value(uint16_t value) const
+
+ Gets a :cpp:class:`ICU4XCodePointSetData` representing all entries in this map that map to the given value
+
+ See the `Rust documentation for get_set_for_value <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get_set_for_value>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointMapData16, ICU4XError> load_script(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for script <https://docs.rs/icu/latest/icu/properties/maps/fn.script.html>`__ for more information.
+
+
+.. cpp:class:: ICU4XCodePointMapData8
+
+ An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property.
+
+ For properties whose values fit into 8 bits.
+
+ See the `Rust documentation for properties <https://docs.rs/icu/latest/icu/properties/index.html>`__ for more information.
+
+ See the `Rust documentation for CodePointMapData <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapData.html>`__ for more information.
+
+ See the `Rust documentation for CodePointMapDataBorrowed <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html>`__ for more information.
+
+
+ .. cpp:function:: uint8_t get(char32_t cp) const
+
+ Gets the value for a code point.
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get>`__ for more information.
+
+
+ .. cpp:function:: uint8_t get32(uint32_t cp) const
+
+ Gets the value for a code point (specified as a 32 bit integer, in UTF-32)
+
+
+ .. cpp:function:: static uint32_t general_category_to_mask(uint8_t gc)
+
+ Converts a general category to its corresponding mask value
+
+ Nonexistant general categories will map to the empty mask
+
+ See the `Rust documentation for GeneralCategoryGroup <https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html>`__ for more information.
+
+
+ .. cpp:function:: CodePointRangeIterator iter_ranges_for_value(uint8_t value) const
+
+ Produces an iterator over ranges of code points that map to ``value``
+
+ See the `Rust documentation for iter_ranges_for_value <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value>`__ for more information.
+
+ Lifetimes: ``this`` must live at least as long as the output.
+
+
+ .. cpp:function:: CodePointRangeIterator iter_ranges_for_value_complemented(uint8_t value) const
+
+ Produces an iterator over ranges of code points that do not map to ``value``
+
+ See the `Rust documentation for iter_ranges_for_value_complemented <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value_complemented>`__ for more information.
+
+ Lifetimes: ``this`` must live at least as long as the output.
+
+
+ .. cpp:function:: CodePointRangeIterator iter_ranges_for_mask(uint32_t mask) const
+
+ Given a mask value (the nth bit marks property value = n), produce an iterator over ranges of code points whose property values are contained in the mask.
+
+ The main mask property supported is that for General_Category, which can be obtained via ``general_category_to_mask()`` or by using ``ICU4XGeneralCategoryNameToMaskMapper``
+
+ Should only be used on maps for properties with values less than 32 (like Generak_Category), other maps will have unpredictable results
+
+ See the `Rust documentation for iter_ranges_for_group <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_group>`__ for more information.
+
+ Lifetimes: ``this`` must live at least as long as the output.
+
+
+ .. cpp:function:: ICU4XCodePointSetData get_set_for_value(uint8_t value) const
+
+ Gets a :cpp:class:`ICU4XCodePointSetData` representing all entries in this map that map to the given value
+
+ See the `Rust documentation for get_set_for_value <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get_set_for_value>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointMapData8, ICU4XError> load_general_category(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for general_category <https://docs.rs/icu/latest/icu/properties/maps/fn.general_category.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointMapData8, ICU4XError> load_bidi_class(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for bidi_class <https://docs.rs/icu/latest/icu/properties/maps/fn.bidi_class.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointMapData8, ICU4XError> load_east_asian_width(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for east_asian_width <https://docs.rs/icu/latest/icu/properties/maps/fn.east_asian_width.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointMapData8, ICU4XError> load_indic_syllabic_category(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for indic_syllabic_category <https://docs.rs/icu/latest/icu/properties/maps/fn.indic_syllabic_category.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointMapData8, ICU4XError> load_line_break(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for line_break <https://docs.rs/icu/latest/icu/properties/maps/fn.line_break.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointMapData8, ICU4XError> try_grapheme_cluster_break(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for grapheme_cluster_break <https://docs.rs/icu/latest/icu/properties/maps/fn.grapheme_cluster_break.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointMapData8, ICU4XError> load_word_break(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for word_break <https://docs.rs/icu/latest/icu/properties/maps/fn.word_break.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointMapData8, ICU4XError> load_sentence_break(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for sentence_break <https://docs.rs/icu/latest/icu/properties/maps/fn.sentence_break.html>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/properties_names_ffi.rst b/intl/icu_capi/cpp/docs/source/properties_names_ffi.rst
new file mode 100644
index 0000000000..2ae5d9e4eb
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/properties_names_ffi.rst
@@ -0,0 +1,102 @@
+``properties_names::ffi``
+=========================
+
+.. cpp:class:: ICU4XGeneralCategoryNameToMaskMapper
+
+ A type capable of looking up General Category mask values from a string name.
+
+ See the `Rust documentation for get_name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html#method.get_name_to_enum_mapper>`__ for more information.
+
+ See the `Rust documentation for PropertyValueNameToEnumMapper <https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapper.html>`__ for more information.
+
+
+ .. cpp:function:: uint32_t get_strict(const std::string_view name) const
+
+ Get the mask value matching the given name, using strict matching
+
+ Returns 0 if the name is unknown for this property
+
+
+ .. cpp:function:: uint32_t get_loose(const std::string_view name) const
+
+ Get the mask value matching the given name, using loose matching
+
+ Returns 0 if the name is unknown for this property
+
+
+ .. cpp:function:: static diplomat::result<ICU4XGeneralCategoryNameToMaskMapper, ICU4XError> load(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for get_name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html#method.get_name_to_enum_mapper>`__ for more information.
+
+
+.. cpp:class:: ICU4XPropertyValueNameToEnumMapper
+
+ A type capable of looking up a property value from a string name.
+
+ See the `Rust documentation for PropertyValueNameToEnumMapper <https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapper.html>`__ for more information.
+
+ See the `Rust documentation for PropertyValueNameToEnumMapperBorrowed <https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html>`__ for more information.
+
+
+ .. cpp:function:: int16_t get_strict(const std::string_view name) const
+
+ Get the property value matching the given name, using strict matching
+
+ Returns -1 if the name is unknown for this property
+
+ See the `Rust documentation for get_strict <https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html#method.get_strict>`__ for more information.
+
+
+ .. cpp:function:: int16_t get_loose(const std::string_view name) const
+
+ Get the property value matching the given name, using loose matching
+
+ Returns -1 if the name is unknown for this property
+
+ See the `Rust documentation for get_loose <https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html#method.get_loose>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_general_category(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for get_name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.GeneralCategory.html#method.get_name_to_enum_mapper>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_bidi_class(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.BidiClass.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_east_asian_width(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.EastAsianWidth.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_indic_syllabic_category(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.IndicSyllabicCategory.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_line_break(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.LineBreak.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_grapheme_cluster_break(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for get_name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.GraphemeClusterBreak.html#method.get_name_to_enum_mapper>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_word_break(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.WordBreak.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_sentence_break(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.SentenceBreak.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_script(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.Script.html#method.name_to_enum_mapper>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/properties_sets_ffi.rst b/intl/icu_capi/cpp/docs/source/properties_sets_ffi.rst
new file mode 100644
index 0000000000..287307a6c2
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/properties_sets_ffi.rst
@@ -0,0 +1,384 @@
+``properties_sets::ffi``
+========================
+
+.. cpp:class:: ICU4XCodePointSetData
+
+ An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property.
+
+ See the `Rust documentation for properties <https://docs.rs/icu/latest/icu/properties/index.html>`__ for more information.
+
+ See the `Rust documentation for CodePointSetData <https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetData.html>`__ for more information.
+
+ See the `Rust documentation for CodePointSetDataBorrowed <https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html>`__ for more information.
+
+
+ .. cpp:function:: bool contains(char32_t cp) const
+
+ Checks whether the code point is in the set.
+
+ See the `Rust documentation for contains <https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.contains>`__ for more information.
+
+
+ .. cpp:function:: bool contains32(uint32_t cp) const
+
+ Checks whether the code point (specified as a 32 bit integer, in UTF-32) is in the set.
+
+
+ .. cpp:function:: CodePointRangeIterator iter_ranges() const
+
+ Produces an iterator over ranges of code points contained in this set
+
+ See the `Rust documentation for iter_ranges <https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.iter_ranges>`__ for more information.
+
+ Lifetimes: ``this`` must live at least as long as the output.
+
+
+ .. cpp:function:: CodePointRangeIterator iter_ranges_complemented() const
+
+ Produces an iterator over ranges of code points not contained in this set
+
+ See the `Rust documentation for iter_ranges_complemented <https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.iter_ranges_complemented>`__ for more information.
+
+ Lifetimes: ``this`` must live at least as long as the output.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_for_general_category_group(const ICU4XDataProvider& provider, uint32_t group)
+
+ which is a mask with the same format as the ``U_GC_XX_MASK`` mask in ICU4C
+
+ See the `Rust documentation for for_general_category_group <https://docs.rs/icu/latest/icu/properties/sets/fn.for_general_category_group.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_ascii_hex_digit(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for ascii_hex_digit <https://docs.rs/icu/latest/icu/properties/sets/fn.ascii_hex_digit.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_alnum(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for alnum <https://docs.rs/icu/latest/icu/properties/sets/fn.alnum.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_alphabetic(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for alphabetic <https://docs.rs/icu/latest/icu/properties/sets/fn.alphabetic.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_bidi_control(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for bidi_control <https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_control.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_bidi_mirrored(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for bidi_mirrored <https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_mirrored.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_blank(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for blank <https://docs.rs/icu/latest/icu/properties/sets/fn.blank.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_cased(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for cased <https://docs.rs/icu/latest/icu/properties/sets/fn.cased.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_case_ignorable(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for case_ignorable <https://docs.rs/icu/latest/icu/properties/sets/fn.case_ignorable.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_full_composition_exclusion(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for full_composition_exclusion <https://docs.rs/icu/latest/icu/properties/sets/fn.full_composition_exclusion.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_changes_when_casefolded(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for changes_when_casefolded <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casefolded.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_changes_when_casemapped(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for changes_when_casemapped <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casemapped.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_changes_when_nfkc_casefolded(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for changes_when_nfkc_casefolded <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_nfkc_casefolded.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_changes_when_lowercased(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for changes_when_lowercased <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_lowercased.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_changes_when_titlecased(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for changes_when_titlecased <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_titlecased.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_changes_when_uppercased(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for changes_when_uppercased <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_uppercased.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_dash(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for dash <https://docs.rs/icu/latest/icu/properties/sets/fn.dash.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_deprecated(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for deprecated <https://docs.rs/icu/latest/icu/properties/sets/fn.deprecated.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_default_ignorable_code_point(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for default_ignorable_code_point <https://docs.rs/icu/latest/icu/properties/sets/fn.default_ignorable_code_point.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_diacritic(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for diacritic <https://docs.rs/icu/latest/icu/properties/sets/fn.diacritic.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_emoji_modifier_base(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for emoji_modifier_base <https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier_base.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_emoji_component(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for emoji_component <https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_component.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_emoji_modifier(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for emoji_modifier <https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_emoji(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for emoji <https://docs.rs/icu/latest/icu/properties/sets/fn.emoji.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_emoji_presentation(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for emoji_presentation <https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_presentation.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_extender(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for extender <https://docs.rs/icu/latest/icu/properties/sets/fn.extender.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_extended_pictographic(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for extended_pictographic <https://docs.rs/icu/latest/icu/properties/sets/fn.extended_pictographic.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_graph(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for graph <https://docs.rs/icu/latest/icu/properties/sets/fn.graph.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_grapheme_base(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for grapheme_base <https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_base.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_grapheme_extend(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for grapheme_extend <https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_extend.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_grapheme_link(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for grapheme_link <https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_link.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_hex_digit(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for hex_digit <https://docs.rs/icu/latest/icu/properties/sets/fn.hex_digit.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_hyphen(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for hyphen <https://docs.rs/icu/latest/icu/properties/sets/fn.hyphen.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_id_continue(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for id_continue <https://docs.rs/icu/latest/icu/properties/sets/fn.id_continue.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_ideographic(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for ideographic <https://docs.rs/icu/latest/icu/properties/sets/fn.ideographic.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_id_start(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for id_start <https://docs.rs/icu/latest/icu/properties/sets/fn.id_start.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_ids_binary_operator(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for ids_binary_operator <https://docs.rs/icu/latest/icu/properties/sets/fn.ids_binary_operator.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_ids_trinary_operator(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for ids_trinary_operator <https://docs.rs/icu/latest/icu/properties/sets/fn.ids_trinary_operator.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_join_control(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for join_control <https://docs.rs/icu/latest/icu/properties/sets/fn.join_control.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_logical_order_exception(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for logical_order_exception <https://docs.rs/icu/latest/icu/properties/sets/fn.logical_order_exception.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_lowercase(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for lowercase <https://docs.rs/icu/latest/icu/properties/sets/fn.lowercase.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_math(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for math <https://docs.rs/icu/latest/icu/properties/sets/fn.math.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_noncharacter_code_point(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for noncharacter_code_point <https://docs.rs/icu/latest/icu/properties/sets/fn.noncharacter_code_point.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_nfc_inert(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for nfc_inert <https://docs.rs/icu/latest/icu/properties/sets/fn.nfc_inert.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_nfd_inert(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for nfd_inert <https://docs.rs/icu/latest/icu/properties/sets/fn.nfd_inert.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_nfkc_inert(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for nfkc_inert <https://docs.rs/icu/latest/icu/properties/sets/fn.nfkc_inert.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_nfkd_inert(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for nfkd_inert <https://docs.rs/icu/latest/icu/properties/sets/fn.nfkd_inert.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_pattern_syntax(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for pattern_syntax <https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_syntax.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_pattern_white_space(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for pattern_white_space <https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_white_space.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_prepended_concatenation_mark(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for prepended_concatenation_mark <https://docs.rs/icu/latest/icu/properties/sets/fn.prepended_concatenation_mark.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_print(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for print <https://docs.rs/icu/latest/icu/properties/sets/fn.print.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_quotation_mark(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for quotation_mark <https://docs.rs/icu/latest/icu/properties/sets/fn.quotation_mark.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_radical(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for radical <https://docs.rs/icu/latest/icu/properties/sets/fn.radical.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_regional_indicator(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for regional_indicator <https://docs.rs/icu/latest/icu/properties/sets/fn.regional_indicator.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_soft_dotted(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for soft_dotted <https://docs.rs/icu/latest/icu/properties/sets/fn.soft_dotted.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_segment_starter(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for segment_starter <https://docs.rs/icu/latest/icu/properties/sets/fn.segment_starter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_case_sensitive(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for case_sensitive <https://docs.rs/icu/latest/icu/properties/sets/fn.case_sensitive.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_sentence_terminal(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for sentence_terminal <https://docs.rs/icu/latest/icu/properties/sets/fn.sentence_terminal.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_terminal_punctuation(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for terminal_punctuation <https://docs.rs/icu/latest/icu/properties/sets/fn.terminal_punctuation.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_unified_ideograph(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for unified_ideograph <https://docs.rs/icu/latest/icu/properties/sets/fn.unified_ideograph.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_uppercase(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for uppercase <https://docs.rs/icu/latest/icu/properties/sets/fn.uppercase.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_variation_selector(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for variation_selector <https://docs.rs/icu/latest/icu/properties/sets/fn.variation_selector.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_white_space(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for white_space <https://docs.rs/icu/latest/icu/properties/sets/fn.white_space.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_xdigit(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for xdigit <https://docs.rs/icu/latest/icu/properties/sets/fn.xdigit.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_xid_continue(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for xid_continue <https://docs.rs/icu/latest/icu/properties/sets/fn.xid_continue.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_xid_start(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for xid_start <https://docs.rs/icu/latest/icu/properties/sets/fn.xid_start.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_for_ecma262(const ICU4XDataProvider& provider, const std::string_view property_name)
+
+ Loads data for a property specified as a string as long as it is one of the `ECMA-262 binary properties <https://tc39.es/ecma262/#table-binary-unicode-properties>`__ (not including Any, ASCII, and Assigned pseudoproperties).
+
+ Returns ``ICU4XError::PropertyUnexpectedPropertyNameError`` in case the string does not match any property in the list
+
+ See the `Rust documentation for for_ecma262 <https://docs.rs/icu/latest/icu/properties/sets/fn.for_ecma262.html>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/properties_unisets_ffi.rst b/intl/icu_capi/cpp/docs/source/properties_unisets_ffi.rst
new file mode 100644
index 0000000000..fcbde264a2
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/properties_unisets_ffi.rst
@@ -0,0 +1,62 @@
+``properties_unisets::ffi``
+===========================
+
+.. cpp:class:: ICU4XUnicodeSetData
+
+ An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property.
+
+ See the `Rust documentation for properties <https://docs.rs/icu/latest/icu/properties/index.html>`__ for more information.
+
+ See the `Rust documentation for UnicodeSetData <https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetData.html>`__ for more information.
+
+ See the `Rust documentation for UnicodeSetDataBorrowed <https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html>`__ for more information.
+
+
+ .. cpp:function:: bool contains(const std::string_view s) const
+
+ Checks whether the string is in the set.
+
+ See the `Rust documentation for contains <https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html#method.contains>`__ for more information.
+
+
+ .. cpp:function:: bool contains_char(char32_t cp) const
+
+ Checks whether the code point is in the set.
+
+ See the `Rust documentation for contains_char <https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html#method.contains_char>`__ for more information.
+
+
+ .. cpp:function:: bool contains32(uint32_t cp) const
+
+ Checks whether the code point (specified as a 32 bit integer, in UTF-32) is in the set.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XUnicodeSetData, ICU4XError> load_basic_emoji(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for basic_emoji <https://docs.rs/icu/latest/icu/properties/sets/fn.basic_emoji.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XUnicodeSetData, ICU4XError> load_exemplars_main(const ICU4XDataProvider& provider, const ICU4XLocale& locale)
+
+ See the `Rust documentation for exemplars_main <https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_main.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XUnicodeSetData, ICU4XError> load_exemplars_auxiliary(const ICU4XDataProvider& provider, const ICU4XLocale& locale)
+
+ See the `Rust documentation for exemplars_auxiliary <https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_auxiliary.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XUnicodeSetData, ICU4XError> load_exemplars_punctuation(const ICU4XDataProvider& provider, const ICU4XLocale& locale)
+
+ See the `Rust documentation for exemplars_punctuation <https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_punctuation.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XUnicodeSetData, ICU4XError> load_exemplars_numbers(const ICU4XDataProvider& provider, const ICU4XLocale& locale)
+
+ See the `Rust documentation for exemplars_numbers <https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_numbers.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XUnicodeSetData, ICU4XError> load_exemplars_index(const ICU4XDataProvider& provider, const ICU4XLocale& locale)
+
+ See the `Rust documentation for exemplars_index <https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_index.html>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/provider_ffi.rst b/intl/icu_capi/cpp/docs/source/provider_ffi.rst
new file mode 100644
index 0000000000..fcd53586cd
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/provider_ffi.rst
@@ -0,0 +1,84 @@
+``provider::ffi``
+=================
+
+.. cpp:class:: ICU4XDataProvider
+
+ An ICU4X data provider, capable of loading ICU4X data keys from some source.
+
+ See the `Rust documentation for icu_provider <https://docs.rs/icu_provider/latest/icu_provider/index.html>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XDataProvider create_compiled()
+
+ Constructs an :cpp:class:`ICU4XDataProvider` that uses compiled data.
+
+ Requires the ``compiled_data`` feature.
+
+ This provider cannot be modified or combined with other providers, so ``enable_fallback``, ``enabled_fallback_with``, ``fork_by_locale``, and ``fork_by_key`` will return ``Err``s.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XDataProvider, ICU4XError> create_fs(const std::string_view path)
+
+ Constructs an ``FsDataProvider`` and returns it as an :cpp:class:`ICU4XDataProvider`. Requires the ``provider_fs`` Cargo feature. Not supported in WASM.
+
+ See the `Rust documentation for FsDataProvider <https://docs.rs/icu_provider_fs/latest/icu_provider_fs/struct.FsDataProvider.html>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XDataProvider create_test()
+
+ Deprecated
+
+ Use ``create_compiled()``.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XDataProvider, ICU4XError> create_from_byte_slice(const diplomat::span<const uint8_t> blob)
+
+ Constructs a ``BlobDataProvider`` and returns it as an :cpp:class:`ICU4XDataProvider`.
+
+ See the `Rust documentation for BlobDataProvider <https://docs.rs/icu_provider_blob/latest/icu_provider_blob/struct.BlobDataProvider.html>`__ for more information.
+
+ Lifetimes: ``blob`` must live for the duration of the program.
+
+
+ .. cpp:function:: static ICU4XDataProvider create_empty()
+
+ Constructs an empty :cpp:class:`ICU4XDataProvider`.
+
+ See the `Rust documentation for EmptyDataProvider <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/empty/struct.EmptyDataProvider.html>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> fork_by_key(ICU4XDataProvider& other)
+
+ Creates a provider that tries the current provider and then, if the current provider doesn't support the data key, another provider ``other``.
+
+ This takes ownership of the ``other`` provider, leaving an empty provider in its place.
+
+ The providers must be the same type (Any or Buffer). This condition is satisfied if both providers originate from the same constructor, such as ``create_from_byte_slice`` or ``create_fs``. If the condition is not upheld, a runtime error occurs.
+
+ See the `Rust documentation for ForkByKeyProvider <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/type.ForkByKeyProvider.html>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> fork_by_locale(ICU4XDataProvider& other)
+
+ Same as ``fork_by_key`` but forks by locale instead of key.
+
+ See the `Rust documentation for MissingLocalePredicate <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/predicates/struct.MissingLocalePredicate.html>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> enable_locale_fallback()
+
+ Enables locale fallbacking for data requests made to this provider.
+
+ Note that the test provider (from ``create_test``) already has fallbacking enabled.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.try_new>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html>`__
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> enable_locale_fallback_with(const ICU4XLocaleFallbacker& fallbacker)
+
+ See the `Rust documentation for new_with_fallbacker <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.new_with_fallbacker>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html>`__
+
diff --git a/intl/icu_capi/cpp/docs/source/script_ffi.rst b/intl/icu_capi/cpp/docs/source/script_ffi.rst
new file mode 100644
index 0000000000..a6c06879e2
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/script_ffi.rst
@@ -0,0 +1,111 @@
+``script::ffi``
+===============
+
+.. cpp:class:: ICU4XScriptExtensionsSet
+
+ An object that represents the Script_Extensions property for a single character
+
+ See the `Rust documentation for ScriptExtensionsSet <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html>`__ for more information.
+
+
+ .. cpp:function:: bool contains(uint16_t script) const
+
+ Check if the Script_Extensions property of the given code point covers the given script
+
+ See the `Rust documentation for contains <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.contains>`__ for more information.
+
+
+ .. cpp:function:: size_t count() const
+
+ Get the number of scripts contained in here
+
+ See the `Rust documentation for iter <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.iter>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<uint16_t, std::monostate> script_at(size_t index) const
+
+ Get script at index, returning an error if out of bounds
+
+ See the `Rust documentation for iter <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.iter>`__ for more information.
+
+
+.. cpp:class:: ICU4XScriptWithExtensions
+
+ An ICU4X ScriptWithExtensions map object, capable of holding a map of codepoints to scriptextensions values
+
+ See the `Rust documentation for ScriptWithExtensions <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XScriptWithExtensions, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ See the `Rust documentation for script_with_extensions <https://docs.rs/icu/latest/icu/properties/script/fn.script_with_extensions.html>`__ for more information.
+
+
+ .. cpp:function:: uint16_t get_script_val(uint32_t code_point) const
+
+ Get the Script property value for a code point
+
+ See the `Rust documentation for get_script_val <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_val>`__ for more information.
+
+
+ .. cpp:function:: bool has_script(uint32_t code_point, uint16_t script) const
+
+ Check if the Script_Extensions property of the given code point covers the given script
+
+ See the `Rust documentation for has_script <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.has_script>`__ for more information.
+
+
+ .. cpp:function:: ICU4XScriptWithExtensionsBorrowed as_borrowed() const
+
+ Borrow this object for a slightly faster variant with more operations
+
+ See the `Rust documentation for as_borrowed <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html#method.as_borrowed>`__ for more information.
+
+ Lifetimes: ``this`` must live at least as long as the output.
+
+
+ .. cpp:function:: CodePointRangeIterator iter_ranges_for_script(uint16_t script) const
+
+ Get a list of ranges of code points that contain this script in their Script_Extensions values
+
+ See the `Rust documentation for get_script_extensions_ranges <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_ranges>`__ for more information.
+
+ Lifetimes: ``this`` must live at least as long as the output.
+
+
+.. cpp:class:: ICU4XScriptWithExtensionsBorrowed
+
+ A slightly faster ICU4XScriptWithExtensions object
+
+ See the `Rust documentation for ScriptWithExtensionsBorrowed <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html>`__ for more information.
+
+
+ .. cpp:function:: uint16_t get_script_val(uint32_t code_point) const
+
+ Get the Script property value for a code point
+
+ See the `Rust documentation for get_script_val <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_val>`__ for more information.
+
+
+ .. cpp:function:: ICU4XScriptExtensionsSet get_script_extensions_val(uint32_t code_point) const
+
+ Get the Script property value for a code point
+
+ See the `Rust documentation for get_script_extensions_val <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_val>`__ for more information.
+
+ Lifetimes: ``this`` must live at least as long as the output.
+
+
+ .. cpp:function:: bool has_script(uint32_t code_point, uint16_t script) const
+
+ Check if the Script_Extensions property of the given code point covers the given script
+
+ See the `Rust documentation for has_script <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.has_script>`__ for more information.
+
+
+ .. cpp:function:: ICU4XCodePointSetData get_script_extensions_set(uint16_t script) const
+
+ Build the CodePointSetData corresponding to a codepoints matching a particular script in their Script_Extensions
+
+ See the `Rust documentation for get_script_extensions_set <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_set>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/segmenter_grapheme_ffi.rst b/intl/icu_capi/cpp/docs/source/segmenter_grapheme_ffi.rst
new file mode 100644
index 0000000000..7af2c10fcd
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/segmenter_grapheme_ffi.rst
@@ -0,0 +1,79 @@
+``segmenter_grapheme::ffi``
+===========================
+
+.. cpp:class:: ICU4XGraphemeClusterBreakIteratorLatin1
+
+ See the `Rust documentation for GraphemeClusterBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html>`__ for more information.
+
+
+ .. cpp:function:: int32_t next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next>`__ for more information.
+
+
+.. cpp:class:: ICU4XGraphemeClusterBreakIteratorUtf16
+
+ See the `Rust documentation for GraphemeClusterBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html>`__ for more information.
+
+
+ .. cpp:function:: int32_t next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next>`__ for more information.
+
+
+.. cpp:class:: ICU4XGraphemeClusterBreakIteratorUtf8
+
+ See the `Rust documentation for GraphemeClusterBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html>`__ for more information.
+
+
+ .. cpp:function:: int32_t next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next>`__ for more information.
+
+
+.. cpp:class:: ICU4XGraphemeClusterSegmenter
+
+ An ICU4X grapheme-cluster-break segmenter, capable of finding grapheme cluster breakpoints in strings.
+
+ See the `Rust documentation for GraphemeClusterSegmenter <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XGraphemeClusterSegmenter, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ Construct an :cpp:class:`ICU4XGraphemeClusterSegmenter`.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: ICU4XGraphemeClusterBreakIteratorUtf8 segment_utf8(const std::string_view input) const
+
+ Segments a (potentially ill-formed) UTF-8 string.
+
+ See the `Rust documentation for segment_utf8 <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_utf8>`__ for more information.
+
+ Lifetimes: ``this``, ``input`` must live at least as long as the output.
+
+
+ .. cpp:function:: ICU4XGraphemeClusterBreakIteratorUtf16 segment_utf16(const diplomat::span<const uint16_t> input) const
+
+ Segments a UTF-16 string.
+
+ See the `Rust documentation for segment_utf16 <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_utf16>`__ for more information.
+
+ Lifetimes: ``this``, ``input`` must live at least as long as the output.
+
+
+ .. cpp:function:: ICU4XGraphemeClusterBreakIteratorLatin1 segment_latin1(const diplomat::span<const uint8_t> input) const
+
+ Segments a Latin-1 string.
+
+ See the `Rust documentation for segment_latin1 <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_latin1>`__ for more information.
+
+ Lifetimes: ``this``, ``input`` must live at least as long as the output.
+
diff --git a/intl/icu_capi/cpp/docs/source/segmenter_line_ffi.rst b/intl/icu_capi/cpp/docs/source/segmenter_line_ffi.rst
new file mode 100644
index 0000000000..2d2aa514b1
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/segmenter_line_ffi.rst
@@ -0,0 +1,155 @@
+``segmenter_line::ffi``
+=======================
+
+.. cpp:class:: ICU4XLineBreakIteratorLatin1
+
+ See the `Rust documentation for LineBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorLatin1.html>`__
+
+
+ .. cpp:function:: int32_t next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next>`__ for more information.
+
+
+.. cpp:class:: ICU4XLineBreakIteratorUtf16
+
+ See the `Rust documentation for LineBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorUtf16.html>`__
+
+
+ .. cpp:function:: int32_t next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next>`__ for more information.
+
+
+.. cpp:class:: ICU4XLineBreakIteratorUtf8
+
+ See the `Rust documentation for LineBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorPotentiallyIllFormedUtf8.html>`__
+
+
+ .. cpp:function:: int32_t next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next>`__ for more information.
+
+
+.. cpp:struct:: ICU4XLineBreakOptionsV1
+
+ See the `Rust documentation for LineBreakOptions <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakOptions.html>`__ for more information.
+
+
+ .. cpp:member:: ICU4XLineBreakStrictness strictness
+
+ .. cpp:member:: ICU4XLineBreakWordOption word_option
+
+ .. cpp:member:: bool ja_zh
+
+.. cpp:enum-struct:: ICU4XLineBreakStrictness
+
+ See the `Rust documentation for LineBreakStrictness <https://docs.rs/icu/latest/icu/segmenter/enum.LineBreakStrictness.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Loose
+
+ .. cpp:enumerator:: Normal
+
+ .. cpp:enumerator:: Strict
+
+ .. cpp:enumerator:: Anywhere
+
+.. cpp:enum-struct:: ICU4XLineBreakWordOption
+
+ See the `Rust documentation for LineBreakWordOption <https://docs.rs/icu/latest/icu/segmenter/enum.LineBreakWordOption.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Normal
+
+ .. cpp:enumerator:: BreakAll
+
+ .. cpp:enumerator:: KeepAll
+
+.. cpp:class:: ICU4XLineSegmenter
+
+ An ICU4X line-break segmenter, capable of finding breakpoints in strings.
+
+ See the `Rust documentation for LineSegmenter <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_auto(const ICU4XDataProvider& provider)
+
+ Construct a :cpp:class:`ICU4XLineSegmenter` with default options. It automatically loads the best available payload data for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_auto <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_lstm(const ICU4XDataProvider& provider)
+
+ Construct a :cpp:class:`ICU4XLineSegmenter` with default options and LSTM payload data for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_lstm <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_dictionary(const ICU4XDataProvider& provider)
+
+ Construct a :cpp:class:`ICU4XLineSegmenter` with default options and dictionary payload data for Burmese, Khmer, Lao, and Thai..
+
+ See the `Rust documentation for new_dictionary <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_auto_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options)
+
+ Construct a :cpp:class:`ICU4XLineSegmenter` with custom options. It automatically loads the best available payload data for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_auto_with_options <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto_with_options>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_lstm_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options)
+
+ Construct a :cpp:class:`ICU4XLineSegmenter` with custom options and LSTM payload data for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_lstm_with_options <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm_with_options>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_dictionary_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options)
+
+ Construct a :cpp:class:`ICU4XLineSegmenter` with custom options and dictionary payload data for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_dictionary_with_options <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary_with_options>`__ for more information.
+
+
+ .. cpp:function:: ICU4XLineBreakIteratorUtf8 segment_utf8(const std::string_view input) const
+
+ Segments a (potentially ill-formed) UTF-8 string.
+
+ See the `Rust documentation for segment_utf8 <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_utf8>`__ for more information.
+
+ Lifetimes: ``this``, ``input`` must live at least as long as the output.
+
+
+ .. cpp:function:: ICU4XLineBreakIteratorUtf16 segment_utf16(const diplomat::span<const uint16_t> input) const
+
+ Segments a UTF-16 string.
+
+ See the `Rust documentation for segment_utf16 <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_utf16>`__ for more information.
+
+ Lifetimes: ``this``, ``input`` must live at least as long as the output.
+
+
+ .. cpp:function:: ICU4XLineBreakIteratorLatin1 segment_latin1(const diplomat::span<const uint8_t> input) const
+
+ Segments a Latin-1 string.
+
+ See the `Rust documentation for segment_latin1 <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_latin1>`__ for more information.
+
+ Lifetimes: ``this``, ``input`` must live at least as long as the output.
+
diff --git a/intl/icu_capi/cpp/docs/source/segmenter_sentence_ffi.rst b/intl/icu_capi/cpp/docs/source/segmenter_sentence_ffi.rst
new file mode 100644
index 0000000000..1d10fdcf4a
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/segmenter_sentence_ffi.rst
@@ -0,0 +1,79 @@
+``segmenter_sentence::ffi``
+===========================
+
+.. cpp:class:: ICU4XSentenceBreakIteratorLatin1
+
+ See the `Rust documentation for SentenceBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html>`__ for more information.
+
+
+ .. cpp:function:: int32_t next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next>`__ for more information.
+
+
+.. cpp:class:: ICU4XSentenceBreakIteratorUtf16
+
+ See the `Rust documentation for SentenceBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html>`__ for more information.
+
+
+ .. cpp:function:: int32_t next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next>`__ for more information.
+
+
+.. cpp:class:: ICU4XSentenceBreakIteratorUtf8
+
+ See the `Rust documentation for SentenceBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html>`__ for more information.
+
+
+ .. cpp:function:: int32_t next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next>`__ for more information.
+
+
+.. cpp:class:: ICU4XSentenceSegmenter
+
+ An ICU4X sentence-break segmenter, capable of finding sentence breakpoints in strings.
+
+ See the `Rust documentation for SentenceSegmenter <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XSentenceSegmenter, ICU4XError> create(const ICU4XDataProvider& provider)
+
+ Construct an :cpp:class:`ICU4XSentenceSegmenter`.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.new>`__ for more information.
+
+
+ .. cpp:function:: ICU4XSentenceBreakIteratorUtf8 segment_utf8(const std::string_view input) const
+
+ Segments a (potentially ill-formed) UTF-8 string.
+
+ See the `Rust documentation for segment_utf8 <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_utf8>`__ for more information.
+
+ Lifetimes: ``this``, ``input`` must live at least as long as the output.
+
+
+ .. cpp:function:: ICU4XSentenceBreakIteratorUtf16 segment_utf16(const diplomat::span<const uint16_t> input) const
+
+ Segments a UTF-16 string.
+
+ See the `Rust documentation for segment_utf16 <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_utf16>`__ for more information.
+
+ Lifetimes: ``this``, ``input`` must live at least as long as the output.
+
+
+ .. cpp:function:: ICU4XSentenceBreakIteratorLatin1 segment_latin1(const diplomat::span<const uint8_t> input) const
+
+ Segments a Latin-1 string.
+
+ See the `Rust documentation for segment_latin1 <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_latin1>`__ for more information.
+
+ Lifetimes: ``this``, ``input`` must live at least as long as the output.
+
diff --git a/intl/icu_capi/cpp/docs/source/segmenter_word_ffi.rst b/intl/icu_capi/cpp/docs/source/segmenter_word_ffi.rst
new file mode 100644
index 0000000000..fc9cbe1494
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/segmenter_word_ffi.rst
@@ -0,0 +1,150 @@
+``segmenter_word::ffi``
+=======================
+
+.. cpp:enum-struct:: ICU4XSegmenterWordType
+
+ See the `Rust documentation for WordType <https://docs.rs/icu/latest/icu/segmenter/enum.WordType.html>`__ for more information.
+
+
+ .. cpp:enumerator:: None
+
+ .. cpp:enumerator:: Number
+
+ .. cpp:enumerator:: Letter
+
+.. cpp:class:: ICU4XWordBreakIteratorLatin1
+
+ See the `Rust documentation for WordBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html>`__ for more information.
+
+
+ .. cpp:function:: int32_t next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next>`__ for more information.
+
+
+ .. cpp:function:: ICU4XSegmenterWordType word_type() const
+
+ Return the status value of break boundary.
+
+ See the `Rust documentation for word_type <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type>`__ for more information.
+
+
+ .. cpp:function:: bool is_word_like() const
+
+ Return true when break boundary is word-like such as letter/number/CJK
+
+ See the `Rust documentation for is_word_like <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like>`__ for more information.
+
+
+.. cpp:class:: ICU4XWordBreakIteratorUtf16
+
+ See the `Rust documentation for WordBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html>`__ for more information.
+
+
+ .. cpp:function:: int32_t next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next>`__ for more information.
+
+
+ .. cpp:function:: ICU4XSegmenterWordType word_type() const
+
+ Return the status value of break boundary.
+
+ See the `Rust documentation for word_type <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type>`__ for more information.
+
+
+ .. cpp:function:: bool is_word_like() const
+
+ Return true when break boundary is word-like such as letter/number/CJK
+
+ See the `Rust documentation for is_word_like <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like>`__ for more information.
+
+
+.. cpp:class:: ICU4XWordBreakIteratorUtf8
+
+ See the `Rust documentation for WordBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html>`__ for more information.
+
+
+ .. cpp:function:: int32_t next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next>`__ for more information.
+
+
+ .. cpp:function:: ICU4XSegmenterWordType word_type() const
+
+ Return the status value of break boundary.
+
+ See the `Rust documentation for word_type <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type>`__ for more information.
+
+
+ .. cpp:function:: bool is_word_like() const
+
+ Return true when break boundary is word-like such as letter/number/CJK
+
+ See the `Rust documentation for is_word_like <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like>`__ for more information.
+
+
+.. cpp:class:: ICU4XWordSegmenter
+
+ An ICU4X word-break segmenter, capable of finding word breakpoints in strings.
+
+ See the `Rust documentation for WordSegmenter <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XWordSegmenter, ICU4XError> create_auto(const ICU4XDataProvider& provider)
+
+ Construct an :cpp:class:`ICU4XWordSegmenter` with automatically selecting the best available LSTM or dictionary payload data.
+
+ Note: currently, it uses dictionary for Chinese and Japanese, and LSTM for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_auto <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_auto>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XWordSegmenter, ICU4XError> create_lstm(const ICU4XDataProvider& provider)
+
+ Construct an :cpp:class:`ICU4XWordSegmenter` with LSTM payload data for Burmese, Khmer, Lao, and Thai.
+
+ Warning: :cpp:class:`ICU4XWordSegmenter` created by this function doesn't handle Chinese or Japanese.
+
+ See the `Rust documentation for new_lstm <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_lstm>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XWordSegmenter, ICU4XError> create_dictionary(const ICU4XDataProvider& provider)
+
+ Construct an :cpp:class:`ICU4XWordSegmenter` with dictionary payload data for Chinese, Japanese, Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_dictionary <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_dictionary>`__ for more information.
+
+
+ .. cpp:function:: ICU4XWordBreakIteratorUtf8 segment_utf8(const std::string_view input) const
+
+ Segments a (potentially ill-formed) UTF-8 string.
+
+ See the `Rust documentation for segment_utf8 <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_utf8>`__ for more information.
+
+ Lifetimes: ``this``, ``input`` must live at least as long as the output.
+
+
+ .. cpp:function:: ICU4XWordBreakIteratorUtf16 segment_utf16(const diplomat::span<const uint16_t> input) const
+
+ Segments a UTF-16 string.
+
+ See the `Rust documentation for segment_utf16 <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_utf16>`__ for more information.
+
+ Lifetimes: ``this``, ``input`` must live at least as long as the output.
+
+
+ .. cpp:function:: ICU4XWordBreakIteratorLatin1 segment_latin1(const diplomat::span<const uint8_t> input) const
+
+ Segments a Latin-1 string.
+
+ See the `Rust documentation for segment_latin1 <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_latin1>`__ for more information.
+
+ Lifetimes: ``this``, ``input`` must live at least as long as the output.
+
diff --git a/intl/icu_capi/cpp/docs/source/time_ffi.rst b/intl/icu_capi/cpp/docs/source/time_ffi.rst
new file mode 100644
index 0000000000..173a309e24
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/time_ffi.rst
@@ -0,0 +1,51 @@
+``time::ffi``
+=============
+
+.. cpp:class:: ICU4XTime
+
+ An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond
+
+ See the `Rust documentation for Time <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XTime, ICU4XError> create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond)
+
+ Creates a new :cpp:class:`ICU4XTime` given field values
+
+ See the `Rust documentation for Time <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XTime, ICU4XError> create_midnight()
+
+ Creates a new :cpp:class:`ICU4XTime` representing midnight (00:00.000).
+
+ See the `Rust documentation for Time <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html>`__ for more information.
+
+
+ .. cpp:function:: uint8_t hour() const
+
+ Returns the hour in this time
+
+ See the `Rust documentation for hour <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour>`__ for more information.
+
+
+ .. cpp:function:: uint8_t minute() const
+
+ Returns the minute in this time
+
+ See the `Rust documentation for minute <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute>`__ for more information.
+
+
+ .. cpp:function:: uint8_t second() const
+
+ Returns the second in this time
+
+ See the `Rust documentation for second <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second>`__ for more information.
+
+
+ .. cpp:function:: uint32_t nanosecond() const
+
+ Returns the nanosecond in this time
+
+ See the `Rust documentation for nanosecond <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/timezone_ffi.rst b/intl/icu_capi/cpp/docs/source/timezone_ffi.rst
new file mode 100644
index 0000000000..ee94c03524
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/timezone_ffi.rst
@@ -0,0 +1,279 @@
+``timezone::ffi``
+=================
+
+.. cpp:class:: ICU4XCustomTimeZone
+
+ See the `Rust documentation for CustomTimeZone <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XCustomTimeZone, ICU4XError> create_from_string(const std::string_view s)
+
+ Creates a time zone from an offset string.
+
+ See the `Rust documentation for from_str <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.from_str>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XCustomTimeZone create_empty()
+
+ Creates a time zone with no information.
+
+ See the `Rust documentation for new_empty <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.new_empty>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XCustomTimeZone create_utc()
+
+ Creates a time zone for UTC.
+
+ See the `Rust documentation for utc <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.utc>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> try_set_gmt_offset_seconds(int32_t offset_seconds)
+
+ Sets the ``gmt_offset`` field from offset seconds.
+
+ Errors if the offset seconds are out of range.
+
+ See the `Rust documentation for try_from_offset_seconds <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.try_from_offset_seconds>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html>`__
+
+
+ .. cpp:function:: void clear_gmt_offset()
+
+ Clears the ``gmt_offset`` field.
+
+ See the `Rust documentation for offset_seconds <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.offset_seconds>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html>`__
+
+
+ .. cpp:function:: diplomat::result<int32_t, ICU4XError> gmt_offset_seconds() const
+
+ Returns the value of the ``gmt_offset`` field as offset seconds.
+
+ Errors if the ``gmt_offset`` field is empty.
+
+ See the `Rust documentation for offset_seconds <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.offset_seconds>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html>`__
+
+
+ .. cpp:function:: diplomat::result<bool, ICU4XError> is_gmt_offset_positive() const
+
+ Returns whether the ``gmt_offset`` field is positive.
+
+ Errors if the ``gmt_offset`` field is empty.
+
+ See the `Rust documentation for is_positive <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.is_positive>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<bool, ICU4XError> is_gmt_offset_zero() const
+
+ Returns whether the ``gmt_offset`` field is zero.
+
+ Errors if the ``gmt_offset`` field is empty (which is not the same as zero).
+
+ See the `Rust documentation for is_zero <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.is_zero>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<bool, ICU4XError> gmt_offset_has_minutes() const
+
+ Returns whether the ``gmt_offset`` field has nonzero minutes.
+
+ Errors if the ``gmt_offset`` field is empty.
+
+ See the `Rust documentation for has_minutes <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.has_minutes>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<bool, ICU4XError> gmt_offset_has_seconds() const
+
+ Returns whether the ``gmt_offset`` field has nonzero seconds.
+
+ Errors if the ``gmt_offset`` field is empty.
+
+ See the `Rust documentation for has_seconds <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.has_seconds>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> try_set_time_zone_id(const std::string_view id)
+
+ Sets the ``time_zone_id`` field from a BCP-47 string.
+
+ Errors if the string is not a valid BCP-47 time zone ID.
+
+ See the `Rust documentation for time_zone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html>`__
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> try_set_iana_time_zone_id(const ICU4XIanaToBcp47Mapper& mapper, const std::string_view id)
+
+ Sets the ``time_zone_id`` field from an IANA string by looking up the corresponding BCP-47 string.
+
+ Errors if the string is not a valid BCP-47 time zone ID.
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47MapperBorrowed.html#method.get>`__ for more information.
+
+
+ .. cpp:function:: void clear_time_zone_id()
+
+ Clears the ``time_zone_id`` field.
+
+ See the `Rust documentation for time_zone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html>`__
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> time_zone_id_to_writeable(W& write) const
+
+ Writes the value of the ``time_zone_id`` field as a string.
+
+ Errors if the ``time_zone_id`` field is empty.
+
+ See the `Rust documentation for time_zone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html>`__
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> time_zone_id() const
+
+ Writes the value of the ``time_zone_id`` field as a string.
+
+ Errors if the ``time_zone_id`` field is empty.
+
+ See the `Rust documentation for time_zone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html>`__
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> try_set_metazone_id(const std::string_view id)
+
+ Sets the ``metazone_id`` field from a string.
+
+ Errors if the string is not a valid BCP-47 metazone ID.
+
+ See the `Rust documentation for metazone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html>`__
+
+
+ .. cpp:function:: void clear_metazone_id()
+
+ Clears the ``metazone_id`` field.
+
+ See the `Rust documentation for metazone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html>`__
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> metazone_id_to_writeable(W& write) const
+
+ Writes the value of the ``metazone_id`` field as a string.
+
+ Errors if the ``metazone_id`` field is empty.
+
+ See the `Rust documentation for metazone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html>`__
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> metazone_id() const
+
+ Writes the value of the ``metazone_id`` field as a string.
+
+ Errors if the ``metazone_id`` field is empty.
+
+ See the `Rust documentation for metazone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html>`__
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> try_set_zone_variant(const std::string_view id)
+
+ Sets the ``zone_variant`` field from a string.
+
+ Errors if the string is not a valid zone variant.
+
+ See the `Rust documentation for zone_variant <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html>`__
+
+
+ .. cpp:function:: void clear_zone_variant()
+
+ Clears the ``zone_variant`` field.
+
+ See the `Rust documentation for zone_variant <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html>`__
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> zone_variant_to_writeable(W& write) const
+
+ Writes the value of the ``zone_variant`` field as a string.
+
+ Errors if the ``zone_variant`` field is empty.
+
+ See the `Rust documentation for zone_variant <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html>`__
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> zone_variant() const
+
+ Writes the value of the ``zone_variant`` field as a string.
+
+ Errors if the ``zone_variant`` field is empty.
+
+ See the `Rust documentation for zone_variant <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html>`__
+
+
+ .. cpp:function:: void set_standard_time()
+
+ Sets the ``zone_variant`` field to standard time.
+
+ See the `Rust documentation for standard <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.standard>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__
+
+
+ .. cpp:function:: void set_daylight_time()
+
+ Sets the ``zone_variant`` field to daylight time.
+
+ See the `Rust documentation for daylight <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.daylight>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__
+
+
+ .. cpp:function:: diplomat::result<bool, ICU4XError> is_standard_time() const
+
+ Returns whether the ``zone_variant`` field is standard time.
+
+ Errors if the ``zone_variant`` field is empty.
+
+ See the `Rust documentation for standard <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.standard>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__
+
+
+ .. cpp:function:: diplomat::result<bool, ICU4XError> is_daylight_time() const
+
+ Returns whether the ``zone_variant`` field is daylight time.
+
+ Errors if the ``zone_variant`` field is empty.
+
+ See the `Rust documentation for daylight <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.daylight>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__
+
+
+ .. cpp:function:: void maybe_calculate_metazone(const ICU4XMetazoneCalculator& metazone_calculator, const ICU4XIsoDateTime& local_datetime)
+
+ Sets the metazone based on the time zone and the local timestamp.
+
+ See the `Rust documentation for maybe_calculate_metazone <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.maybe_calculate_metazone>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html#method.compute_metazone_from_time_zone>`__
+
diff --git a/intl/icu_capi/cpp/docs/source/timezone_formatter_ffi.rst b/intl/icu_capi/cpp/docs/source/timezone_formatter_ffi.rst
new file mode 100644
index 0000000000..38e2107b41
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/timezone_formatter_ffi.rst
@@ -0,0 +1,137 @@
+``timezone_formatter::ffi``
+===========================
+
+.. cpp:enum-struct:: ICU4XIsoTimeZoneFormat
+
+ See the `Rust documentation for IsoFormat <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoFormat.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Basic
+
+ .. cpp:enumerator:: Extended
+
+ .. cpp:enumerator:: UtcBasic
+
+ .. cpp:enumerator:: UtcExtended
+
+.. cpp:enum-struct:: ICU4XIsoTimeZoneMinuteDisplay
+
+ See the `Rust documentation for IsoMinutes <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoMinutes.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Required
+
+ .. cpp:enumerator:: Optional
+
+.. cpp:struct:: ICU4XIsoTimeZoneOptions
+
+ .. cpp:member:: ICU4XIsoTimeZoneFormat format
+
+ .. cpp:member:: ICU4XIsoTimeZoneMinuteDisplay minutes
+
+ .. cpp:member:: ICU4XIsoTimeZoneSecondDisplay seconds
+
+.. cpp:enum-struct:: ICU4XIsoTimeZoneSecondDisplay
+
+ See the `Rust documentation for IsoSeconds <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoSeconds.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Optional
+
+ .. cpp:enumerator:: Never
+
+.. cpp:class:: ICU4XTimeZoneFormatter
+
+ An ICU4X TimeZoneFormatter object capable of formatting an :cpp:class:`ICU4XCustomTimeZone` type (and others) as a string
+
+ See the `Rust documentation for TimeZoneFormatter <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XTimeZoneFormatter, ICU4XError> create_with_localized_gmt_fallback(const ICU4XDataProvider& provider, const ICU4XLocale& locale)
+
+ Creates a new :cpp:class:`ICU4XTimeZoneFormatter` from locale data.
+
+ Uses localized GMT as the fallback format.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.try_new>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.FallbackFormat.html>`__
+
+
+ .. cpp:function:: static diplomat::result<ICU4XTimeZoneFormatter, ICU4XError> create_with_iso_8601_fallback(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XIsoTimeZoneOptions options)
+
+ Creates a new :cpp:class:`ICU4XTimeZoneFormatter` from locale data.
+
+ Uses ISO-8601 as the fallback format.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.try_new>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.FallbackFormat.html>`__
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> load_generic_non_location_long(const ICU4XDataProvider& provider)
+
+ Loads generic non-location long format. Example: "Pacific Time"
+
+ See the `Rust documentation for include_generic_non_location_long <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_non_location_long>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> load_generic_non_location_short(const ICU4XDataProvider& provider)
+
+ Loads generic non-location short format. Example: "PT"
+
+ See the `Rust documentation for include_generic_non_location_short <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_non_location_short>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> load_specific_non_location_long(const ICU4XDataProvider& provider)
+
+ Loads specific non-location long format. Example: "Pacific Standard Time"
+
+ See the `Rust documentation for include_specific_non_location_long <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_specific_non_location_long>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> load_specific_non_location_short(const ICU4XDataProvider& provider)
+
+ Loads specific non-location short format. Example: "PST"
+
+ See the `Rust documentation for include_specific_non_location_short <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_specific_non_location_short>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> load_generic_location_format(const ICU4XDataProvider& provider)
+
+ Loads generic location format. Example: "Los Angeles Time"
+
+ See the `Rust documentation for include_generic_location_format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_location_format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> include_localized_gmt_format()
+
+ Loads localized GMT format. Example: "GMT-07:00"
+
+ See the `Rust documentation for include_localized_gmt_format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_localized_gmt_format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::monostate, ICU4XError> load_iso_8601_format(ICU4XIsoTimeZoneOptions options)
+
+ Loads ISO-8601 format. Example: "-07:00"
+
+ See the `Rust documentation for include_iso_8601_format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_iso_8601_format>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_custom_time_zone_to_writeable(const ICU4XCustomTimeZone& value, W& write) const
+
+ Formats a :cpp:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format>`__ for more information.
+
+ See the `Rust documentation for format_to_string <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format_to_string>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_custom_time_zone(const ICU4XCustomTimeZone& value) const
+
+ Formats a :cpp:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format>`__ for more information.
+
+ See the `Rust documentation for format_to_string <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format_to_string>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/docs/source/week_ffi.rst b/intl/icu_capi/cpp/docs/source/week_ffi.rst
new file mode 100644
index 0000000000..b07f8f7c7c
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/week_ffi.rst
@@ -0,0 +1,55 @@
+``week::ffi``
+=============
+
+.. cpp:class:: ICU4XWeekCalculator
+
+ A Week calculator, useful to be passed in to ``week_of_year()`` on Date and DateTime types
+
+ See the `Rust documentation for WeekCalculator <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XWeekCalculator, ICU4XError> create(const ICU4XDataProvider& provider, const ICU4XLocale& locale)
+
+ Creates a new :cpp:class:`ICU4XWeekCalculator` from locale data.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#method.try_new>`__ for more information.
+
+
+ .. cpp:function:: static ICU4XWeekCalculator create_from_first_day_of_week_and_min_week_days(ICU4XIsoWeekday first_weekday, uint8_t min_week_days)
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.first_weekday>`__, `2 <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.min_week_days>`__
+
+
+ .. cpp:function:: ICU4XIsoWeekday first_weekday() const
+
+ Returns the weekday that starts the week for this object's locale
+
+ See the `Rust documentation for first_weekday <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.first_weekday>`__ for more information.
+
+
+ .. cpp:function:: uint8_t min_week_days() const
+
+ The minimum number of days overlapping a year required for a week to be considered part of that year
+
+ See the `Rust documentation for min_week_days <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.min_week_days>`__ for more information.
+
+
+.. cpp:struct:: ICU4XWeekOf
+
+ See the `Rust documentation for WeekOf <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekOf.html>`__ for more information.
+
+
+ .. cpp:member:: uint16_t week
+
+ .. cpp:member:: ICU4XWeekRelativeUnit unit
+
+.. cpp:enum-struct:: ICU4XWeekRelativeUnit
+
+ See the `Rust documentation for RelativeUnit <https://docs.rs/icu/latest/icu/calendar/week/enum.RelativeUnit.html>`__ for more information.
+
+
+ .. cpp:enumerator:: Previous
+
+ .. cpp:enumerator:: Current
+
+ .. cpp:enumerator:: Next
diff --git a/intl/icu_capi/cpp/docs/source/zoned_formatter_ffi.rst b/intl/icu_capi/cpp/docs/source/zoned_formatter_ffi.rst
new file mode 100644
index 0000000000..9523798307
--- /dev/null
+++ b/intl/icu_capi/cpp/docs/source/zoned_formatter_ffi.rst
@@ -0,0 +1,94 @@
+``zoned_formatter::ffi``
+========================
+
+.. cpp:class:: ICU4XGregorianZonedDateTimeFormatter
+
+ An object capable of formatting a date time with time zone to a string.
+
+ See the `Rust documentation for TypedZonedDateTimeFormatter <https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XGregorianZonedDateTimeFormatter, ICU4XError> create_with_lengths(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length)
+
+ Creates a new :cpp:class:`ICU4XGregorianZonedDateTimeFormatter` from locale data.
+
+ This function has ``date_length`` and ``time_length`` arguments and uses default options for the time zone.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XGregorianZonedDateTimeFormatter, ICU4XError> create_with_lengths_and_iso_8601_time_zone_fallback(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length, ICU4XIsoTimeZoneOptions zone_options)
+
+ Creates a new :cpp:class:`ICU4XGregorianZonedDateTimeFormatter` from locale data.
+
+ This function has ``date_length`` and ``time_length`` arguments and uses an ISO-8601 style fallback for the time zone with the given configurations.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_datetime_with_custom_time_zone_to_writeable(const ICU4XIsoDateTime& datetime, const ICU4XCustomTimeZone& time_zone, W& write) const
+
+ Formats a :cpp:class:`ICU4XIsoDateTime` and :cpp:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_iso_datetime_with_custom_time_zone(const ICU4XIsoDateTime& datetime, const ICU4XCustomTimeZone& time_zone) const
+
+ Formats a :cpp:class:`ICU4XIsoDateTime` and :cpp:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.format>`__ for more information.
+
+
+.. cpp:class:: ICU4XZonedDateTimeFormatter
+
+ An object capable of formatting a date time with time zone to a string.
+
+ See the `Rust documentation for ZonedDateTimeFormatter <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XZonedDateTimeFormatter, ICU4XError> create_with_lengths(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length)
+
+ Creates a new :cpp:class:`ICU4XZonedDateTimeFormatter` from locale data.
+
+ This function has ``date_length`` and ``time_length`` arguments and uses default options for the time zone.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. cpp:function:: static diplomat::result<ICU4XZonedDateTimeFormatter, ICU4XError> create_with_lengths_and_iso_8601_time_zone_fallback(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length, ICU4XIsoTimeZoneOptions zone_options)
+
+ Creates a new :cpp:class:`ICU4XZonedDateTimeFormatter` from locale data.
+
+ This function has ``date_length`` and ``time_length`` arguments and uses an ISO-8601 style fallback for the time zone with the given configurations.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_datetime_with_custom_time_zone_to_writeable(const ICU4XDateTime& datetime, const ICU4XCustomTimeZone& time_zone, W& write) const
+
+ Formats a :cpp:class:`ICU4XDateTime` and :cpp:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_datetime_with_custom_time_zone(const ICU4XDateTime& datetime, const ICU4XCustomTimeZone& time_zone) const
+
+ Formats a :cpp:class:`ICU4XDateTime` and :cpp:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_datetime_with_custom_time_zone_to_writeable(const ICU4XIsoDateTime& datetime, const ICU4XCustomTimeZone& time_zone, W& write) const
+
+ Formats a :cpp:class:`ICU4XIsoDateTime` and :cpp:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format>`__ for more information.
+
+
+ .. cpp:function:: diplomat::result<std::string, ICU4XError> format_iso_datetime_with_custom_time_zone(const ICU4XIsoDateTime& datetime, const ICU4XCustomTimeZone& time_zone) const
+
+ Formats a :cpp:class:`ICU4XIsoDateTime` and :cpp:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format>`__ for more information.
+
diff --git a/intl/icu_capi/cpp/examples/bidi/.gitignore b/intl/icu_capi/cpp/examples/bidi/.gitignore
new file mode 100644
index 0000000000..cb34c546b3
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/bidi/.gitignore
@@ -0,0 +1,2 @@
+a.out
+a.out.dSYM
diff --git a/intl/icu_capi/cpp/examples/bidi/Makefile b/intl/icu_capi/cpp/examples/bidi/Makefile
new file mode 100644
index 0000000000..594ca66c37
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/bidi/Makefile
@@ -0,0 +1,28 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := test
+.PHONY: build test
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*.hpp) $(wildcard ../../../c/include/*.h)
+
+CXX?=g++
+
+$(ALL_HEADERS):
+
+../../../../../target/debug/libicu_capi_staticlib.a: FORCE
+ cargo build -p icu_capi_staticlib --features compiled_data
+
+a.out: ../../../../../target/debug/libicu_capi_staticlib.a $(ALL_HEADERS) test.cpp
+ $(CXX) -std=c++17 test.cpp ../../../../../target/debug/libicu_capi_staticlib.a -ldl -lpthread -lm -g
+
+build: a.out
+
+test: build
+ ./a.out
+
+clean:
+ git clean -xf *
+ rm -f ../../../../../target/debug/libicu_capi_staticlib.a
diff --git a/intl/icu_capi/cpp/examples/bidi/test.cpp b/intl/icu_capi/cpp/examples/bidi/test.cpp
new file mode 100644
index 0000000000..629cf752ce
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/bidi/test.cpp
@@ -0,0 +1,93 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#include "../../include/ICU4XDataProvider.hpp"
+#include "../../include/ICU4XBidi.hpp"
+#include "../../include/ICU4XLogger.hpp"
+
+#include <iostream>
+
+int main() {
+ ICU4XDataProvider dp = ICU4XDataProvider::create_compiled();
+ auto bidi = ICU4XBidi::create(dp).ok().value();
+
+ // Written char-by-char to avoid messing up certain text editors.
+ std::string_view str =
+ "א"
+ "ב"
+ "ג"
+ "a"
+ "b"
+ "c"
+ "\n"
+ "a"
+ "b"
+ "c"
+ "א"
+ "ב"
+ "ג";
+
+ // reordered string is same for both lines
+ std::string_view reordered_expected =
+ "a"
+ "b"
+ "c"
+ "ג"
+ "ב"
+ "א";
+ auto bidi_info = bidi.for_text(str, ICU4XBidi::level_ltr());
+ auto n_para = bidi_info.paragraph_count();
+ if (n_para != 2) {
+ std::cout << "Expected 2 paragraphs, found " << n_para << std::endl;
+ return 1;
+ }
+
+ auto para = bidi_info.paragraph_at(0).value();
+
+ auto size = para.size();
+ if (size != 10) {
+ std::cout << "Expected paragraph of size 10, found " << size << std::endl;
+ return 1;
+ }
+
+ // The first paragraph's first strongly directional character is RTL
+ uint8_t level = para.level_at(0);
+ std::cout << "Level of first paragraph at index 0 is " << unsigned(level) << std::endl;
+ if (!ICU4XBidi::level_is_rtl(level)) {
+ std::cout << "Expected level at index 0 to be RTL" << std::endl;
+ return 1;
+ }
+
+
+ std::string reordered = para.reorder_line(0, 9).ok().value();
+ std::cout << "Reordered paragraph: " << reordered << std::endl;
+
+ if (reordered != reordered) {
+ std::cout << "Found incorrect reordering, expected: " << reordered << std::endl;
+ }
+
+ para.set_paragraph_in_text(1).ok().value();
+
+ size = para.size();
+ if (size != 9) {
+ std::cout << "Expected paragraph of size 9, found " << size << std::endl;
+ return 1;
+ }
+
+ // The second paragraph's first strongly directional character is LTR
+ level = para.level_at(0);
+ std::cout << "Level of second paragraph at index 0 is " << unsigned(level) << std::endl;
+ if (!ICU4XBidi::level_is_ltr(level)) {
+ std::cout << "Expected level at index 0 to be LTR" << std::endl;
+ return 1;
+ }
+ reordered = para.reorder_line(10, 19).ok().value();
+ std::cout << "Reordered paragraph: " << reordered << std::endl;
+
+ if (reordered != reordered) {
+ std::cout << "Found incorrect reordering, expected: " << reordered << std::endl;
+ }
+
+ return 0;
+}
diff --git a/intl/icu_capi/cpp/examples/casemapping/.gitignore b/intl/icu_capi/cpp/examples/casemapping/.gitignore
new file mode 100644
index 0000000000..cb34c546b3
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/casemapping/.gitignore
@@ -0,0 +1,2 @@
+a.out
+a.out.dSYM
diff --git a/intl/icu_capi/cpp/examples/casemapping/Makefile b/intl/icu_capi/cpp/examples/casemapping/Makefile
new file mode 100644
index 0000000000..57a9c06943
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/casemapping/Makefile
@@ -0,0 +1,28 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := test
+.PHONY: build test
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*.hpp) $(wildcard ../../../c/include/*.h)
+
+CXX?=g++
+
+$(ALL_HEADERS):
+
+../../../../../target/debug/libicu_capi_staticlib.a: FORCE
+ cargo build -p icu_capi_staticlib
+
+a.out: ../../../../../target/debug/libicu_capi_staticlib.a $(ALL_HEADERS) test.cpp
+ $(CXX) -std=c++17 test.cpp ../../../../../target/debug/libicu_capi_staticlib.a -ldl -lpthread -lm -g
+
+build: a.out
+
+test: build
+ ./a.out
+
+clean:
+ git clean -xf *
+ rm -f ../../../../../target/debug/libicu_capi_staticlib.a
diff --git a/intl/icu_capi/cpp/examples/casemapping/test.cpp b/intl/icu_capi/cpp/examples/casemapping/test.cpp
new file mode 100644
index 0000000000..3559c5435d
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/casemapping/test.cpp
@@ -0,0 +1,109 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#include "../../include/ICU4XCaseMapper.hpp"
+#include "../../include/ICU4XLogger.hpp"
+#include "../../include/ICU4XDataProvider.hpp"
+#include "../../include/ICU4XCodePointSetBuilder.hpp"
+#include "../../include/ICU4XTitlecaseOptionsV1.hpp"
+
+#include <iostream>
+
+int main() {
+ ICU4XLogger::init_simple_logger();
+ ICU4XLocale und = ICU4XLocale::create_from_string("und").ok().value();
+ ICU4XLocale greek = ICU4XLocale::create_from_string("el").ok().value();
+ ICU4XLocale turkish = ICU4XLocale::create_from_string("tr").ok().value();
+ ICU4XDataProvider dp = ICU4XDataProvider::create_compiled();
+
+ ICU4XCaseMapper cm = ICU4XCaseMapper::create(dp).ok().value();
+
+ ICU4XTitlecaseOptionsV1 tc_options = ICU4XTitlecaseOptionsV1::default_options();
+
+ std::string out = cm.lowercase("hEllO WorLd", und).ok().value();
+ std::cout << "Lowercased value is " << out << std::endl;
+ if (out != "hello world") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+ out = cm.uppercase("hEllO WorLd", und).ok().value();
+ std::cout << "Uppercased value is " << out << std::endl;
+ if (out != "HELLO WORLD") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ out = cm.titlecase_segment_with_only_case_data_v1("hEllO WorLd", und, tc_options).ok().value();
+ std::cout << "Titlecased value is " << out << std::endl;
+ if (out != "Hello world") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+
+ // locale-specific behavior
+
+ out = cm.uppercase("Γειά σου Κόσμε", und).ok().value();
+ std::cout << "Uppercased value is " << out << std::endl;
+ if (out != "ΓΕΙΆ ΣΟΥ ΚΌΣΜΕ") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ out = cm.uppercase("Γειά σου Κόσμε", greek).ok().value();
+ std::cout << "Uppercased value is " << out << std::endl;
+ if (out != "ΓΕΙΑ ΣΟΥ ΚΟΣΜΕ") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ out = cm.uppercase("istanbul", und).ok().value();
+ std::cout << "Uppercased value is " << out << std::endl;
+ if (out != "ISTANBUL") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ out = cm.uppercase("istanbul", turkish).ok().value();
+ std::cout << "Uppercased value is " << out << std::endl;
+ if (out != "İSTANBUL") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+
+ out = cm.fold("ISTANBUL").ok().value();
+ std::cout << "Folded value is " << out << std::endl;
+ if (out != "istanbul") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ out = cm.fold_turkic("ISTANBUL").ok().value();
+ std::cout << "Turkic-folded value is " << out << std::endl;
+ if (out != "ıstanbul") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ ICU4XCodePointSetBuilder builder = ICU4XCodePointSetBuilder::create();
+
+ cm.add_case_closure_to('s', builder);
+
+ auto set = builder.build();
+
+ if (set.contains('s')) {
+ std::cout << "Set contains 's', which was not expected" << std::endl;
+ return 1;
+ }
+ if (!set.contains('S')) {
+ std::cout << "Set does not 'S', which was not expected" << std::endl;
+ return 1;
+ }
+ if (!set.contains(U'ſ')) {
+ std::cout << "Set does not 'S', which was not expected" << std::endl;
+ return 1;
+ }
+ return 0;
+}
diff --git a/intl/icu_capi/cpp/examples/collator/.gitignore b/intl/icu_capi/cpp/examples/collator/.gitignore
new file mode 100644
index 0000000000..cb34c546b3
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/collator/.gitignore
@@ -0,0 +1,2 @@
+a.out
+a.out.dSYM
diff --git a/intl/icu_capi/cpp/examples/collator/Makefile b/intl/icu_capi/cpp/examples/collator/Makefile
new file mode 100644
index 0000000000..57a9c06943
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/collator/Makefile
@@ -0,0 +1,28 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := test
+.PHONY: build test
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*.hpp) $(wildcard ../../../c/include/*.h)
+
+CXX?=g++
+
+$(ALL_HEADERS):
+
+../../../../../target/debug/libicu_capi_staticlib.a: FORCE
+ cargo build -p icu_capi_staticlib
+
+a.out: ../../../../../target/debug/libicu_capi_staticlib.a $(ALL_HEADERS) test.cpp
+ $(CXX) -std=c++17 test.cpp ../../../../../target/debug/libicu_capi_staticlib.a -ldl -lpthread -lm -g
+
+build: a.out
+
+test: build
+ ./a.out
+
+clean:
+ git clean -xf *
+ rm -f ../../../../../target/debug/libicu_capi_staticlib.a
diff --git a/intl/icu_capi/cpp/examples/collator/test.cpp b/intl/icu_capi/cpp/examples/collator/test.cpp
new file mode 100644
index 0000000000..20cd0d1315
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/collator/test.cpp
@@ -0,0 +1,67 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#include "../../include/ICU4XCollator.hpp"
+#include "../../include/ICU4XDataProvider.hpp"
+#include "../../include/ICU4XLocale.hpp"
+#include "../../include/ICU4XLogger.hpp"
+#include "../../include/ICU4XOrdering.hpp"
+
+#include <iostream>
+#include <string_view>
+
+int main() {
+ ICU4XLogger::init_simple_logger();
+ ICU4XDataProvider dp = ICU4XDataProvider::create_compiled();
+
+ // test 01 - basic collation example, default CollatorOptions
+
+ std::string_view manna{ "manna" };
+ std::string_view manana{ "mañana" };
+
+ ICU4XLocale locale = ICU4XLocale::create_from_string("en").ok().value();
+ ICU4XCollatorOptionsV1 options = {};
+ ICU4XCollator collator = ICU4XCollator::create_v1(dp, locale, options).ok().value();
+ ICU4XOrdering actual = collator.compare(manna, manana);
+
+ if (actual != ICU4XOrdering::Greater) {
+ std::cout << "Expected manna > mañana for locale " << locale.to_string().ok().value() << std::endl;
+ return 1;
+ }
+
+ locale = ICU4XLocale::create_from_string("es").ok().value();
+ collator = ICU4XCollator::create_v1(dp, locale, options).ok().value();
+ actual = collator.compare(manna, manana);
+
+ if (actual != ICU4XOrdering::Less) {
+ std::cout << "Expected manna < mañana for locale " << locale.to_string().ok().value()<< std::endl;
+ return 1;
+ }
+
+ // test 02 - collation strength example, requires non-default CollatorOptions
+
+ std::string_view as{ "as" };
+ std::string_view graveAs{ "às" };
+
+ locale = ICU4XLocale::create_from_string("en").ok().value();
+ options.strength = ICU4XCollatorStrength::Primary;
+ collator = ICU4XCollator::create_v1(dp, locale, options).ok().value();
+ actual = collator.compare(as, graveAs);
+
+ if (actual != ICU4XOrdering::Equal) {
+ std::cout << "Expected as = às for primary strength, locale " << locale.to_string().ok().value()<< std::endl;
+ return 1;
+ }
+
+ options.strength = ICU4XCollatorStrength::Secondary;
+ collator = ICU4XCollator::create_v1(dp, locale, options).ok().value();
+ actual = collator.compare(as, graveAs);
+
+ if (actual != ICU4XOrdering::Less) {
+ std::cout << "Expected as < às for secondary strength, locale " << locale.to_string().ok().value()<< std::endl;
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/intl/icu_capi/cpp/examples/datetime/.gitignore b/intl/icu_capi/cpp/examples/datetime/.gitignore
new file mode 100644
index 0000000000..cb34c546b3
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/datetime/.gitignore
@@ -0,0 +1,2 @@
+a.out
+a.out.dSYM
diff --git a/intl/icu_capi/cpp/examples/datetime/Makefile b/intl/icu_capi/cpp/examples/datetime/Makefile
new file mode 100644
index 0000000000..57a9c06943
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/datetime/Makefile
@@ -0,0 +1,28 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := test
+.PHONY: build test
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*.hpp) $(wildcard ../../../c/include/*.h)
+
+CXX?=g++
+
+$(ALL_HEADERS):
+
+../../../../../target/debug/libicu_capi_staticlib.a: FORCE
+ cargo build -p icu_capi_staticlib
+
+a.out: ../../../../../target/debug/libicu_capi_staticlib.a $(ALL_HEADERS) test.cpp
+ $(CXX) -std=c++17 test.cpp ../../../../../target/debug/libicu_capi_staticlib.a -ldl -lpthread -lm -g
+
+build: a.out
+
+test: build
+ ./a.out
+
+clean:
+ git clean -xf *
+ rm -f ../../../../../target/debug/libicu_capi_staticlib.a
diff --git a/intl/icu_capi/cpp/examples/datetime/test.cpp b/intl/icu_capi/cpp/examples/datetime/test.cpp
new file mode 100644
index 0000000000..4e86e86e52
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/datetime/test.cpp
@@ -0,0 +1,116 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#include "../../include/ICU4XGregorianDateFormatter.hpp"
+#include "../../include/ICU4XGregorianDateTimeFormatter.hpp"
+#include "../../include/ICU4XDateTimeFormatter.hpp"
+#include "../../include/ICU4XTimeFormatter.hpp"
+#include "../../include/ICU4XDataStruct.hpp"
+#include "../../include/ICU4XLogger.hpp"
+#include "../../include/ICU4XCustomTimeZone.hpp"
+#include "../../include/ICU4XIanaToBcp47Mapper.hpp"
+#include "../../include/ICU4XBcp47ToIanaMapper.hpp"
+#include "../../include/ICU4XGregorianZonedDateTimeFormatter.hpp"
+#include "../../include/ICU4XZonedDateTimeFormatter.hpp"
+
+#include <atomic>
+#include <iostream>
+#include <array>
+
+int main() {
+ ICU4XLogger::init_simple_logger();
+ ICU4XLocale locale = ICU4XLocale::create_from_string("es").ok().value();
+ std::cout << "Running test for locale " << locale.to_string().ok().value() << std::endl;
+ ICU4XDataProvider dp = ICU4XDataProvider::create_compiled();
+
+ ICU4XIsoDateTime date = ICU4XIsoDateTime::create(2022, 07, 11, 13, 06, 42, 0).ok().value();
+
+ ICU4XTimeFormatter tf = ICU4XTimeFormatter::create_with_length(dp, locale, ICU4XTimeLength::Short).ok().value();
+ std::string out = tf.format_iso_datetime(date).ok().value();
+ std::cout << "Formatted value is " << out << std::endl;
+ if (out != "13:06") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ ICU4XGregorianDateFormatter df = ICU4XGregorianDateFormatter::create_with_length(dp, locale, ICU4XDateLength::Full).ok().value();
+ out = df.format_iso_datetime(date).ok().value();
+ std::cout << "Formatted value is " << out << std::endl;
+ if (out != "lunes, 11 de julio de 2022") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ ICU4XGregorianDateTimeFormatter dtf = ICU4XGregorianDateTimeFormatter::create_with_lengths(dp, locale, ICU4XDateLength::Medium, ICU4XTimeLength::Short).ok().value();
+ out = dtf.format_iso_datetime(date).ok().value();
+ std::cout << "Formatted value is " << out << std::endl;
+ if (out != "11 jul 2022, 13:06") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ locale = ICU4XLocale::create_from_string("en-u-ca-japanese").ok().value();
+ ICU4XCalendar cal = ICU4XCalendar::create_for_locale(dp, locale).ok().value();
+ ICU4XDateTime any_date = ICU4XDateTime::create_from_iso_in_calendar(2020, 10, 5, 13, 33, 15, 0, cal).ok().value();
+ ICU4XDateTimeFormatter any_dtf = ICU4XDateTimeFormatter::create_with_lengths(dp, locale, ICU4XDateLength::Medium, ICU4XTimeLength::Short).ok().value();
+ out = any_dtf.format_datetime(any_date).ok().value();
+ std::cout << "Formatted value is " << out << std::endl;
+ if (out != "Oct 5, 2 Reiwa, 1:33\u202fPM") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ ICU4XCustomTimeZone time_zone = ICU4XCustomTimeZone::create_from_string("-06:00").ok().value();
+ int32_t offset = time_zone.gmt_offset_seconds().ok().value();
+ if (offset != -21600) {
+ std::cout << "GMT offset doesn't parse" << std::endl;
+ return 1;
+ }
+ ICU4XMetazoneCalculator mzcalc = ICU4XMetazoneCalculator::create(dp).ok().value();
+ ICU4XIanaToBcp47Mapper mapper = ICU4XIanaToBcp47Mapper::create(dp).ok().value();
+ time_zone.try_set_iana_time_zone_id(mapper, "america/chicago").ok().value();
+ std::string time_zone_id_return = time_zone.time_zone_id().ok().value();
+ if (time_zone_id_return != "uschi") {
+ std::cout << "Time zone ID does not roundtrip: " << time_zone_id_return << std::endl;
+ return 1;
+ }
+ ICU4XBcp47ToIanaMapper reverse_mapper = ICU4XBcp47ToIanaMapper::create(dp).ok().value();
+ std::string recovered_iana_id = reverse_mapper.get("uschi").ok().value();
+ if (recovered_iana_id != "America/Chicago") {
+ std::cout << "Time zone ID does not canonicalize to IANA: " << recovered_iana_id << std::endl;
+ return 1;
+ }
+ ICU4XIsoDateTime local_datetime = ICU4XIsoDateTime::create(2022, 8, 25, 0, 0, 0, 0).ok().value();
+ time_zone.maybe_calculate_metazone(mzcalc, local_datetime);
+ std::string metazone_id_return = time_zone.metazone_id().ok().value();
+ if (metazone_id_return != "amce") {
+ std::cout << "Metazone ID not calculated correctly; got " << metazone_id_return << std::endl;
+ return 1;
+ }
+ // Note: The daylight time switch should normally come from TZDB calculations.
+ time_zone.set_daylight_time();
+ std::string zone_variant_return = time_zone.zone_variant().ok().value();
+ if (zone_variant_return != "dt") {
+ std::cout << "Zone variant not calculated correctly; got " << zone_variant_return << std::endl;
+ return 1;
+ }
+
+ ICU4XGregorianZonedDateTimeFormatter gzdtf = ICU4XGregorianZonedDateTimeFormatter::create_with_lengths(dp, locale, ICU4XDateLength::Full, ICU4XTimeLength::Full).ok().value();
+ out = gzdtf.format_iso_datetime_with_custom_time_zone(date, time_zone).ok().value();
+ std::cout << "Formatted value is " << out << std::endl;
+ if (out != "Monday, July 11, 2022, 1:06:42\u202fPM Central Daylight Time") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ ICU4XZonedDateTimeFormatter zdtf = ICU4XZonedDateTimeFormatter::create_with_lengths(dp, locale, ICU4XDateLength::Full, ICU4XTimeLength::Full).ok().value();
+ out = zdtf.format_datetime_with_custom_time_zone(any_date, time_zone).ok().value();
+ std::cout << "Formatted value is " << out << std::endl;
+ if (out != "Monday, October 5, 2 Reiwa, 1:33:15\u202fPM Central Daylight Time") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/intl/icu_capi/cpp/examples/fixeddecimal/.gitignore b/intl/icu_capi/cpp/examples/fixeddecimal/.gitignore
new file mode 100644
index 0000000000..cb34c546b3
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/fixeddecimal/.gitignore
@@ -0,0 +1,2 @@
+a.out
+a.out.dSYM
diff --git a/intl/icu_capi/cpp/examples/fixeddecimal/Makefile b/intl/icu_capi/cpp/examples/fixeddecimal/Makefile
new file mode 100644
index 0000000000..57a9c06943
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/fixeddecimal/Makefile
@@ -0,0 +1,28 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := test
+.PHONY: build test
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*.hpp) $(wildcard ../../../c/include/*.h)
+
+CXX?=g++
+
+$(ALL_HEADERS):
+
+../../../../../target/debug/libicu_capi_staticlib.a: FORCE
+ cargo build -p icu_capi_staticlib
+
+a.out: ../../../../../target/debug/libicu_capi_staticlib.a $(ALL_HEADERS) test.cpp
+ $(CXX) -std=c++17 test.cpp ../../../../../target/debug/libicu_capi_staticlib.a -ldl -lpthread -lm -g
+
+build: a.out
+
+test: build
+ ./a.out
+
+clean:
+ git clean -xf *
+ rm -f ../../../../../target/debug/libicu_capi_staticlib.a
diff --git a/intl/icu_capi/cpp/examples/fixeddecimal/test.cpp b/intl/icu_capi/cpp/examples/fixeddecimal/test.cpp
new file mode 100644
index 0000000000..365d3972c5
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/fixeddecimal/test.cpp
@@ -0,0 +1,127 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#include "../../include/ICU4XFixedDecimalFormatter.hpp"
+#include "../../include/ICU4XDataStruct.hpp"
+#include "../../include/ICU4XLogger.hpp"
+
+#include <iostream>
+#include <array>
+
+int main() {
+ ICU4XLogger::init_simple_logger();
+ ICU4XLocale locale = ICU4XLocale::create_from_string("bn").ok().value();
+ std::cout << "Running test for locale " << locale.to_string().ok().value() << std::endl;
+ ICU4XDataProvider dp = ICU4XDataProvider::create_compiled();
+ ICU4XFixedDecimalFormatter fdf = ICU4XFixedDecimalFormatter::create_with_grouping_strategy(
+ dp, locale, ICU4XFixedDecimalGroupingStrategy::Auto).ok().value();
+
+ ICU4XFixedDecimal decimal = ICU4XFixedDecimal::create_from_u64(1000007);
+ std::string out = fdf.format(decimal).ok().value();
+ std::cout << "Formatted value is " << out << std::endl;
+ if (out != "১০,০০,০০৭") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ std::string out2;
+ fdf.format_to_writeable(decimal, out2);
+ std::cout << "Formatted writeable value is " << out2 << std::endl;
+ if (out2 != "১০,০০,০০৭") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ decimal.multiply_pow10(2);
+ decimal.set_sign(ICU4XFixedDecimalSign::Negative);
+ out = fdf.format(decimal).ok().value();
+ std::cout << "Value x100 and negated is " << out << std::endl;
+ if (out != "-১০,০০,০০,৭০০") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ decimal = ICU4XFixedDecimal::create_from_f64_with_floating_precision(100.01).ok().value();
+ out = fdf.format(decimal).ok().value();
+ std::cout << "Formatted float value is " << out << std::endl;
+ if (out != "১০০.০১") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ decimal.pad_end(-4);
+ out = fdf.format(decimal).ok().value();
+ std::cout << "Formatted left-padded float value is " << out << std::endl;
+ if (out != "১০০.০১০০") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ decimal.pad_start(4);
+ out = fdf.format(decimal).ok().value();
+ std::cout << "Formatted right-padded float value is " << out << std::endl;
+ if (out != "০,১০০.০১০০") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ decimal.set_max_position(3);
+ out = fdf.format(decimal).ok().value();
+ std::cout << "Formatted truncated float value is " << out << std::endl;
+ if (out != "১০০.০১০০") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ decimal = ICU4XFixedDecimal::create_from_f64_with_lower_magnitude(100.0006, -2).ok().value();
+ out = fdf.format(decimal).ok().value();
+ std::cout << "Formatted float value from precision 2 is " << out << std::endl;
+ if (out != "১০০.০০") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ decimal = ICU4XFixedDecimal::create_from_f64_with_significant_digits(100.0006, 5).ok().value();
+ out = fdf.format(decimal).ok().value();
+ std::cout << "Formatted float value with 5 digits is " << out << std::endl;
+ if (out != "১০০.০০") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ std::array<char32_t, 10> digits = {U'a', U'b', U'c', U'd', U'e', U'f', U'g', U'h', U'i', U'j'};
+
+ auto data = ICU4XDataStruct::create_decimal_symbols_v1("+", "", "-", "", "/", "_", 4, 2, 4, digits).ok().value();
+
+ fdf = ICU4XFixedDecimalFormatter::create_with_decimal_symbols_v1(data, ICU4XFixedDecimalGroupingStrategy::Auto).ok().value();
+
+ decimal = ICU4XFixedDecimal::create_from_f64_with_floating_precision(123456.8901).ok().value();
+ out = fdf.format(decimal).ok().value();
+ std::cout << "Formatted float value for custom numeric system is " << out << std::endl;
+ if (out != "bcdefg/ijab") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+ decimal = ICU4XFixedDecimal::create_from_f64_with_floating_precision(123451234567.8901).ok().value();
+ out = fdf.format(decimal).ok().value();
+ std::cout << "Formatted float value for custom numeric system is " << out << std::endl;
+ if (out != "bc_de_fb_cd_efgh/ijab") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ locale = ICU4XLocale::create_from_string("th-u-nu-thai").ok().value();
+ std::cout << "Running test for locale " << locale.to_string().ok().value() << std::endl;
+ fdf = ICU4XFixedDecimalFormatter::create_with_grouping_strategy(
+ dp, locale, ICU4XFixedDecimalGroupingStrategy::Auto).ok().value();
+
+ decimal = ICU4XFixedDecimal::create_from_f64_with_floating_precision(123456.8901).ok().value();
+ out = fdf.format(decimal).ok().value();
+ std::cout << "Formatted value is " << out << std::endl;
+ if (out != "๑๒๓,๔๕๖.๘๙๐๑") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+ return 0;
+}
diff --git a/intl/icu_capi/cpp/examples/fixeddecimal_wasm/.gitignore b/intl/icu_capi/cpp/examples/fixeddecimal_wasm/.gitignore
new file mode 100644
index 0000000000..100536298e
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/fixeddecimal_wasm/.gitignore
@@ -0,0 +1,9 @@
+web-version.html
+web-version.wasm
+web-version.js
+node-version.js
+node-version.wasm
+package-lock.json
+node_modules
+a.out
+a.out.dSYM
diff --git a/intl/icu_capi/cpp/examples/fixeddecimal_wasm/Makefile b/intl/icu_capi/cpp/examples/fixeddecimal_wasm/Makefile
new file mode 100644
index 0000000000..b2c0a018cf
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/fixeddecimal_wasm/Makefile
@@ -0,0 +1,53 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := build
+.PHONY: build test clean serve build-host test-host
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*.hpp) $(wildcard ../../../c/include/*.h)
+ICU4X_NIGHTLY_TOOLCHAIN ?= "nightly-2022-12-26"
+
+CXX?=g++
+EMCC?=emcc
+
+$(ALL_HEADERS):
+
+crate/target/debug/libcrate.a: FORCE
+ cd crate && cargo build
+
+a.out: crate/target/debug/libcrate.a $(ALL_HEADERS) test.cpp
+ $(CXX) -std=c++17 test.cpp crate/target/debug/libcrate.a -ldl -lpthread -lm -g
+
+crate/target/wasm32-unknown-emscripten/release/libcrate.a: FORCE
+ rustup toolchain install ${ICU4X_NIGHTLY_TOOLCHAIN}
+ rustup component add rust-src --toolchain ${ICU4X_NIGHTLY_TOOLCHAIN}
+ RUSTFLAGS="-Cpanic=abort -Copt-level=s -Clto -Cembed-bitcode" \
+ cd crate && cargo +${ICU4X_NIGHTLY_TOOLCHAIN} build --release --target wasm32-unknown-emscripten -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort
+
+web-version.html: crate/target/wasm32-unknown-emscripten/release/libcrate.a $(ALL_HEADERS) test.cpp
+ $(EMCC) -std=c++17 test.cpp crate/target/wasm32-unknown-emscripten/release/libcrate.a -ldl -lpthread -lm -g -o web-version.html --bind --emrun -sENVIRONMENT=web -sWASM=1 -sEXPORT_ES6=1 -sMODULARIZE=1
+
+node-version.js: crate/target/wasm32-unknown-emscripten/release/libcrate.a $(ALL_HEADERS) test.cpp
+ $(EMCC) -std=c++17 test.cpp crate/target/wasm32-unknown-emscripten/release/libcrate.a -ldl -lpthread -lm -g -o node-version.js --bind -sWASM=1 -sENVIRONMENT=node -sWASM_ASYNC_COMPILATION=0 -DNOMAIN
+
+build: web-version.html node-version.js
+
+test: node-version.js
+ exec node ./node-test.js
+
+serve: web-version.html
+ emrun web-version.html
+
+# These make it possible to ensure that the C++ code is up to date with the bindings
+# without needing to set up emsdk. This way `make test-ffi` works without emsdk.
+build-host: a.out
+
+test-host: build-host
+ ./a.out
+
+clean:
+ git clean -xf *
+ rm -f crate/target/wasm32-unknown-emscripten/release/libcrate.a
+ rm -f crate/target/debug/libcrate.a
diff --git a/intl/icu_capi/cpp/examples/fixeddecimal_wasm/README b/intl/icu_capi/cpp/examples/fixeddecimal_wasm/README
new file mode 100644
index 0000000000..1299d40bf0
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/fixeddecimal_wasm/README
@@ -0,0 +1,7 @@
+This folder contains a test for calling ICU4X from C++ compiled to WASM (via emscripten).
+
+You need the [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html) downloaded and sourced into your environment to run this.
+
+There are two ways to run the test. Firstly, you can call `make test`, which runs `node node-test.js` after building the appropriate WASM files. This runs a CLI test with the fixed decimal example in test.cpp.
+
+The other way is to run `make serve`, which will open a web page running test.cpp in your browser. \ No newline at end of file
diff --git a/intl/icu_capi/cpp/examples/fixeddecimal_wasm/node-test.js b/intl/icu_capi/cpp/examples/fixeddecimal_wasm/node-test.js
new file mode 100644
index 0000000000..d4a7a99d41
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/fixeddecimal_wasm/node-test.js
@@ -0,0 +1,6 @@
+wasm = require("./node-version.js");
+
+const exitCode = wasm.runFixedDecimal();
+if (exitCode !== 0) {
+ throw new Error(`Test failed with exit code ${exitCode}`)
+}
diff --git a/intl/icu_capi/cpp/examples/fixeddecimal_wasm/package.json b/intl/icu_capi/cpp/examples/fixeddecimal_wasm/package.json
new file mode 100644
index 0000000000..5567954da2
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/fixeddecimal_wasm/package.json
@@ -0,0 +1,6 @@
+{
+ "type": "commonjs",
+ "scripts": {
+ "test": "node node-test.js"
+ }
+}
diff --git a/intl/icu_capi/cpp/examples/fixeddecimal_wasm/test.cpp b/intl/icu_capi/cpp/examples/fixeddecimal_wasm/test.cpp
new file mode 100644
index 0000000000..e9bca35216
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/fixeddecimal_wasm/test.cpp
@@ -0,0 +1,70 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#ifdef __EMSCRIPTEN__
+#include <emscripten/bind.h>
+#endif
+
+#include "../../include/ICU4XFixedDecimalFormatter.hpp"
+#include "../../include/ICU4XLogger.hpp"
+
+#include <iostream>
+
+extern "C" void diplomat_init();
+extern "C" void log_js(char* s, u_int len) {
+ std::cout<<"LOG: " << std::string_view(s, len) <<std::endl;
+}
+extern "C" void warn_js(char* s, u_int len) {
+ std::cout<<"WARN: " << std::string_view(s, len) <<std::endl;
+}
+
+int runFixedDecimal() {
+#ifdef __EMSCRIPTEN__
+ diplomat_init();
+ ICU4XLogger::init_console_logger();
+#endif
+ ICU4XLocale locale = ICU4XLocale::create_from_string("bn").ok().value();
+ std::cout << "Running test for locale " << locale.to_string().ok().value() << std::endl;
+ ICU4XDataProvider dp = ICU4XDataProvider::create_compiled();
+ ICU4XFixedDecimalFormatter fdf = ICU4XFixedDecimalFormatter::create_with_grouping_strategy(
+ dp, locale, ICU4XFixedDecimalGroupingStrategy::Auto).ok().value();
+
+ ICU4XFixedDecimal decimal = ICU4XFixedDecimal::create_from_u64(1000007);
+ std::string out = fdf.format(decimal).ok().value();
+ std::cout << "Formatted value is " << out << std::endl;
+ if (out != "১০,০০,০০৭") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ std::string out2;
+ fdf.format_to_writeable(decimal, out2);
+ std::cout << "Formatted writeable value is " << out2 << std::endl;
+ if (out2 != "১০,০০,০০৭") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+
+ decimal.multiply_pow10(2);
+ decimal.set_sign(ICU4XFixedDecimalSign::Negative);
+ out = fdf.format(decimal).ok().value();
+ std::cout << "Value x100 and negated is " << out << std::endl;
+ if (out != "-১০,০০,০০,৭০০") {
+ std::cout << "Output does not match expected output" << std::endl;
+ return 1;
+ }
+ return 0;
+}
+
+#ifdef __EMSCRIPTEN__
+EMSCRIPTEN_BINDINGS(testFixedDecimal) {
+ emscripten::function("runFixedDecimal", &runFixedDecimal);
+}
+#endif
+
+#ifndef NOMAIN
+int main() {
+ return runFixedDecimal();
+}
+#endif
diff --git a/intl/icu_capi/cpp/examples/locale/.gitignore b/intl/icu_capi/cpp/examples/locale/.gitignore
new file mode 100644
index 0000000000..cb34c546b3
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/locale/.gitignore
@@ -0,0 +1,2 @@
+a.out
+a.out.dSYM
diff --git a/intl/icu_capi/cpp/examples/locale/Makefile b/intl/icu_capi/cpp/examples/locale/Makefile
new file mode 100644
index 0000000000..57a9c06943
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/locale/Makefile
@@ -0,0 +1,28 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := test
+.PHONY: build test
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*.hpp) $(wildcard ../../../c/include/*.h)
+
+CXX?=g++
+
+$(ALL_HEADERS):
+
+../../../../../target/debug/libicu_capi_staticlib.a: FORCE
+ cargo build -p icu_capi_staticlib
+
+a.out: ../../../../../target/debug/libicu_capi_staticlib.a $(ALL_HEADERS) test.cpp
+ $(CXX) -std=c++17 test.cpp ../../../../../target/debug/libicu_capi_staticlib.a -ldl -lpthread -lm -g
+
+build: a.out
+
+test: build
+ ./a.out
+
+clean:
+ git clean -xf *
+ rm -f ../../../../../target/debug/libicu_capi_staticlib.a
diff --git a/intl/icu_capi/cpp/examples/locale/test.cpp b/intl/icu_capi/cpp/examples/locale/test.cpp
new file mode 100644
index 0000000000..b2bba0ceff
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/locale/test.cpp
@@ -0,0 +1,107 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#include "../../include/ICU4XLocale.hpp"
+#include "../../include/ICU4XLogger.hpp"
+
+#include <iostream>
+
+static bool test_locale(ICU4XLocale &locale, std::string_view expectedString,
+ const char *message) {
+ std::string actualString = locale.to_string().ok().value();
+ std::cout << message << ": \"" << actualString << "\"" << std::endl;
+ if (actualString != expectedString) {
+ std::cout << "Locale did not match expected: \"" << expectedString << "\""
+ << std::endl;
+ return false;
+ }
+ return true;
+}
+
+static bool test_string(std::string_view actualString,
+ std::string_view expectedString, const char *message) {
+ std::cout << message << ": \"" << actualString << "\"" << std::endl;
+ if (actualString != expectedString) {
+ std::cout << "String did not match expected: \"" << expectedString << "\""
+ << std::endl;
+ return false;
+ }
+ return true;
+}
+
+int main() {
+ ICU4XLogger::init_simple_logger();
+ ICU4XLocale locale = ICU4XLocale::create_from_string("es-ES").ok().value();
+ if (!test_locale(locale, "es-ES", "Created a locale")) {
+ return 1;
+ }
+
+ locale.set_language("en").ok();
+ if (!test_locale(locale, "en-ES", "The language can be updated")) {
+ return 1;
+ }
+
+ locale.set_region("US").ok();
+ if (!test_locale(locale, "en-US", "The region can be updated")) {
+ return 1;
+ }
+
+ locale.set_script("Latn").ok();
+ if (!test_locale(locale, "en-Latn-US", "The script can be updated")) {
+ return 1;
+ }
+
+ if (!test_string(locale.language().ok().value(), "en",
+ "The language can be accessed")) {
+ return 1;
+ }
+ if (!test_string(locale.region().ok().value(), "US",
+ "The region can be accessed")) {
+ return 1;
+ }
+ if (!test_string(locale.script().ok().value(), "Latn",
+ "The script can be accessed")) {
+ return 1;
+ }
+
+ locale.set_language("").ok();
+ if (!test_locale(locale, "und-Latn-US", "Removed the language")) {
+ return 1;
+ }
+
+ locale.set_region("").ok();
+ if (locale.region().is_ok()) {
+ std::cout << "Expected region to be an err" << std::endl;
+ return 1;
+ }
+ if (!test_locale(locale, "und-Latn", "Removed the region")) {
+ return 1;
+ }
+
+ locale.set_script("").ok();
+ if (locale.script().is_ok()) {
+ std::cout << "Expected script to be an err" << std::endl;
+ return 1;
+ }
+ if (!test_locale(locale, "und", "Removed the script")) {
+ return 1;
+ }
+
+ locale = ICU4XLocale::create_from_string("en-US-u-hc-h12").ok().value();
+ if (!test_string(locale.get_unicode_extension("hc").ok().value(), "h12",
+ "The unicode extension can be accessed")) {
+ return 1;
+ }
+ if (!test_string(locale.basename().ok().value(), "en-US",
+ "The basename can be accessed")) {
+ return 1;
+ }
+
+ locale = ICU4XLocale::create_und();
+ if (!test_locale(locale, "und", "Created an undefined locale")) {
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/intl/icu_capi/cpp/examples/pluralrules/.gitignore b/intl/icu_capi/cpp/examples/pluralrules/.gitignore
new file mode 100644
index 0000000000..cba7efc8ef
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/pluralrules/.gitignore
@@ -0,0 +1 @@
+a.out
diff --git a/intl/icu_capi/cpp/examples/pluralrules/Makefile b/intl/icu_capi/cpp/examples/pluralrules/Makefile
new file mode 100644
index 0000000000..fd43d93d00
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/pluralrules/Makefile
@@ -0,0 +1,28 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := test
+.PHONY: build test
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*.hpp) $(wildcard ../../../c/include/*.h)
+
+CXX?=g++
+
+$(ALL_HEADERS):
+
+../../../../../target/debug/libicu_capi_staticlib.a: FORCE
+ cargo build -p icu_capi_staticlib -p icu_provider --features provider_fs,deserialize_json
+
+a.out: ../../../../../target/debug/libicu_capi_staticlib.a $(ALL_HEADERS) test.cpp
+ $(CXX) -std=c++17 test.cpp ../../../../../target/debug/libicu_capi_staticlib.a -ldl -lpthread -lm -g
+
+build: a.out
+
+test: build
+ ./a.out
+
+clean:
+ git clean -xf *
+ rm -f ../../../../../target/debug/libicu_capi_staticlib.a
diff --git a/intl/icu_capi/cpp/examples/pluralrules/test.cpp b/intl/icu_capi/cpp/examples/pluralrules/test.cpp
new file mode 100644
index 0000000000..254e96ecef
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/pluralrules/test.cpp
@@ -0,0 +1,38 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#include "../../include/ICU4XPluralRules.hpp"
+#include "../../include/ICU4XLogger.hpp"
+
+#include <iostream>
+
+const std::string_view path = "../../../../../provider/datagen/tests/data/json/";
+
+int main() {
+ ICU4XLogger::init_simple_logger();
+ ICU4XLocale locale = ICU4XLocale::create_from_string("ar").ok().value();
+ std::cout << "Running test for locale " << locale.to_string().ok().value() << std::endl;
+ ICU4XDataProvider dp = ICU4XDataProvider::create_fs(path).ok().value();
+ ICU4XPluralRules pr = ICU4XPluralRules::create_cardinal(dp, locale).ok().value();
+
+ ICU4XPluralOperands op = ICU4XPluralOperands::create_from_string("3").ok().value();
+ ICU4XPluralCategory cat = pr.category_for(op);
+
+ std::cout << "Category is " << static_cast<int32_t>(cat)
+ << " (should be " << static_cast<int32_t>(ICU4XPluralCategory::Few) << ")"
+ << std::endl;
+ if (cat != ICU4XPluralCategory::Few) {
+ return 1;
+ }
+
+ op = ICU4XPluralOperands::create_from_string("1011.0").ok().value();
+ cat = pr.category_for(op);
+ std::cout << "Category is " << static_cast<int32_t>(cat)
+ << " (should be " << static_cast<int32_t>(ICU4XPluralCategory::Many) << ")"
+ << std::endl;
+ if (cat != ICU4XPluralCategory::Many) {
+ return 1;
+ }
+ return 0;
+}
diff --git a/intl/icu_capi/cpp/examples/properties/.gitignore b/intl/icu_capi/cpp/examples/properties/.gitignore
new file mode 100644
index 0000000000..cb34c546b3
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/properties/.gitignore
@@ -0,0 +1,2 @@
+a.out
+a.out.dSYM
diff --git a/intl/icu_capi/cpp/examples/properties/Makefile b/intl/icu_capi/cpp/examples/properties/Makefile
new file mode 100644
index 0000000000..57a9c06943
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/properties/Makefile
@@ -0,0 +1,28 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := test
+.PHONY: build test
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*.hpp) $(wildcard ../../../c/include/*.h)
+
+CXX?=g++
+
+$(ALL_HEADERS):
+
+../../../../../target/debug/libicu_capi_staticlib.a: FORCE
+ cargo build -p icu_capi_staticlib
+
+a.out: ../../../../../target/debug/libicu_capi_staticlib.a $(ALL_HEADERS) test.cpp
+ $(CXX) -std=c++17 test.cpp ../../../../../target/debug/libicu_capi_staticlib.a -ldl -lpthread -lm -g
+
+build: a.out
+
+test: build
+ ./a.out
+
+clean:
+ git clean -xf *
+ rm -f ../../../../../target/debug/libicu_capi_staticlib.a
diff --git a/intl/icu_capi/cpp/examples/properties/test.cpp b/intl/icu_capi/cpp/examples/properties/test.cpp
new file mode 100644
index 0000000000..24583041df
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/properties/test.cpp
@@ -0,0 +1,251 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#include "../../include/ICU4XCodePointSetData.hpp"
+#include "../../include/ICU4XUnicodeSetData.hpp"
+#include "../../include/ICU4XCodePointMapData16.hpp"
+#include "../../include/ICU4XCodePointMapData8.hpp"
+#include "../../include/ICU4XPropertyValueNameToEnumMapper.hpp"
+#include "../../include/ICU4XGeneralCategoryNameToMaskMapper.hpp"
+#include "../../include/ICU4XLogger.hpp"
+
+#include <iostream>
+
+int test_set_property(ICU4XCodePointSetData data, char32_t included, char32_t excluded) {
+ bool contains1 = data.contains(included);
+ bool contains2 = data.contains(excluded);
+ std::cout << std::hex; // print hex for U+####
+ if (contains1 && !contains2) {
+ std::cout << "Set correctly contains U+" << included << " and not U+" << excluded << std::endl;
+ } else {
+ std::cout << "Set returns wrong result on U+" << included << " or U+" << excluded << std::endl;
+ return 1;
+ }
+ return 0;
+}
+
+int test_map_16_property(ICU4XCodePointMapData16 data, char32_t sample, uint32_t expected) {
+ uint32_t actual = data.get(sample);
+ std::cout << std::hex; // print hex for U+####
+ if (actual == expected) {
+ std::cout << "Code point U+" << sample << " correctly mapped to 0x" << actual << std::endl;
+ } else {
+ std::cout << "Code point U+" << sample << " incorrectly mapped to 0x" << actual << std::endl;
+ return 1;
+ }
+ return 0;
+}
+
+int test_map_8_property(ICU4XCodePointMapData8 data, char32_t sample, uint32_t expected) {
+ uint32_t actual = data.get(sample);
+ std::cout << std::hex; // print hex for U+####
+ if (actual == expected) {
+ std::cout << "Code point U+" << sample << " correctly mapped to 0x" << actual << std::endl;
+ } else {
+ std::cout << "Code point U+" << sample << " incorrectly mapped to 0x" << actual << std::endl;
+ return 1;
+ }
+ return 0;
+}
+
+int main() {
+ ICU4XLogger::init_simple_logger();
+ ICU4XDataProvider dp = ICU4XDataProvider::create_compiled();
+ int result;
+
+ result = test_set_property(
+ ICU4XCodePointSetData::load_ascii_hex_digit(dp).ok().value(),
+ u'3',
+ u'੩'
+ );
+ if (result != 0) {
+ return result;
+ }
+
+ result = test_map_16_property(
+ ICU4XCodePointMapData16::load_script(dp).ok().value(),
+ u'木',
+ 17 // Script::Han
+ );
+ if (result != 0) {
+ return result;
+ }
+
+ result = test_map_8_property(
+ ICU4XCodePointMapData8::load_general_category(dp).ok().value(),
+ u'木',
+ 5 // GeneralCategory::OtherLetter
+ );
+ if (result != 0) {
+ return result;
+ }
+
+ result = test_map_8_property(
+ ICU4XCodePointMapData8::load_bidi_class(dp).ok().value(),
+ u'ع',
+ 13 // GeneralCategory::ArabicLetter
+ );
+ if (result != 0) {
+ return result;
+ }
+
+ ICU4XUnicodeSetData basic_emoji = ICU4XUnicodeSetData::load_basic_emoji(dp).ok().value();
+ std::string letter = u8"hello";
+
+ if (!basic_emoji.contains_char(U'🔥')) {
+ std::cout << "Character 🔥 not found in Basic_Emoji set" << std::endl;
+ result = 1;
+ }
+
+ if (!basic_emoji.contains(u8"🗺️")) {
+ std::cout << "String \"🗺️\" (U+1F5FA U+FE0F) not found in Basic_Emoji set" << std::endl;
+ result = 1;
+ }
+ if (basic_emoji.contains_char(U'a')) {
+ std::cout << "Character a found in Basic_Emoji set" << std::endl;
+ result = 1;
+ }
+
+ if (basic_emoji.contains(u8"aa")) {
+ std::cout << "String \"aa\" found in Basic_Emoji set" << std::endl;
+ result = 1;
+ }
+
+ if (result != 0) {
+ return result;
+ } else {
+ std::cout << "Basic_Emoji set contains appropriate characters" << std::endl;
+ }
+ ICU4XLocale locale = ICU4XLocale::create_from_string("bn").ok().value();
+ ICU4XUnicodeSetData exemplars = ICU4XUnicodeSetData::load_exemplars_main(dp, locale).ok().value();
+ if (!exemplars.contains_char(U'ব')) {
+ std::cout << "Character 'ব' not found in Bangla exemplar chars set" << std::endl;
+ result = 1;
+ }
+
+ if (!exemplars.contains(u8"ক্ষ")) {
+ std::cout << "String \"ক্ষ\" (U+0995U+09CDU+09B7) not found in Bangla exemplar chars set" << std::endl;
+ result = 1;
+ }
+ if (exemplars.contains_char(U'a')) {
+ std::cout << "Character a found in Bangla exemplar chars set" << std::endl;
+ result = 1;
+ }
+
+ if (exemplars.contains(u8"aa")) {
+ std::cout << "String \"aa\" not found in Bangla exemplar chars set" << std::endl;
+ result = 1;
+ }
+ if (result != 0) {
+ return result;
+ } else {
+ std::cout << "Bangla exemplar chars set contains appropriate characters" << std::endl;
+ }
+
+
+ ICU4XPropertyValueNameToEnumMapper mapper = ICU4XPropertyValueNameToEnumMapper::load_script(dp).ok().value();
+ int32_t script = mapper.get_strict("Brah");
+ if (script != 65) {
+ std::cout << "Expected discriminant 64 for script name `Brah`, found " << script << std::endl;
+ result = 1;
+ }
+ script = mapper.get_strict("Brahmi");
+ if (script != 65) {
+ std::cout << "Expected discriminant 64 for script name `Brahmi`, found " << script << std::endl;
+ result = 1;
+ }
+ script = mapper.get_loose("brah");
+ if (script != 65) {
+ std::cout << "Expected discriminant 64 for (loose matched) script name `brah`, found " << script << std::endl;
+ result = 1;
+ }
+ script = mapper.get_strict("Linear_Z");
+ if (script != -1) {
+ std::cout << "Expected no value for fake script name `Linear_Z`, found " << script << std::endl;
+ result = 1;
+ }
+ if (result != 0) {
+ return result;
+ } else {
+ std::cout << "Script name mapper returns correct values" << std::endl;
+ }
+
+ ICU4XGeneralCategoryNameToMaskMapper mask_mapper = ICU4XGeneralCategoryNameToMaskMapper::load(dp).ok().value();
+ int32_t mask = mask_mapper.get_strict("Lu");
+ if (mask != 0x02) {
+ std::cout << "Expected discriminant 0x02 for mask name `Lu`, found " << mask << std::endl;
+ result = 1;
+ }
+ mask = mask_mapper.get_strict("L");
+ if (mask != 0x3e) {
+ std::cout << "Expected discriminant 0x3e for mask name `Lu`, found " << mask << std::endl;
+ result = 1;
+ }
+ mask = mask_mapper.get_strict("Letter");
+ if (mask != 0x3e) {
+ std::cout << "Expected discriminant 0x3e for mask name `Letter`, found " << mask << std::endl;
+ result = 1;
+ }
+ mask = mask_mapper.get_loose("l");
+ if (mask != 0x3e) {
+ std::cout << "Expected discriminant 0x3e for mask name `l`, found " << mask << std::endl;
+ result = 1;
+ }
+ mask = mask_mapper.get_strict("letter");
+ if (mask != 0) {
+ std::cout << "Expected no mask for (strict matched) name `letter`, found " << mask << std::endl;
+ result = 1;
+ }
+ mask = mask_mapper.get_strict("EverythingLol");
+ if (mask != 0) {
+ std::cout << "Expected no mask for nonexistant name `EverythingLol`, found " << mask << std::endl;
+ result = 1;
+ }
+
+
+ if (result != 0) {
+ return result;
+ } else {
+ std::cout << "Mask name mapper returns correct values" << std::endl;
+ }
+
+
+ mask = mask_mapper.get_strict("Lu");
+ ICU4XCodePointMapData8 gc = ICU4XCodePointMapData8::load_general_category(dp).ok().value();
+ auto ranges = gc.iter_ranges_for_mask(mask);
+ auto next = ranges.next();
+ if (next.done) {
+ std::cout << "Got empty iterator!";
+ result = 1;
+ }
+ if (next.start != U'A' || next.end != U'Z') {
+ std::cout << "Expected range [" << U'A' << ", " << U'Z' << "], got range [" << next.start << ", " << next.end << "]" << std::endl;
+ result = 1;
+ }
+
+ // Test iteration to completion for a small set
+ mask = mask_mapper.get_strict("Control");
+ ranges = gc.iter_ranges_for_mask(mask);
+ next = ranges.next();
+
+ if (next.start != 0 || next.end != 0x1f) {
+ std::cout << "Expected range [0, 0x1f], got range [" << next.start << ", " << next.end << "]" << std::endl;
+ result = 1;
+ }
+
+ std::cout << "Found ranges for gc=Control:";
+ while (!next.done) {
+ std::cout << " [" << next.start << ", " << next.end << "]";
+
+ next = ranges.next();
+ }
+ std::cout << std::endl;
+
+ if (result != 0) {
+ return result;
+ } else {
+ std::cout << "Ranges iterator works" << std::endl;
+ }
+ return 0;
+}
diff --git a/intl/icu_capi/cpp/examples/segmenter/.gitignore b/intl/icu_capi/cpp/examples/segmenter/.gitignore
new file mode 100644
index 0000000000..cb34c546b3
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/segmenter/.gitignore
@@ -0,0 +1,2 @@
+a.out
+a.out.dSYM
diff --git a/intl/icu_capi/cpp/examples/segmenter/Makefile b/intl/icu_capi/cpp/examples/segmenter/Makefile
new file mode 100644
index 0000000000..57a9c06943
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/segmenter/Makefile
@@ -0,0 +1,28 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := test
+.PHONY: build test
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*.hpp) $(wildcard ../../../c/include/*.h)
+
+CXX?=g++
+
+$(ALL_HEADERS):
+
+../../../../../target/debug/libicu_capi_staticlib.a: FORCE
+ cargo build -p icu_capi_staticlib
+
+a.out: ../../../../../target/debug/libicu_capi_staticlib.a $(ALL_HEADERS) test.cpp
+ $(CXX) -std=c++17 test.cpp ../../../../../target/debug/libicu_capi_staticlib.a -ldl -lpthread -lm -g
+
+build: a.out
+
+test: build
+ ./a.out
+
+clean:
+ git clean -xf *
+ rm -f ../../../../../target/debug/libicu_capi_staticlib.a
diff --git a/intl/icu_capi/cpp/examples/segmenter/test.cpp b/intl/icu_capi/cpp/examples/segmenter/test.cpp
new file mode 100644
index 0000000000..cfe0899f76
--- /dev/null
+++ b/intl/icu_capi/cpp/examples/segmenter/test.cpp
@@ -0,0 +1,160 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#include "../../include/ICU4XDataProvider.hpp"
+#include "../../include/ICU4XGraphemeClusterSegmenter.hpp"
+#include "../../include/ICU4XLineSegmenter.hpp"
+#include "../../include/ICU4XSentenceSegmenter.hpp"
+#include "../../include/ICU4XWordSegmenter.hpp"
+#include "../../include/ICU4XLogger.hpp"
+
+#include <iostream>
+#include <string_view>
+
+using std::cout;
+using std::endl;
+
+void print_ruler(size_t str_len) {
+ for (size_t i = 0; i < str_len; i++) {
+ if (i % 10 == 0) {
+ cout << "0";
+ } else if (i % 5 == 0) {
+ cout << "5";
+ } else {
+ cout << ".";
+ }
+ }
+ cout << endl;
+}
+
+template <typename Iterator>
+void iterate_breakpoints(Iterator& iterator) {
+ while (true) {
+ int32_t breakpoint = iterator.next();
+ if (breakpoint == -1) {
+ break;
+ }
+ cout << " " << breakpoint;
+ }
+ cout << endl;
+}
+
+template <typename Iterator>
+void iterate_word_breakpoints(Iterator& iterator) {
+ while (true) {
+ int32_t breakpoint = iterator.next();
+ if (breakpoint == -1) {
+ break;
+ }
+ cout << " " << breakpoint;
+ switch (iterator.word_type()) {
+ case ICU4XSegmenterWordType::None:
+ cout << " (none";
+ break;
+ case ICU4XSegmenterWordType::Number:
+ cout << " (number";
+ break;
+ case ICU4XSegmenterWordType::Letter:
+ cout << " (letter";
+ break;
+ default:
+ cout << " (unknown status";
+ break;
+ }
+ if (iterator.is_word_like()) {
+ cout << ", word-like";
+ }
+ cout << ")";
+ }
+ cout << endl;
+}
+
+void test_line(const std::string_view& str) {
+ const auto provider = ICU4XDataProvider::create_compiled();
+ const auto segmenter_auto =
+ ICU4XLineSegmenter::create_auto(provider).ok().value();
+ const auto segmenter_lstm =
+ ICU4XLineSegmenter::create_lstm(provider).ok().value();
+ const auto segmenter_dictionary =
+ ICU4XLineSegmenter::create_dictionary(provider).ok().value();
+
+ const ICU4XLineSegmenter* segmenters[] = {&segmenter_auto, &segmenter_lstm,
+ &segmenter_dictionary};
+ for (const auto* segmenter : segmenters) {
+ cout << "Finding line breakpoints in string:" << endl << str << endl;
+ print_ruler(str.size());
+
+ cout << "Line breakpoints:";
+ auto iterator = segmenter->segment_utf8(str);
+ iterate_breakpoints(iterator);
+ }
+}
+
+void test_grapheme(const std::string_view& str) {
+ const auto provider = ICU4XDataProvider::create_compiled();
+ const auto segmenter = ICU4XGraphemeClusterSegmenter::create(provider).ok().value();
+ cout << "Finding grapheme cluster breakpoints in string:" << endl
+ << str << endl;
+ print_ruler(str.size());
+
+ cout << "Grapheme cluster breakpoints:";
+ auto iterator = segmenter.segment_utf8(str);
+ iterate_breakpoints(iterator);
+}
+
+void test_word(const std::string_view& str) {
+ const auto provider = ICU4XDataProvider::create_compiled();
+ const auto segmenter_auto =
+ ICU4XWordSegmenter::create_auto(provider).ok().value();
+ const auto segmenter_lstm =
+ ICU4XWordSegmenter::create_lstm(provider).ok().value();
+ const auto segmenter_dictionary =
+ ICU4XWordSegmenter::create_dictionary(provider).ok().value();
+
+ const ICU4XWordSegmenter* segmenters[] = {&segmenter_auto, &segmenter_lstm,
+ &segmenter_dictionary};
+ for (const auto* segmenter : segmenters) {
+ cout << "Finding word breakpoints in string:" << endl << str << endl;
+ print_ruler(str.size());
+
+ cout << "Word breakpoints:";
+ auto iterator = segmenter->segment_utf8(str);
+ iterate_word_breakpoints(iterator);
+ }
+}
+
+void test_sentence(const std::string_view& str) {
+ const auto provider = ICU4XDataProvider::create_compiled();
+ const auto segmenter = ICU4XSentenceSegmenter::create(provider).ok().value();
+ cout << "Finding sentence breakpoints in string:" << endl
+ << str << endl;
+ print_ruler(str.size());
+
+ cout << "Sentence breakpoints:";
+ auto iterator = segmenter.segment_utf8(str);
+ iterate_breakpoints(iterator);
+}
+
+int main(int argc, char* argv[]) {
+ ICU4XLogger::init_simple_logger();
+ std::string_view str;
+ if (argc >= 2) {
+ str = argv[1];
+ } else {
+ str = "The 101 quick brown foxes jump over the lazy dog.";
+ }
+
+ test_line(str);
+ cout << endl;
+
+ test_grapheme(str);
+ cout << endl;
+
+ test_word(str);
+ cout << endl;
+
+ test_sentence(str);
+ cout << endl;
+ return 0;
+}
diff --git a/intl/icu_capi/cpp/include/CodePointRangeIterator.h b/intl/icu_capi/cpp/include/CodePointRangeIterator.h
new file mode 100644
index 0000000000..36d6d23175
--- /dev/null
+++ b/intl/icu_capi/cpp/include/CodePointRangeIterator.h
@@ -0,0 +1,30 @@
+#ifndef CodePointRangeIterator_H
+#define CodePointRangeIterator_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct CodePointRangeIterator CodePointRangeIterator;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "CodePointRangeIteratorResult.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+CodePointRangeIteratorResult CodePointRangeIterator_next(CodePointRangeIterator* self);
+void CodePointRangeIterator_destroy(CodePointRangeIterator* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/CodePointRangeIterator.hpp b/intl/icu_capi/cpp/include/CodePointRangeIterator.hpp
new file mode 100644
index 0000000000..3c2d5caef0
--- /dev/null
+++ b/intl/icu_capi/cpp/include/CodePointRangeIterator.hpp
@@ -0,0 +1,54 @@
+#ifndef CodePointRangeIterator_HPP
+#define CodePointRangeIterator_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "CodePointRangeIterator.h"
+
+struct CodePointRangeIteratorResult;
+
+/**
+ * A destruction policy for using CodePointRangeIterator with std::unique_ptr.
+ */
+struct CodePointRangeIteratorDeleter {
+ void operator()(capi::CodePointRangeIterator* l) const noexcept {
+ capi::CodePointRangeIterator_destroy(l);
+ }
+};
+
+/**
+ * An iterator over code point ranges, produced by `ICU4XCodePointSetData` or
+ * one of the `ICU4XCodePointMapData` types
+ */
+class CodePointRangeIterator {
+ public:
+
+ /**
+ * Advance the iterator by one and return the next range.
+ *
+ * If the iterator is out of items, `done` will be true
+ */
+ CodePointRangeIteratorResult next();
+ inline const capi::CodePointRangeIterator* AsFFI() const { return this->inner.get(); }
+ inline capi::CodePointRangeIterator* AsFFIMut() { return this->inner.get(); }
+ inline CodePointRangeIterator(capi::CodePointRangeIterator* i) : inner(i) {}
+ CodePointRangeIterator() = default;
+ CodePointRangeIterator(CodePointRangeIterator&&) noexcept = default;
+ CodePointRangeIterator& operator=(CodePointRangeIterator&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::CodePointRangeIterator, CodePointRangeIteratorDeleter> inner;
+};
+
+#include "CodePointRangeIteratorResult.hpp"
+
+inline CodePointRangeIteratorResult CodePointRangeIterator::next() {
+ capi::CodePointRangeIteratorResult diplomat_raw_struct_out_value = capi::CodePointRangeIterator_next(this->inner.get());
+ return CodePointRangeIteratorResult{ .start = std::move(diplomat_raw_struct_out_value.start), .end = std::move(diplomat_raw_struct_out_value.end), .done = std::move(diplomat_raw_struct_out_value.done) };
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/CodePointRangeIteratorResult.h b/intl/icu_capi/cpp/include/CodePointRangeIteratorResult.h
new file mode 100644
index 0000000000..846873be11
--- /dev/null
+++ b/intl/icu_capi/cpp/include/CodePointRangeIteratorResult.h
@@ -0,0 +1,32 @@
+#ifndef CodePointRangeIteratorResult_H
+#define CodePointRangeIteratorResult_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct CodePointRangeIteratorResult {
+ uint32_t start;
+ uint32_t end;
+ bool done;
+} CodePointRangeIteratorResult;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void CodePointRangeIteratorResult_destroy(CodePointRangeIteratorResult* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/CodePointRangeIteratorResult.hpp b/intl/icu_capi/cpp/include/CodePointRangeIteratorResult.hpp
new file mode 100644
index 0000000000..086ddfce08
--- /dev/null
+++ b/intl/icu_capi/cpp/include/CodePointRangeIteratorResult.hpp
@@ -0,0 +1,33 @@
+#ifndef CodePointRangeIteratorResult_HPP
+#define CodePointRangeIteratorResult_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "CodePointRangeIteratorResult.h"
+
+
+
+/**
+ * Result of a single iteration of [`CodePointRangeIterator`].
+ * Logically can be considered to be an `Option<RangeInclusive<u32>>`,
+ *
+ * `start` and `end` represent an inclusive range of code points [start, end],
+ * and `done` will be true if the iterator has already finished. The last contentful
+ * iteration will NOT produce a range done=true, in other words `start` and `end` are useful
+ * values if and only if `done=false`.
+ */
+struct CodePointRangeIteratorResult {
+ public:
+ uint32_t start;
+ uint32_t end;
+ bool done;
+};
+
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XAnyCalendarKind.h b/intl/icu_capi/cpp/include/ICU4XAnyCalendarKind.h
new file mode 100644
index 0000000000..329f381577
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XAnyCalendarKind.h
@@ -0,0 +1,55 @@
+#ifndef ICU4XAnyCalendarKind_H
+#define ICU4XAnyCalendarKind_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XAnyCalendarKind {
+ ICU4XAnyCalendarKind_Iso = 0,
+ ICU4XAnyCalendarKind_Gregorian = 1,
+ ICU4XAnyCalendarKind_Buddhist = 2,
+ ICU4XAnyCalendarKind_Japanese = 3,
+ ICU4XAnyCalendarKind_JapaneseExtended = 4,
+ ICU4XAnyCalendarKind_Ethiopian = 5,
+ ICU4XAnyCalendarKind_EthiopianAmeteAlem = 6,
+ ICU4XAnyCalendarKind_Indian = 7,
+ ICU4XAnyCalendarKind_Coptic = 8,
+ ICU4XAnyCalendarKind_Dangi = 9,
+ ICU4XAnyCalendarKind_Chinese = 10,
+ ICU4XAnyCalendarKind_Hebrew = 11,
+ ICU4XAnyCalendarKind_IslamicCivil = 12,
+ ICU4XAnyCalendarKind_IslamicObservational = 13,
+ ICU4XAnyCalendarKind_IslamicTabular = 14,
+ ICU4XAnyCalendarKind_IslamicUmmAlQura = 15,
+ ICU4XAnyCalendarKind_Persian = 16,
+ ICU4XAnyCalendarKind_Roc = 17,
+} ICU4XAnyCalendarKind;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XLocale.h"
+#include "diplomat_result_ICU4XAnyCalendarKind_void.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_ICU4XAnyCalendarKind_void ICU4XAnyCalendarKind_get_for_locale(const ICU4XLocale* locale);
+
+diplomat_result_ICU4XAnyCalendarKind_void ICU4XAnyCalendarKind_get_for_bcp47(const char* s_data, size_t s_len);
+
+diplomat_result_void_ICU4XError ICU4XAnyCalendarKind_bcp47(ICU4XAnyCalendarKind self, DiplomatWriteable* write);
+void ICU4XAnyCalendarKind_destroy(ICU4XAnyCalendarKind* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XAnyCalendarKind.hpp b/intl/icu_capi/cpp/include/ICU4XAnyCalendarKind.hpp
new file mode 100644
index 0000000000..93210f455e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XAnyCalendarKind.hpp
@@ -0,0 +1,117 @@
+#ifndef ICU4XAnyCalendarKind_HPP
+#define ICU4XAnyCalendarKind_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XAnyCalendarKind.h"
+
+
+
+/**
+ * The various calendar types currently supported by [`ICU4XCalendar`]
+ *
+ * See the [Rust documentation for `AnyCalendarKind`](https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html) for more information.
+ */
+enum struct ICU4XAnyCalendarKind {
+
+ /**
+ * The kind of an Iso calendar
+ */
+ Iso = 0,
+
+ /**
+ * The kind of a Gregorian calendar
+ */
+ Gregorian = 1,
+
+ /**
+ * The kind of a Buddhist calendar
+ */
+ Buddhist = 2,
+
+ /**
+ * The kind of a Japanese calendar with modern eras
+ */
+ Japanese = 3,
+
+ /**
+ * The kind of a Japanese calendar with modern and historic eras
+ */
+ JapaneseExtended = 4,
+
+ /**
+ * The kind of an Ethiopian calendar, with Amete Mihret era
+ */
+ Ethiopian = 5,
+
+ /**
+ * The kind of an Ethiopian calendar, with Amete Alem era
+ */
+ EthiopianAmeteAlem = 6,
+
+ /**
+ * The kind of a Indian calendar
+ */
+ Indian = 7,
+
+ /**
+ * The kind of a Coptic calendar
+ */
+ Coptic = 8,
+
+ /**
+ * The kind of a Dangi calendar
+ */
+ Dangi = 9,
+
+ /**
+ * The kind of a Chinese calendar
+ */
+ Chinese = 10,
+
+ /**
+ * The kind of a Hebrew calendar
+ */
+ Hebrew = 11,
+
+ /**
+ * The kind of a Islamic civil calendar
+ */
+ IslamicCivil = 12,
+
+ /**
+ * The kind of a Islamic observational calendar
+ */
+ IslamicObservational = 13,
+
+ /**
+ * The kind of a Islamic tabular calendar
+ */
+ IslamicTabular = 14,
+
+ /**
+ * The kind of a Islamic Umm al-Qura calendar
+ */
+ IslamicUmmAlQura = 15,
+
+ /**
+ * The kind of a Persian calendar
+ */
+ Persian = 16,
+
+ /**
+ * The kind of a Roc calendar
+ */
+ Roc = 17,
+};
+class ICU4XLocale;
+#include "ICU4XError.hpp"
+
+#include "ICU4XLocale.hpp"
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XBcp47ToIanaMapper.h b/intl/icu_capi/cpp/include/ICU4XBcp47ToIanaMapper.h
new file mode 100644
index 0000000000..483afe1ec2
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XBcp47ToIanaMapper.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XBcp47ToIanaMapper_H
+#define ICU4XBcp47ToIanaMapper_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XBcp47ToIanaMapper ICU4XBcp47ToIanaMapper;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError ICU4XBcp47ToIanaMapper_create(const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XBcp47ToIanaMapper_get(const ICU4XBcp47ToIanaMapper* self, const char* value_data, size_t value_len, DiplomatWriteable* write);
+void ICU4XBcp47ToIanaMapper_destroy(ICU4XBcp47ToIanaMapper* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XBcp47ToIanaMapper.hpp b/intl/icu_capi/cpp/include/ICU4XBcp47ToIanaMapper.hpp
new file mode 100644
index 0000000000..b8c303e79a
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XBcp47ToIanaMapper.hpp
@@ -0,0 +1,98 @@
+#ifndef ICU4XBcp47ToIanaMapper_HPP
+#define ICU4XBcp47ToIanaMapper_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XBcp47ToIanaMapper.h"
+
+class ICU4XDataProvider;
+class ICU4XBcp47ToIanaMapper;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XBcp47ToIanaMapper with std::unique_ptr.
+ */
+struct ICU4XBcp47ToIanaMapperDeleter {
+ void operator()(capi::ICU4XBcp47ToIanaMapper* l) const noexcept {
+ capi::ICU4XBcp47ToIanaMapper_destroy(l);
+ }
+};
+
+/**
+ * An object capable of mapping from a BCP-47 time zone ID to an IANA ID.
+ *
+ * See the [Rust documentation for `IanaBcp47RoundTripMapper`](https://docs.rs/icu/latest/icu/timezone/struct.IanaBcp47RoundTripMapper.html) for more information.
+ */
+class ICU4XBcp47ToIanaMapper {
+ public:
+
+ /**
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/timezone/struct.IanaBcp47RoundTripMapper.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XBcp47ToIanaMapper, ICU4XError> create(const ICU4XDataProvider& provider);
+
+ /**
+ * Writes out the canonical IANA time zone ID corresponding to the given BCP-47 ID.
+ *
+ * See the [Rust documentation for `bcp47_to_iana`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.IanaBcp47RoundTripMapper.html#method.bcp47_to_iana) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> get_to_writeable(const std::string_view value, W& write) const;
+
+ /**
+ * Writes out the canonical IANA time zone ID corresponding to the given BCP-47 ID.
+ *
+ * See the [Rust documentation for `bcp47_to_iana`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.IanaBcp47RoundTripMapper.html#method.bcp47_to_iana) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> get(const std::string_view value) const;
+ inline const capi::ICU4XBcp47ToIanaMapper* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XBcp47ToIanaMapper* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XBcp47ToIanaMapper(capi::ICU4XBcp47ToIanaMapper* i) : inner(i) {}
+ ICU4XBcp47ToIanaMapper() = default;
+ ICU4XBcp47ToIanaMapper(ICU4XBcp47ToIanaMapper&&) noexcept = default;
+ ICU4XBcp47ToIanaMapper& operator=(ICU4XBcp47ToIanaMapper&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XBcp47ToIanaMapper, ICU4XBcp47ToIanaMapperDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+
+inline diplomat::result<ICU4XBcp47ToIanaMapper, ICU4XError> ICU4XBcp47ToIanaMapper::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XBcp47ToIanaMapper_create(provider.AsFFI());
+ diplomat::result<ICU4XBcp47ToIanaMapper, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XBcp47ToIanaMapper>(ICU4XBcp47ToIanaMapper(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XBcp47ToIanaMapper::get_to_writeable(const std::string_view value, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XBcp47ToIanaMapper_get(this->inner.get(), value.data(), value.size(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XBcp47ToIanaMapper::get(const std::string_view value) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XBcp47ToIanaMapper_get(this->inner.get(), value.data(), value.size(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XBidi.h b/intl/icu_capi/cpp/include/ICU4XBidi.h
new file mode 100644
index 0000000000..1ed7cfc8c2
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XBidi.h
@@ -0,0 +1,45 @@
+#ifndef ICU4XBidi_H
+#define ICU4XBidi_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XBidi ICU4XBidi;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XBidi_ICU4XError.h"
+#include "ICU4XBidiInfo.h"
+#include "ICU4XReorderedIndexMap.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XBidi_ICU4XError ICU4XBidi_create(const ICU4XDataProvider* provider);
+
+ICU4XBidiInfo* ICU4XBidi_for_text(const ICU4XBidi* self, const char* text_data, size_t text_len, uint8_t default_level);
+
+ICU4XReorderedIndexMap* ICU4XBidi_reorder_visual(const ICU4XBidi* self, const uint8_t* levels_data, size_t levels_len);
+
+bool ICU4XBidi_level_is_rtl(uint8_t level);
+
+bool ICU4XBidi_level_is_ltr(uint8_t level);
+
+uint8_t ICU4XBidi_level_rtl();
+
+uint8_t ICU4XBidi_level_ltr();
+void ICU4XBidi_destroy(ICU4XBidi* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XBidi.hpp b/intl/icu_capi/cpp/include/ICU4XBidi.hpp
new file mode 100644
index 0000000000..00ab389d7b
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XBidi.hpp
@@ -0,0 +1,142 @@
+#ifndef ICU4XBidi_HPP
+#define ICU4XBidi_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XBidi.h"
+
+class ICU4XDataProvider;
+class ICU4XBidi;
+#include "ICU4XError.hpp"
+class ICU4XBidiInfo;
+class ICU4XReorderedIndexMap;
+
+/**
+ * A destruction policy for using ICU4XBidi with std::unique_ptr.
+ */
+struct ICU4XBidiDeleter {
+ void operator()(capi::ICU4XBidi* l) const noexcept {
+ capi::ICU4XBidi_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X Bidi object, containing loaded bidi data
+ *
+ * See the [Rust documentation for `BidiClassAdapter`](https://docs.rs/icu/latest/icu/properties/bidi/struct.BidiClassAdapter.html) for more information.
+ */
+class ICU4XBidi {
+ public:
+
+ /**
+ * Creates a new [`ICU4XBidi`] from locale data.
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/properties/bidi/struct.BidiClassAdapter.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XBidi, ICU4XError> create(const ICU4XDataProvider& provider);
+
+ /**
+ * Use the data loaded in this object to process a string and calculate bidi information
+ *
+ * Takes in a Level for the default level, if it is an invalid value it will default to LTR
+ *
+ * See the [Rust documentation for `new_with_data_source`](https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html#method.new_with_data_source) for more information.
+ *
+ * Lifetimes: `text` must live at least as long as the output.
+ */
+ ICU4XBidiInfo for_text(const std::string_view text, uint8_t default_level) const;
+
+ /**
+ * Utility function for producing reorderings given a list of levels
+ *
+ * Produces a map saying which visual index maps to which source index.
+ *
+ * The levels array must not have values greater than 126 (this is the
+ * Bidi maximum explicit depth plus one).
+ * Failure to follow this invariant may lead to incorrect results,
+ * but is still safe.
+ *
+ * See the [Rust documentation for `reorder_visual`](https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html#method.reorder_visual) for more information.
+ */
+ ICU4XReorderedIndexMap reorder_visual(const diplomat::span<const uint8_t> levels) const;
+
+ /**
+ * Check if a Level returned by level_at is an RTL level.
+ *
+ * Invalid levels (numbers greater than 125) will be assumed LTR
+ *
+ * See the [Rust documentation for `is_rtl`](https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.is_rtl) for more information.
+ */
+ static bool level_is_rtl(uint8_t level);
+
+ /**
+ * Check if a Level returned by level_at is an LTR level.
+ *
+ * Invalid levels (numbers greater than 125) will be assumed LTR
+ *
+ * See the [Rust documentation for `is_ltr`](https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.is_ltr) for more information.
+ */
+ static bool level_is_ltr(uint8_t level);
+
+ /**
+ * Get a basic RTL Level value
+ *
+ * See the [Rust documentation for `rtl`](https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.rtl) for more information.
+ */
+ static uint8_t level_rtl();
+
+ /**
+ * Get a simple LTR Level value
+ *
+ * See the [Rust documentation for `ltr`](https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.ltr) for more information.
+ */
+ static uint8_t level_ltr();
+ inline const capi::ICU4XBidi* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XBidi* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XBidi(capi::ICU4XBidi* i) : inner(i) {}
+ ICU4XBidi() = default;
+ ICU4XBidi(ICU4XBidi&&) noexcept = default;
+ ICU4XBidi& operator=(ICU4XBidi&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XBidi, ICU4XBidiDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XBidiInfo.hpp"
+#include "ICU4XReorderedIndexMap.hpp"
+
+inline diplomat::result<ICU4XBidi, ICU4XError> ICU4XBidi::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XBidi_create(provider.AsFFI());
+ diplomat::result<ICU4XBidi, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XBidi>(ICU4XBidi(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XBidiInfo ICU4XBidi::for_text(const std::string_view text, uint8_t default_level) const {
+ return ICU4XBidiInfo(capi::ICU4XBidi_for_text(this->inner.get(), text.data(), text.size(), default_level));
+}
+inline ICU4XReorderedIndexMap ICU4XBidi::reorder_visual(const diplomat::span<const uint8_t> levels) const {
+ return ICU4XReorderedIndexMap(capi::ICU4XBidi_reorder_visual(this->inner.get(), levels.data(), levels.size()));
+}
+inline bool ICU4XBidi::level_is_rtl(uint8_t level) {
+ return capi::ICU4XBidi_level_is_rtl(level);
+}
+inline bool ICU4XBidi::level_is_ltr(uint8_t level) {
+ return capi::ICU4XBidi_level_is_ltr(level);
+}
+inline uint8_t ICU4XBidi::level_rtl() {
+ return capi::ICU4XBidi_level_rtl();
+}
+inline uint8_t ICU4XBidi::level_ltr() {
+ return capi::ICU4XBidi_level_ltr();
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XBidiDirection.h b/intl/icu_capi/cpp/include/ICU4XBidiDirection.h
new file mode 100644
index 0000000000..33de81d6e9
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XBidiDirection.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XBidiDirection_H
+#define ICU4XBidiDirection_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XBidiDirection {
+ ICU4XBidiDirection_Ltr = 0,
+ ICU4XBidiDirection_Rtl = 1,
+ ICU4XBidiDirection_Mixed = 2,
+} ICU4XBidiDirection;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XBidiDirection_destroy(ICU4XBidiDirection* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XBidiDirection.hpp b/intl/icu_capi/cpp/include/ICU4XBidiDirection.hpp
new file mode 100644
index 0000000000..ad21e51910
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XBidiDirection.hpp
@@ -0,0 +1,21 @@
+#ifndef ICU4XBidiDirection_HPP
+#define ICU4XBidiDirection_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XBidiDirection.h"
+
+
+enum struct ICU4XBidiDirection {
+ Ltr = 0,
+ Rtl = 1,
+ Mixed = 2,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XBidiInfo.h b/intl/icu_capi/cpp/include/ICU4XBidiInfo.h
new file mode 100644
index 0000000000..02e8c21659
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XBidiInfo.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XBidiInfo_H
+#define ICU4XBidiInfo_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XBidiInfo ICU4XBidiInfo;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XBidiParagraph.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+size_t ICU4XBidiInfo_paragraph_count(const ICU4XBidiInfo* self);
+
+ICU4XBidiParagraph* ICU4XBidiInfo_paragraph_at(const ICU4XBidiInfo* self, size_t n);
+
+size_t ICU4XBidiInfo_size(const ICU4XBidiInfo* self);
+
+uint8_t ICU4XBidiInfo_level_at(const ICU4XBidiInfo* self, size_t pos);
+void ICU4XBidiInfo_destroy(ICU4XBidiInfo* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XBidiInfo.hpp b/intl/icu_capi/cpp/include/ICU4XBidiInfo.hpp
new file mode 100644
index 0000000000..c19ad630fb
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XBidiInfo.hpp
@@ -0,0 +1,89 @@
+#ifndef ICU4XBidiInfo_HPP
+#define ICU4XBidiInfo_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XBidiInfo.h"
+
+class ICU4XBidiParagraph;
+
+/**
+ * A destruction policy for using ICU4XBidiInfo with std::unique_ptr.
+ */
+struct ICU4XBidiInfoDeleter {
+ void operator()(capi::ICU4XBidiInfo* l) const noexcept {
+ capi::ICU4XBidiInfo_destroy(l);
+ }
+};
+
+/**
+ * An object containing bidi information for a given string, produced by `for_text()` on `ICU4XBidi`
+ *
+ * See the [Rust documentation for `BidiInfo`](https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html) for more information.
+ */
+class ICU4XBidiInfo {
+ public:
+
+ /**
+ * The number of paragraphs contained here
+ */
+ size_t paragraph_count() const;
+
+ /**
+ * Get the nth paragraph, returning `None` if out of bounds
+ *
+ * Lifetimes: `this` must live at least as long as the output.
+ */
+ std::optional<ICU4XBidiParagraph> paragraph_at(size_t n) const;
+
+ /**
+ * The number of bytes in this full text
+ */
+ size_t size() const;
+
+ /**
+ * Get the BIDI level at a particular byte index in the full text.
+ * This integer is conceptually a `unicode_bidi::Level`,
+ * and can be further inspected using the static methods on ICU4XBidi.
+ *
+ * Returns 0 (equivalent to `Level::ltr()`) on error
+ */
+ uint8_t level_at(size_t pos) const;
+ inline const capi::ICU4XBidiInfo* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XBidiInfo* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XBidiInfo(capi::ICU4XBidiInfo* i) : inner(i) {}
+ ICU4XBidiInfo() = default;
+ ICU4XBidiInfo(ICU4XBidiInfo&&) noexcept = default;
+ ICU4XBidiInfo& operator=(ICU4XBidiInfo&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XBidiInfo, ICU4XBidiInfoDeleter> inner;
+};
+
+#include "ICU4XBidiParagraph.hpp"
+
+inline size_t ICU4XBidiInfo::paragraph_count() const {
+ return capi::ICU4XBidiInfo_paragraph_count(this->inner.get());
+}
+inline std::optional<ICU4XBidiParagraph> ICU4XBidiInfo::paragraph_at(size_t n) const {
+ auto diplomat_optional_raw_out_value = capi::ICU4XBidiInfo_paragraph_at(this->inner.get(), n);
+ std::optional<ICU4XBidiParagraph> diplomat_optional_out_value;
+ if (diplomat_optional_raw_out_value != nullptr) {
+ diplomat_optional_out_value = ICU4XBidiParagraph(diplomat_optional_raw_out_value);
+ } else {
+ diplomat_optional_out_value = std::nullopt;
+ }
+ return diplomat_optional_out_value;
+}
+inline size_t ICU4XBidiInfo::size() const {
+ return capi::ICU4XBidiInfo_size(this->inner.get());
+}
+inline uint8_t ICU4XBidiInfo::level_at(size_t pos) const {
+ return capi::ICU4XBidiInfo_level_at(this->inner.get(), pos);
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XBidiParagraph.h b/intl/icu_capi/cpp/include/ICU4XBidiParagraph.h
new file mode 100644
index 0000000000..269f940cc7
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XBidiParagraph.h
@@ -0,0 +1,43 @@
+#ifndef ICU4XBidiParagraph_H
+#define ICU4XBidiParagraph_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XBidiParagraph ICU4XBidiParagraph;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XBidiDirection.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_void_ICU4XError ICU4XBidiParagraph_set_paragraph_in_text(ICU4XBidiParagraph* self, size_t n);
+
+ICU4XBidiDirection ICU4XBidiParagraph_direction(const ICU4XBidiParagraph* self);
+
+size_t ICU4XBidiParagraph_size(const ICU4XBidiParagraph* self);
+
+size_t ICU4XBidiParagraph_range_start(const ICU4XBidiParagraph* self);
+
+size_t ICU4XBidiParagraph_range_end(const ICU4XBidiParagraph* self);
+
+diplomat_result_void_ICU4XError ICU4XBidiParagraph_reorder_line(const ICU4XBidiParagraph* self, size_t range_start, size_t range_end, DiplomatWriteable* out);
+
+uint8_t ICU4XBidiParagraph_level_at(const ICU4XBidiParagraph* self, size_t pos);
+void ICU4XBidiParagraph_destroy(ICU4XBidiParagraph* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XBidiParagraph.hpp b/intl/icu_capi/cpp/include/ICU4XBidiParagraph.hpp
new file mode 100644
index 0000000000..645390640b
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XBidiParagraph.hpp
@@ -0,0 +1,150 @@
+#ifndef ICU4XBidiParagraph_HPP
+#define ICU4XBidiParagraph_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XBidiParagraph.h"
+
+#include "ICU4XError.hpp"
+#include "ICU4XBidiDirection.hpp"
+
+/**
+ * A destruction policy for using ICU4XBidiParagraph with std::unique_ptr.
+ */
+struct ICU4XBidiParagraphDeleter {
+ void operator()(capi::ICU4XBidiParagraph* l) const noexcept {
+ capi::ICU4XBidiParagraph_destroy(l);
+ }
+};
+
+/**
+ * Bidi information for a single processed paragraph
+ */
+class ICU4XBidiParagraph {
+ public:
+
+ /**
+ * Given a paragraph index `n` within the surrounding text, this sets this
+ * object to the paragraph at that index. Returns `ICU4XError::OutOfBoundsError` when out of bounds.
+ *
+ * This is equivalent to calling `paragraph_at()` on `ICU4XBidiInfo` but doesn't
+ * create a new object
+ */
+ diplomat::result<std::monostate, ICU4XError> set_paragraph_in_text(size_t n);
+
+ /**
+ * The primary direction of this paragraph
+ *
+ * See the [Rust documentation for `level_at`](https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at) for more information.
+ */
+ ICU4XBidiDirection direction() const;
+
+ /**
+ * The number of bytes in this paragraph
+ *
+ * See the [Rust documentation for `len`](https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.ParagraphInfo.html#method.len) for more information.
+ */
+ size_t size() const;
+
+ /**
+ * The start index of this paragraph within the source text
+ */
+ size_t range_start() const;
+
+ /**
+ * The end index of this paragraph within the source text
+ */
+ size_t range_end() const;
+
+ /**
+ * Reorder a line based on display order. The ranges are specified relative to the source text and must be contained
+ * within this paragraph's range.
+ *
+ * See the [Rust documentation for `level_at`](https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> reorder_line_to_writeable(size_t range_start, size_t range_end, W& out) const;
+
+ /**
+ * Reorder a line based on display order. The ranges are specified relative to the source text and must be contained
+ * within this paragraph's range.
+ *
+ * See the [Rust documentation for `level_at`](https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> reorder_line(size_t range_start, size_t range_end) const;
+
+ /**
+ * Get the BIDI level at a particular byte index in this paragraph.
+ * This integer is conceptually a `unicode_bidi::Level`,
+ * and can be further inspected using the static methods on ICU4XBidi.
+ *
+ * Returns 0 (equivalent to `Level::ltr()`) on error
+ *
+ * See the [Rust documentation for `level_at`](https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at) for more information.
+ */
+ uint8_t level_at(size_t pos) const;
+ inline const capi::ICU4XBidiParagraph* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XBidiParagraph* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XBidiParagraph(capi::ICU4XBidiParagraph* i) : inner(i) {}
+ ICU4XBidiParagraph() = default;
+ ICU4XBidiParagraph(ICU4XBidiParagraph&&) noexcept = default;
+ ICU4XBidiParagraph& operator=(ICU4XBidiParagraph&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XBidiParagraph, ICU4XBidiParagraphDeleter> inner;
+};
+
+
+inline diplomat::result<std::monostate, ICU4XError> ICU4XBidiParagraph::set_paragraph_in_text(size_t n) {
+ auto diplomat_result_raw_out_value = capi::ICU4XBidiParagraph_set_paragraph_in_text(this->inner.get(), n);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XBidiDirection ICU4XBidiParagraph::direction() const {
+ return static_cast<ICU4XBidiDirection>(capi::ICU4XBidiParagraph_direction(this->inner.get()));
+}
+inline size_t ICU4XBidiParagraph::size() const {
+ return capi::ICU4XBidiParagraph_size(this->inner.get());
+}
+inline size_t ICU4XBidiParagraph::range_start() const {
+ return capi::ICU4XBidiParagraph_range_start(this->inner.get());
+}
+inline size_t ICU4XBidiParagraph::range_end() const {
+ return capi::ICU4XBidiParagraph_range_end(this->inner.get());
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XBidiParagraph::reorder_line_to_writeable(size_t range_start, size_t range_end, W& out) const {
+ capi::DiplomatWriteable out_writer = diplomat::WriteableTrait<W>::Construct(out);
+ auto diplomat_result_raw_out_value = capi::ICU4XBidiParagraph_reorder_line(this->inner.get(), range_start, range_end, &out_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XBidiParagraph::reorder_line(size_t range_start, size_t range_end) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XBidiParagraph_reorder_line(this->inner.get(), range_start, range_end, &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+inline uint8_t ICU4XBidiParagraph::level_at(size_t pos) const {
+ return capi::ICU4XBidiParagraph_level_at(this->inner.get(), pos);
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCalendar.h b/intl/icu_capi/cpp/include/ICU4XCalendar.h
new file mode 100644
index 0000000000..9ea6484b5f
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCalendar.h
@@ -0,0 +1,37 @@
+#ifndef ICU4XCalendar_H
+#define ICU4XCalendar_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCalendar ICU4XCalendar;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "diplomat_result_box_ICU4XCalendar_ICU4XError.h"
+#include "ICU4XAnyCalendarKind.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCalendar_ICU4XError ICU4XCalendar_create_for_locale(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_box_ICU4XCalendar_ICU4XError ICU4XCalendar_create_for_kind(const ICU4XDataProvider* provider, ICU4XAnyCalendarKind kind);
+
+ICU4XAnyCalendarKind ICU4XCalendar_kind(const ICU4XCalendar* self);
+void ICU4XCalendar_destroy(ICU4XCalendar* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCalendar.hpp b/intl/icu_capi/cpp/include/ICU4XCalendar.hpp
new file mode 100644
index 0000000000..e6ae0608c5
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCalendar.hpp
@@ -0,0 +1,91 @@
+#ifndef ICU4XCalendar_HPP
+#define ICU4XCalendar_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCalendar.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+class ICU4XCalendar;
+#include "ICU4XError.hpp"
+#include "ICU4XAnyCalendarKind.hpp"
+
+/**
+ * A destruction policy for using ICU4XCalendar with std::unique_ptr.
+ */
+struct ICU4XCalendarDeleter {
+ void operator()(capi::ICU4XCalendar* l) const noexcept {
+ capi::ICU4XCalendar_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `AnyCalendar`](https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html) for more information.
+ */
+class ICU4XCalendar {
+ public:
+
+ /**
+ * Creates a new [`ICU4XCalendar`] from the specified date and time.
+ *
+ * See the [Rust documentation for `new_for_locale`](https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new_for_locale) for more information.
+ */
+ static diplomat::result<ICU4XCalendar, ICU4XError> create_for_locale(const ICU4XDataProvider& provider, const ICU4XLocale& locale);
+
+ /**
+ * Creates a new [`ICU4XCalendar`] from the specified date and time.
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XCalendar, ICU4XError> create_for_kind(const ICU4XDataProvider& provider, ICU4XAnyCalendarKind kind);
+
+ /**
+ * Returns the kind of this calendar
+ *
+ * See the [Rust documentation for `kind`](https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.kind) for more information.
+ */
+ ICU4XAnyCalendarKind kind() const;
+ inline const capi::ICU4XCalendar* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XCalendar* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XCalendar(capi::ICU4XCalendar* i) : inner(i) {}
+ ICU4XCalendar() = default;
+ ICU4XCalendar(ICU4XCalendar&&) noexcept = default;
+ ICU4XCalendar& operator=(ICU4XCalendar&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XCalendar, ICU4XCalendarDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+
+inline diplomat::result<ICU4XCalendar, ICU4XError> ICU4XCalendar::create_for_locale(const ICU4XDataProvider& provider, const ICU4XLocale& locale) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCalendar_create_for_locale(provider.AsFFI(), locale.AsFFI());
+ diplomat::result<ICU4XCalendar, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCalendar>(ICU4XCalendar(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCalendar, ICU4XError> ICU4XCalendar::create_for_kind(const ICU4XDataProvider& provider, ICU4XAnyCalendarKind kind) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCalendar_create_for_kind(provider.AsFFI(), static_cast<capi::ICU4XAnyCalendarKind>(kind));
+ diplomat::result<ICU4XCalendar, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCalendar>(ICU4XCalendar(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XAnyCalendarKind ICU4XCalendar::kind() const {
+ return static_cast<ICU4XAnyCalendarKind>(capi::ICU4XCalendar_kind(this->inner.get()));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCanonicalCombiningClassMap.h b/intl/icu_capi/cpp/include/ICU4XCanonicalCombiningClassMap.h
new file mode 100644
index 0000000000..f0fc447ba0
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCanonicalCombiningClassMap.h
@@ -0,0 +1,35 @@
+#ifndef ICU4XCanonicalCombiningClassMap_H
+#define ICU4XCanonicalCombiningClassMap_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCanonicalCombiningClassMap ICU4XCanonicalCombiningClassMap;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError ICU4XCanonicalCombiningClassMap_create(const ICU4XDataProvider* provider);
+
+uint8_t ICU4XCanonicalCombiningClassMap_get(const ICU4XCanonicalCombiningClassMap* self, char32_t ch);
+
+uint8_t ICU4XCanonicalCombiningClassMap_get32(const ICU4XCanonicalCombiningClassMap* self, uint32_t ch);
+void ICU4XCanonicalCombiningClassMap_destroy(ICU4XCanonicalCombiningClassMap* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCanonicalCombiningClassMap.hpp b/intl/icu_capi/cpp/include/ICU4XCanonicalCombiningClassMap.hpp
new file mode 100644
index 0000000000..e663d47824
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCanonicalCombiningClassMap.hpp
@@ -0,0 +1,83 @@
+#ifndef ICU4XCanonicalCombiningClassMap_HPP
+#define ICU4XCanonicalCombiningClassMap_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCanonicalCombiningClassMap.h"
+
+class ICU4XDataProvider;
+class ICU4XCanonicalCombiningClassMap;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XCanonicalCombiningClassMap with std::unique_ptr.
+ */
+struct ICU4XCanonicalCombiningClassMapDeleter {
+ void operator()(capi::ICU4XCanonicalCombiningClassMap* l) const noexcept {
+ capi::ICU4XCanonicalCombiningClassMap_destroy(l);
+ }
+};
+
+/**
+ * Lookup of the Canonical_Combining_Class Unicode property
+ *
+ * See the [Rust documentation for `CanonicalCombiningClassMap`](https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html) for more information.
+ */
+class ICU4XCanonicalCombiningClassMap {
+ public:
+
+ /**
+ * Construct a new ICU4XCanonicalCombiningClassMap instance for NFC
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XCanonicalCombiningClassMap, ICU4XError> create(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `get`](https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.get) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/properties/properties/struct.CanonicalCombiningClass.html)
+ */
+ uint8_t get(char32_t ch) const;
+
+ /**
+ * See the [Rust documentation for `get32`](https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.get32) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/properties/properties/struct.CanonicalCombiningClass.html)
+ */
+ uint8_t get32(uint32_t ch) const;
+ inline const capi::ICU4XCanonicalCombiningClassMap* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XCanonicalCombiningClassMap* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XCanonicalCombiningClassMap(capi::ICU4XCanonicalCombiningClassMap* i) : inner(i) {}
+ ICU4XCanonicalCombiningClassMap() = default;
+ ICU4XCanonicalCombiningClassMap(ICU4XCanonicalCombiningClassMap&&) noexcept = default;
+ ICU4XCanonicalCombiningClassMap& operator=(ICU4XCanonicalCombiningClassMap&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XCanonicalCombiningClassMap, ICU4XCanonicalCombiningClassMapDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+
+inline diplomat::result<ICU4XCanonicalCombiningClassMap, ICU4XError> ICU4XCanonicalCombiningClassMap::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCanonicalCombiningClassMap_create(provider.AsFFI());
+ diplomat::result<ICU4XCanonicalCombiningClassMap, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCanonicalCombiningClassMap>(ICU4XCanonicalCombiningClassMap(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline uint8_t ICU4XCanonicalCombiningClassMap::get(char32_t ch) const {
+ return capi::ICU4XCanonicalCombiningClassMap_get(this->inner.get(), ch);
+}
+inline uint8_t ICU4XCanonicalCombiningClassMap::get32(uint32_t ch) const {
+ return capi::ICU4XCanonicalCombiningClassMap_get32(this->inner.get(), ch);
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCanonicalComposition.h b/intl/icu_capi/cpp/include/ICU4XCanonicalComposition.h
new file mode 100644
index 0000000000..e9ae621739
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCanonicalComposition.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XCanonicalComposition_H
+#define ICU4XCanonicalComposition_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCanonicalComposition ICU4XCanonicalComposition;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCanonicalComposition_ICU4XError ICU4XCanonicalComposition_create(const ICU4XDataProvider* provider);
+
+char32_t ICU4XCanonicalComposition_compose(const ICU4XCanonicalComposition* self, char32_t starter, char32_t second);
+void ICU4XCanonicalComposition_destroy(ICU4XCanonicalComposition* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCanonicalComposition.hpp b/intl/icu_capi/cpp/include/ICU4XCanonicalComposition.hpp
new file mode 100644
index 0000000000..f9e226f0f7
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCanonicalComposition.hpp
@@ -0,0 +1,76 @@
+#ifndef ICU4XCanonicalComposition_HPP
+#define ICU4XCanonicalComposition_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCanonicalComposition.h"
+
+class ICU4XDataProvider;
+class ICU4XCanonicalComposition;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XCanonicalComposition with std::unique_ptr.
+ */
+struct ICU4XCanonicalCompositionDeleter {
+ void operator()(capi::ICU4XCanonicalComposition* l) const noexcept {
+ capi::ICU4XCanonicalComposition_destroy(l);
+ }
+};
+
+/**
+ * The raw canonical composition operation.
+ *
+ * Callers should generally use ICU4XComposingNormalizer unless they specifically need raw composition operations
+ *
+ * See the [Rust documentation for `CanonicalComposition`](https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html) for more information.
+ */
+class ICU4XCanonicalComposition {
+ public:
+
+ /**
+ * Construct a new ICU4XCanonicalComposition instance for NFC
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XCanonicalComposition, ICU4XError> create(const ICU4XDataProvider& provider);
+
+ /**
+ * Performs canonical composition (including Hangul) on a pair of characters
+ * or returns NUL if these characters don’t compose. Composition exclusions are taken into account.
+ *
+ * See the [Rust documentation for `compose`](https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html#method.compose) for more information.
+ */
+ char32_t compose(char32_t starter, char32_t second) const;
+ inline const capi::ICU4XCanonicalComposition* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XCanonicalComposition* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XCanonicalComposition(capi::ICU4XCanonicalComposition* i) : inner(i) {}
+ ICU4XCanonicalComposition() = default;
+ ICU4XCanonicalComposition(ICU4XCanonicalComposition&&) noexcept = default;
+ ICU4XCanonicalComposition& operator=(ICU4XCanonicalComposition&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XCanonicalComposition, ICU4XCanonicalCompositionDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+
+inline diplomat::result<ICU4XCanonicalComposition, ICU4XError> ICU4XCanonicalComposition::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCanonicalComposition_create(provider.AsFFI());
+ diplomat::result<ICU4XCanonicalComposition, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCanonicalComposition>(ICU4XCanonicalComposition(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline char32_t ICU4XCanonicalComposition::compose(char32_t starter, char32_t second) const {
+ return capi::ICU4XCanonicalComposition_compose(this->inner.get(), starter, second);
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCanonicalDecomposition.h b/intl/icu_capi/cpp/include/ICU4XCanonicalDecomposition.h
new file mode 100644
index 0000000000..d18d108b90
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCanonicalDecomposition.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XCanonicalDecomposition_H
+#define ICU4XCanonicalDecomposition_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCanonicalDecomposition ICU4XCanonicalDecomposition;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.h"
+#include "ICU4XDecomposed.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError ICU4XCanonicalDecomposition_create(const ICU4XDataProvider* provider);
+
+ICU4XDecomposed ICU4XCanonicalDecomposition_decompose(const ICU4XCanonicalDecomposition* self, char32_t c);
+void ICU4XCanonicalDecomposition_destroy(ICU4XCanonicalDecomposition* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCanonicalDecomposition.hpp b/intl/icu_capi/cpp/include/ICU4XCanonicalDecomposition.hpp
new file mode 100644
index 0000000000..2bbf5abb82
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCanonicalDecomposition.hpp
@@ -0,0 +1,78 @@
+#ifndef ICU4XCanonicalDecomposition_HPP
+#define ICU4XCanonicalDecomposition_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCanonicalDecomposition.h"
+
+class ICU4XDataProvider;
+class ICU4XCanonicalDecomposition;
+#include "ICU4XError.hpp"
+struct ICU4XDecomposed;
+
+/**
+ * A destruction policy for using ICU4XCanonicalDecomposition with std::unique_ptr.
+ */
+struct ICU4XCanonicalDecompositionDeleter {
+ void operator()(capi::ICU4XCanonicalDecomposition* l) const noexcept {
+ capi::ICU4XCanonicalDecomposition_destroy(l);
+ }
+};
+
+/**
+ * The raw (non-recursive) canonical decomposition operation.
+ *
+ * Callers should generally use ICU4XDecomposingNormalizer unless they specifically need raw composition operations
+ *
+ * See the [Rust documentation for `CanonicalDecomposition`](https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html) for more information.
+ */
+class ICU4XCanonicalDecomposition {
+ public:
+
+ /**
+ * Construct a new ICU4XCanonicalDecomposition instance for NFC
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XCanonicalDecomposition, ICU4XError> create(const ICU4XDataProvider& provider);
+
+ /**
+ * Performs non-recursive canonical decomposition (including for Hangul).
+ *
+ * See the [Rust documentation for `decompose`](https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html#method.decompose) for more information.
+ */
+ ICU4XDecomposed decompose(char32_t c) const;
+ inline const capi::ICU4XCanonicalDecomposition* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XCanonicalDecomposition* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XCanonicalDecomposition(capi::ICU4XCanonicalDecomposition* i) : inner(i) {}
+ ICU4XCanonicalDecomposition() = default;
+ ICU4XCanonicalDecomposition(ICU4XCanonicalDecomposition&&) noexcept = default;
+ ICU4XCanonicalDecomposition& operator=(ICU4XCanonicalDecomposition&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XCanonicalDecomposition, ICU4XCanonicalDecompositionDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XDecomposed.hpp"
+
+inline diplomat::result<ICU4XCanonicalDecomposition, ICU4XError> ICU4XCanonicalDecomposition::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCanonicalDecomposition_create(provider.AsFFI());
+ diplomat::result<ICU4XCanonicalDecomposition, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCanonicalDecomposition>(ICU4XCanonicalDecomposition(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XDecomposed ICU4XCanonicalDecomposition::decompose(char32_t c) const {
+ capi::ICU4XDecomposed diplomat_raw_struct_out_value = capi::ICU4XCanonicalDecomposition_decompose(this->inner.get(), c);
+ return ICU4XDecomposed{ .first = std::move(diplomat_raw_struct_out_value.first), .second = std::move(diplomat_raw_struct_out_value.second) };
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCaseMapCloser.h b/intl/icu_capi/cpp/include/ICU4XCaseMapCloser.h
new file mode 100644
index 0000000000..ed2129006c
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCaseMapCloser.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XCaseMapCloser_H
+#define ICU4XCaseMapCloser_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCaseMapCloser ICU4XCaseMapCloser;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.h"
+#include "ICU4XCodePointSetBuilder.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCaseMapCloser_ICU4XError ICU4XCaseMapCloser_create(const ICU4XDataProvider* provider);
+
+void ICU4XCaseMapCloser_add_case_closure_to(const ICU4XCaseMapCloser* self, char32_t c, ICU4XCodePointSetBuilder* builder);
+
+bool ICU4XCaseMapCloser_add_string_case_closure_to(const ICU4XCaseMapCloser* self, const char* s_data, size_t s_len, ICU4XCodePointSetBuilder* builder);
+void ICU4XCaseMapCloser_destroy(ICU4XCaseMapCloser* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCaseMapCloser.hpp b/intl/icu_capi/cpp/include/ICU4XCaseMapCloser.hpp
new file mode 100644
index 0000000000..a76167f2df
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCaseMapCloser.hpp
@@ -0,0 +1,87 @@
+#ifndef ICU4XCaseMapCloser_HPP
+#define ICU4XCaseMapCloser_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCaseMapCloser.h"
+
+class ICU4XDataProvider;
+class ICU4XCaseMapCloser;
+#include "ICU4XError.hpp"
+class ICU4XCodePointSetBuilder;
+
+/**
+ * A destruction policy for using ICU4XCaseMapCloser with std::unique_ptr.
+ */
+struct ICU4XCaseMapCloserDeleter {
+ void operator()(capi::ICU4XCaseMapCloser* l) const noexcept {
+ capi::ICU4XCaseMapCloser_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `CaseMapCloser`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html) for more information.
+ */
+class ICU4XCaseMapCloser {
+ public:
+
+ /**
+ * Construct a new ICU4XCaseMapper instance
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XCaseMapCloser, ICU4XError> create(const ICU4XDataProvider& provider);
+
+ /**
+ * Adds all simple case mappings and the full case folding for `c` to `builder`.
+ * Also adds special case closure mappings.
+ *
+ * See the [Rust documentation for `add_case_closure_to`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.add_case_closure_to) for more information.
+ */
+ void add_case_closure_to(char32_t c, ICU4XCodePointSetBuilder& builder) const;
+
+ /**
+ * Finds all characters and strings which may casemap to `s` as their full case folding string
+ * and adds them to the set.
+ *
+ * Returns true if the string was found
+ *
+ * See the [Rust documentation for `add_string_case_closure_to`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.add_string_case_closure_to) for more information.
+ */
+ bool add_string_case_closure_to(const std::string_view s, ICU4XCodePointSetBuilder& builder) const;
+ inline const capi::ICU4XCaseMapCloser* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XCaseMapCloser* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XCaseMapCloser(capi::ICU4XCaseMapCloser* i) : inner(i) {}
+ ICU4XCaseMapCloser() = default;
+ ICU4XCaseMapCloser(ICU4XCaseMapCloser&&) noexcept = default;
+ ICU4XCaseMapCloser& operator=(ICU4XCaseMapCloser&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XCaseMapCloser, ICU4XCaseMapCloserDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XCodePointSetBuilder.hpp"
+
+inline diplomat::result<ICU4XCaseMapCloser, ICU4XError> ICU4XCaseMapCloser::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCaseMapCloser_create(provider.AsFFI());
+ diplomat::result<ICU4XCaseMapCloser, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCaseMapCloser>(ICU4XCaseMapCloser(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline void ICU4XCaseMapCloser::add_case_closure_to(char32_t c, ICU4XCodePointSetBuilder& builder) const {
+ capi::ICU4XCaseMapCloser_add_case_closure_to(this->inner.get(), c, builder.AsFFIMut());
+}
+inline bool ICU4XCaseMapCloser::add_string_case_closure_to(const std::string_view s, ICU4XCodePointSetBuilder& builder) const {
+ return capi::ICU4XCaseMapCloser_add_string_case_closure_to(this->inner.get(), s.data(), s.size(), builder.AsFFIMut());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCaseMapper.h b/intl/icu_capi/cpp/include/ICU4XCaseMapper.h
new file mode 100644
index 0000000000..aef264f722
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCaseMapper.h
@@ -0,0 +1,57 @@
+#ifndef ICU4XCaseMapper_H
+#define ICU4XCaseMapper_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCaseMapper ICU4XCaseMapper;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCaseMapper_ICU4XError.h"
+#include "ICU4XLocale.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XTitlecaseOptionsV1.h"
+#include "ICU4XCodePointSetBuilder.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCaseMapper_ICU4XError ICU4XCaseMapper_create(const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XCaseMapper_lowercase(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XCaseMapper_uppercase(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XCaseMapper_titlecase_segment_with_only_case_data_v1(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, ICU4XTitlecaseOptionsV1 options, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XCaseMapper_fold(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XCaseMapper_fold_turkic(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, DiplomatWriteable* write);
+
+void ICU4XCaseMapper_add_case_closure_to(const ICU4XCaseMapper* self, char32_t c, ICU4XCodePointSetBuilder* builder);
+
+char32_t ICU4XCaseMapper_simple_lowercase(const ICU4XCaseMapper* self, char32_t ch);
+
+char32_t ICU4XCaseMapper_simple_uppercase(const ICU4XCaseMapper* self, char32_t ch);
+
+char32_t ICU4XCaseMapper_simple_titlecase(const ICU4XCaseMapper* self, char32_t ch);
+
+char32_t ICU4XCaseMapper_simple_fold(const ICU4XCaseMapper* self, char32_t ch);
+
+char32_t ICU4XCaseMapper_simple_fold_turkic(const ICU4XCaseMapper* self, char32_t ch);
+void ICU4XCaseMapper_destroy(ICU4XCaseMapper* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCaseMapper.hpp b/intl/icu_capi/cpp/include/ICU4XCaseMapper.hpp
new file mode 100644
index 0000000000..ffb95b1c22
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCaseMapper.hpp
@@ -0,0 +1,352 @@
+#ifndef ICU4XCaseMapper_HPP
+#define ICU4XCaseMapper_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCaseMapper.h"
+
+class ICU4XDataProvider;
+class ICU4XCaseMapper;
+#include "ICU4XError.hpp"
+class ICU4XLocale;
+struct ICU4XTitlecaseOptionsV1;
+class ICU4XCodePointSetBuilder;
+
+/**
+ * A destruction policy for using ICU4XCaseMapper with std::unique_ptr.
+ */
+struct ICU4XCaseMapperDeleter {
+ void operator()(capi::ICU4XCaseMapper* l) const noexcept {
+ capi::ICU4XCaseMapper_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `CaseMapper`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html) for more information.
+ */
+class ICU4XCaseMapper {
+ public:
+
+ /**
+ * Construct a new ICU4XCaseMapper instance
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XCaseMapper, ICU4XError> create(const ICU4XDataProvider& provider);
+
+ /**
+ * Returns the full lowercase mapping of the given string
+ *
+ * See the [Rust documentation for `lowercase`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.lowercase) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> lowercase_to_writeable(const std::string_view s, const ICU4XLocale& locale, W& write) const;
+
+ /**
+ * Returns the full lowercase mapping of the given string
+ *
+ * See the [Rust documentation for `lowercase`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.lowercase) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> lowercase(const std::string_view s, const ICU4XLocale& locale) const;
+
+ /**
+ * Returns the full uppercase mapping of the given string
+ *
+ * See the [Rust documentation for `uppercase`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.uppercase) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> uppercase_to_writeable(const std::string_view s, const ICU4XLocale& locale, W& write) const;
+
+ /**
+ * Returns the full uppercase mapping of the given string
+ *
+ * See the [Rust documentation for `uppercase`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.uppercase) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> uppercase(const std::string_view s, const ICU4XLocale& locale) const;
+
+ /**
+ * Returns the full titlecase mapping of the given string, performing head adjustment without
+ * loading additional data.
+ * (if head adjustment is enabled in the options)
+ *
+ * The `v1` refers to the version of the options struct, which may change as we add more options
+ *
+ * See the [Rust documentation for `titlecase_segment_with_only_case_data`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.titlecase_segment_with_only_case_data) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> titlecase_segment_with_only_case_data_v1_to_writeable(const std::string_view s, const ICU4XLocale& locale, ICU4XTitlecaseOptionsV1 options, W& write) const;
+
+ /**
+ * Returns the full titlecase mapping of the given string, performing head adjustment without
+ * loading additional data.
+ * (if head adjustment is enabled in the options)
+ *
+ * The `v1` refers to the version of the options struct, which may change as we add more options
+ *
+ * See the [Rust documentation for `titlecase_segment_with_only_case_data`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.titlecase_segment_with_only_case_data) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> titlecase_segment_with_only_case_data_v1(const std::string_view s, const ICU4XLocale& locale, ICU4XTitlecaseOptionsV1 options) const;
+
+ /**
+ * Case-folds the characters in the given string
+ *
+ * See the [Rust documentation for `fold`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> fold_to_writeable(const std::string_view s, W& write) const;
+
+ /**
+ * Case-folds the characters in the given string
+ *
+ * See the [Rust documentation for `fold`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> fold(const std::string_view s) const;
+
+ /**
+ * Case-folds the characters in the given string
+ * using Turkic (T) mappings for dotted/dotless I.
+ *
+ * See the [Rust documentation for `fold_turkic`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold_turkic) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> fold_turkic_to_writeable(const std::string_view s, W& write) const;
+
+ /**
+ * Case-folds the characters in the given string
+ * using Turkic (T) mappings for dotted/dotless I.
+ *
+ * See the [Rust documentation for `fold_turkic`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold_turkic) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> fold_turkic(const std::string_view s) const;
+
+ /**
+ * Adds all simple case mappings and the full case folding for `c` to `builder`.
+ * Also adds special case closure mappings.
+ *
+ * In other words, this adds all characters that this casemaps to, as
+ * well as all characters that may casemap to this one.
+ *
+ * Note that since ICU4XCodePointSetBuilder does not contain strings, this will
+ * ignore string mappings.
+ *
+ * Identical to the similarly named method on `ICU4XCaseMapCloser`, use that if you
+ * plan on using string case closure mappings too.
+ *
+ * See the [Rust documentation for `add_case_closure_to`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.add_case_closure_to) for more information.
+ */
+ void add_case_closure_to(char32_t c, ICU4XCodePointSetBuilder& builder) const;
+
+ /**
+ * Returns the simple lowercase mapping of the given character.
+ *
+ * This function only implements simple and common mappings.
+ * Full mappings, which can map one char to a string, are not included.
+ * For full mappings, use `ICU4XCaseMapper::lowercase`.
+ *
+ * See the [Rust documentation for `simple_lowercase`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_lowercase) for more information.
+ */
+ char32_t simple_lowercase(char32_t ch) const;
+
+ /**
+ * Returns the simple uppercase mapping of the given character.
+ *
+ * This function only implements simple and common mappings.
+ * Full mappings, which can map one char to a string, are not included.
+ * For full mappings, use `ICU4XCaseMapper::uppercase`.
+ *
+ * See the [Rust documentation for `simple_uppercase`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_uppercase) for more information.
+ */
+ char32_t simple_uppercase(char32_t ch) const;
+
+ /**
+ * Returns the simple titlecase mapping of the given character.
+ *
+ * This function only implements simple and common mappings.
+ * Full mappings, which can map one char to a string, are not included.
+ * For full mappings, use `ICU4XCaseMapper::titlecase_segment`.
+ *
+ * See the [Rust documentation for `simple_titlecase`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_titlecase) for more information.
+ */
+ char32_t simple_titlecase(char32_t ch) const;
+
+ /**
+ * Returns the simple casefolding of the given character.
+ *
+ * This function only implements simple folding.
+ * For full folding, use `ICU4XCaseMapper::fold`.
+ *
+ * See the [Rust documentation for `simple_fold`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_fold) for more information.
+ */
+ char32_t simple_fold(char32_t ch) const;
+
+ /**
+ * Returns the simple casefolding of the given character in the Turkic locale
+ *
+ * This function only implements simple folding.
+ * For full folding, use `ICU4XCaseMapper::fold_turkic`.
+ *
+ * See the [Rust documentation for `simple_fold_turkic`](https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_fold_turkic) for more information.
+ */
+ char32_t simple_fold_turkic(char32_t ch) const;
+ inline const capi::ICU4XCaseMapper* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XCaseMapper* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XCaseMapper(capi::ICU4XCaseMapper* i) : inner(i) {}
+ ICU4XCaseMapper() = default;
+ ICU4XCaseMapper(ICU4XCaseMapper&&) noexcept = default;
+ ICU4XCaseMapper& operator=(ICU4XCaseMapper&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XCaseMapper, ICU4XCaseMapperDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+#include "ICU4XTitlecaseOptionsV1.hpp"
+#include "ICU4XCodePointSetBuilder.hpp"
+
+inline diplomat::result<ICU4XCaseMapper, ICU4XError> ICU4XCaseMapper::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCaseMapper_create(provider.AsFFI());
+ diplomat::result<ICU4XCaseMapper, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCaseMapper>(ICU4XCaseMapper(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XCaseMapper::lowercase_to_writeable(const std::string_view s, const ICU4XLocale& locale, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XCaseMapper_lowercase(this->inner.get(), s.data(), s.size(), locale.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XCaseMapper::lowercase(const std::string_view s, const ICU4XLocale& locale) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XCaseMapper_lowercase(this->inner.get(), s.data(), s.size(), locale.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XCaseMapper::uppercase_to_writeable(const std::string_view s, const ICU4XLocale& locale, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XCaseMapper_uppercase(this->inner.get(), s.data(), s.size(), locale.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XCaseMapper::uppercase(const std::string_view s, const ICU4XLocale& locale) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XCaseMapper_uppercase(this->inner.get(), s.data(), s.size(), locale.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XCaseMapper::titlecase_segment_with_only_case_data_v1_to_writeable(const std::string_view s, const ICU4XLocale& locale, ICU4XTitlecaseOptionsV1 options, W& write) const {
+ ICU4XTitlecaseOptionsV1 diplomat_wrapped_struct_options = options;
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XCaseMapper_titlecase_segment_with_only_case_data_v1(this->inner.get(), s.data(), s.size(), locale.AsFFI(), capi::ICU4XTitlecaseOptionsV1{ .leading_adjustment = static_cast<capi::ICU4XLeadingAdjustment>(diplomat_wrapped_struct_options.leading_adjustment), .trailing_case = static_cast<capi::ICU4XTrailingCase>(diplomat_wrapped_struct_options.trailing_case) }, &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XCaseMapper::titlecase_segment_with_only_case_data_v1(const std::string_view s, const ICU4XLocale& locale, ICU4XTitlecaseOptionsV1 options) const {
+ ICU4XTitlecaseOptionsV1 diplomat_wrapped_struct_options = options;
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XCaseMapper_titlecase_segment_with_only_case_data_v1(this->inner.get(), s.data(), s.size(), locale.AsFFI(), capi::ICU4XTitlecaseOptionsV1{ .leading_adjustment = static_cast<capi::ICU4XLeadingAdjustment>(diplomat_wrapped_struct_options.leading_adjustment), .trailing_case = static_cast<capi::ICU4XTrailingCase>(diplomat_wrapped_struct_options.trailing_case) }, &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XCaseMapper::fold_to_writeable(const std::string_view s, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XCaseMapper_fold(this->inner.get(), s.data(), s.size(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XCaseMapper::fold(const std::string_view s) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XCaseMapper_fold(this->inner.get(), s.data(), s.size(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XCaseMapper::fold_turkic_to_writeable(const std::string_view s, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XCaseMapper_fold_turkic(this->inner.get(), s.data(), s.size(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XCaseMapper::fold_turkic(const std::string_view s) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XCaseMapper_fold_turkic(this->inner.get(), s.data(), s.size(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+inline void ICU4XCaseMapper::add_case_closure_to(char32_t c, ICU4XCodePointSetBuilder& builder) const {
+ capi::ICU4XCaseMapper_add_case_closure_to(this->inner.get(), c, builder.AsFFIMut());
+}
+inline char32_t ICU4XCaseMapper::simple_lowercase(char32_t ch) const {
+ return capi::ICU4XCaseMapper_simple_lowercase(this->inner.get(), ch);
+}
+inline char32_t ICU4XCaseMapper::simple_uppercase(char32_t ch) const {
+ return capi::ICU4XCaseMapper_simple_uppercase(this->inner.get(), ch);
+}
+inline char32_t ICU4XCaseMapper::simple_titlecase(char32_t ch) const {
+ return capi::ICU4XCaseMapper_simple_titlecase(this->inner.get(), ch);
+}
+inline char32_t ICU4XCaseMapper::simple_fold(char32_t ch) const {
+ return capi::ICU4XCaseMapper_simple_fold(this->inner.get(), ch);
+}
+inline char32_t ICU4XCaseMapper::simple_fold_turkic(char32_t ch) const {
+ return capi::ICU4XCaseMapper_simple_fold_turkic(this->inner.get(), ch);
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCodePointMapData16.h b/intl/icu_capi/cpp/include/ICU4XCodePointMapData16.h
new file mode 100644
index 0000000000..19effe2d92
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCodePointMapData16.h
@@ -0,0 +1,43 @@
+#ifndef ICU4XCodePointMapData16_H
+#define ICU4XCodePointMapData16_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCodePointMapData16 ICU4XCodePointMapData16;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "CodePointRangeIterator.h"
+#include "ICU4XCodePointSetData.h"
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+uint16_t ICU4XCodePointMapData16_get(const ICU4XCodePointMapData16* self, char32_t cp);
+
+uint16_t ICU4XCodePointMapData16_get32(const ICU4XCodePointMapData16* self, uint32_t cp);
+
+CodePointRangeIterator* ICU4XCodePointMapData16_iter_ranges_for_value(const ICU4XCodePointMapData16* self, uint16_t value);
+
+CodePointRangeIterator* ICU4XCodePointMapData16_iter_ranges_for_value_complemented(const ICU4XCodePointMapData16* self, uint16_t value);
+
+ICU4XCodePointSetData* ICU4XCodePointMapData16_get_set_for_value(const ICU4XCodePointMapData16* self, uint16_t value);
+
+diplomat_result_box_ICU4XCodePointMapData16_ICU4XError ICU4XCodePointMapData16_load_script(const ICU4XDataProvider* provider);
+void ICU4XCodePointMapData16_destroy(ICU4XCodePointMapData16* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCodePointMapData16.hpp b/intl/icu_capi/cpp/include/ICU4XCodePointMapData16.hpp
new file mode 100644
index 0000000000..3bdefb51f6
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCodePointMapData16.hpp
@@ -0,0 +1,123 @@
+#ifndef ICU4XCodePointMapData16_HPP
+#define ICU4XCodePointMapData16_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCodePointMapData16.h"
+
+class CodePointRangeIterator;
+class ICU4XCodePointSetData;
+class ICU4XDataProvider;
+class ICU4XCodePointMapData16;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XCodePointMapData16 with std::unique_ptr.
+ */
+struct ICU4XCodePointMapData16Deleter {
+ void operator()(capi::ICU4XCodePointMapData16* l) const noexcept {
+ capi::ICU4XCodePointMapData16_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property.
+ *
+ * For properties whose values fit into 16 bits.
+ *
+ * See the [Rust documentation for `properties`](https://docs.rs/icu/latest/icu/properties/index.html) for more information.
+ *
+ * See the [Rust documentation for `CodePointMapData`](https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapData.html) for more information.
+ *
+ * See the [Rust documentation for `CodePointMapDataBorrowed`](https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html) for more information.
+ */
+class ICU4XCodePointMapData16 {
+ public:
+
+ /**
+ * Gets the value for a code point.
+ *
+ * See the [Rust documentation for `get`](https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get) for more information.
+ */
+ uint16_t get(char32_t cp) const;
+
+ /**
+ * Gets the value for a code point (specified as a 32 bit integer, in UTF-32)
+ */
+ uint16_t get32(uint32_t cp) const;
+
+ /**
+ * Produces an iterator over ranges of code points that map to `value`
+ *
+ * See the [Rust documentation for `iter_ranges_for_value`](https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value) for more information.
+ *
+ * Lifetimes: `this` must live at least as long as the output.
+ */
+ CodePointRangeIterator iter_ranges_for_value(uint16_t value) const;
+
+ /**
+ * Produces an iterator over ranges of code points that do not map to `value`
+ *
+ * See the [Rust documentation for `iter_ranges_for_value_complemented`](https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value_complemented) for more information.
+ *
+ * Lifetimes: `this` must live at least as long as the output.
+ */
+ CodePointRangeIterator iter_ranges_for_value_complemented(uint16_t value) const;
+
+ /**
+ * Gets a [`ICU4XCodePointSetData`] representing all entries in this map that map to the given value
+ *
+ * See the [Rust documentation for `get_set_for_value`](https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get_set_for_value) for more information.
+ */
+ ICU4XCodePointSetData get_set_for_value(uint16_t value) const;
+
+ /**
+ * See the [Rust documentation for `script`](https://docs.rs/icu/latest/icu/properties/maps/fn.script.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointMapData16, ICU4XError> load_script(const ICU4XDataProvider& provider);
+ inline const capi::ICU4XCodePointMapData16* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XCodePointMapData16* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XCodePointMapData16(capi::ICU4XCodePointMapData16* i) : inner(i) {}
+ ICU4XCodePointMapData16() = default;
+ ICU4XCodePointMapData16(ICU4XCodePointMapData16&&) noexcept = default;
+ ICU4XCodePointMapData16& operator=(ICU4XCodePointMapData16&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XCodePointMapData16, ICU4XCodePointMapData16Deleter> inner;
+};
+
+#include "CodePointRangeIterator.hpp"
+#include "ICU4XCodePointSetData.hpp"
+#include "ICU4XDataProvider.hpp"
+
+inline uint16_t ICU4XCodePointMapData16::get(char32_t cp) const {
+ return capi::ICU4XCodePointMapData16_get(this->inner.get(), cp);
+}
+inline uint16_t ICU4XCodePointMapData16::get32(uint32_t cp) const {
+ return capi::ICU4XCodePointMapData16_get32(this->inner.get(), cp);
+}
+inline CodePointRangeIterator ICU4XCodePointMapData16::iter_ranges_for_value(uint16_t value) const {
+ return CodePointRangeIterator(capi::ICU4XCodePointMapData16_iter_ranges_for_value(this->inner.get(), value));
+}
+inline CodePointRangeIterator ICU4XCodePointMapData16::iter_ranges_for_value_complemented(uint16_t value) const {
+ return CodePointRangeIterator(capi::ICU4XCodePointMapData16_iter_ranges_for_value_complemented(this->inner.get(), value));
+}
+inline ICU4XCodePointSetData ICU4XCodePointMapData16::get_set_for_value(uint16_t value) const {
+ return ICU4XCodePointSetData(capi::ICU4XCodePointMapData16_get_set_for_value(this->inner.get(), value));
+}
+inline diplomat::result<ICU4XCodePointMapData16, ICU4XError> ICU4XCodePointMapData16::load_script(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointMapData16_load_script(provider.AsFFI());
+ diplomat::result<ICU4XCodePointMapData16, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointMapData16>(ICU4XCodePointMapData16(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCodePointMapData8.h b/intl/icu_capi/cpp/include/ICU4XCodePointMapData8.h
new file mode 100644
index 0000000000..87fe8854b2
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCodePointMapData8.h
@@ -0,0 +1,61 @@
+#ifndef ICU4XCodePointMapData8_H
+#define ICU4XCodePointMapData8_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCodePointMapData8 ICU4XCodePointMapData8;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "CodePointRangeIterator.h"
+#include "ICU4XCodePointSetData.h"
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+uint8_t ICU4XCodePointMapData8_get(const ICU4XCodePointMapData8* self, char32_t cp);
+
+uint8_t ICU4XCodePointMapData8_get32(const ICU4XCodePointMapData8* self, uint32_t cp);
+
+uint32_t ICU4XCodePointMapData8_general_category_to_mask(uint8_t gc);
+
+CodePointRangeIterator* ICU4XCodePointMapData8_iter_ranges_for_value(const ICU4XCodePointMapData8* self, uint8_t value);
+
+CodePointRangeIterator* ICU4XCodePointMapData8_iter_ranges_for_value_complemented(const ICU4XCodePointMapData8* self, uint8_t value);
+
+CodePointRangeIterator* ICU4XCodePointMapData8_iter_ranges_for_mask(const ICU4XCodePointMapData8* self, uint32_t mask);
+
+ICU4XCodePointSetData* ICU4XCodePointMapData8_get_set_for_value(const ICU4XCodePointMapData8* self, uint8_t value);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_general_category(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_bidi_class(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_east_asian_width(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_indic_syllabic_category(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_line_break(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_try_grapheme_cluster_break(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_word_break(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_sentence_break(const ICU4XDataProvider* provider);
+void ICU4XCodePointMapData8_destroy(ICU4XCodePointMapData8* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCodePointMapData8.hpp b/intl/icu_capi/cpp/include/ICU4XCodePointMapData8.hpp
new file mode 100644
index 0000000000..7631375f15
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCodePointMapData8.hpp
@@ -0,0 +1,259 @@
+#ifndef ICU4XCodePointMapData8_HPP
+#define ICU4XCodePointMapData8_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCodePointMapData8.h"
+
+class CodePointRangeIterator;
+class ICU4XCodePointSetData;
+class ICU4XDataProvider;
+class ICU4XCodePointMapData8;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XCodePointMapData8 with std::unique_ptr.
+ */
+struct ICU4XCodePointMapData8Deleter {
+ void operator()(capi::ICU4XCodePointMapData8* l) const noexcept {
+ capi::ICU4XCodePointMapData8_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property.
+ *
+ * For properties whose values fit into 8 bits.
+ *
+ * See the [Rust documentation for `properties`](https://docs.rs/icu/latest/icu/properties/index.html) for more information.
+ *
+ * See the [Rust documentation for `CodePointMapData`](https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapData.html) for more information.
+ *
+ * See the [Rust documentation for `CodePointMapDataBorrowed`](https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html) for more information.
+ */
+class ICU4XCodePointMapData8 {
+ public:
+
+ /**
+ * Gets the value for a code point.
+ *
+ * See the [Rust documentation for `get`](https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get) for more information.
+ */
+ uint8_t get(char32_t cp) const;
+
+ /**
+ * Gets the value for a code point (specified as a 32 bit integer, in UTF-32)
+ */
+ uint8_t get32(uint32_t cp) const;
+
+ /**
+ * Converts a general category to its corresponding mask value
+ *
+ * Nonexistant general categories will map to the empty mask
+ *
+ * See the [Rust documentation for `GeneralCategoryGroup`](https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html) for more information.
+ */
+ static uint32_t general_category_to_mask(uint8_t gc);
+
+ /**
+ * Produces an iterator over ranges of code points that map to `value`
+ *
+ * See the [Rust documentation for `iter_ranges_for_value`](https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value) for more information.
+ *
+ * Lifetimes: `this` must live at least as long as the output.
+ */
+ CodePointRangeIterator iter_ranges_for_value(uint8_t value) const;
+
+ /**
+ * Produces an iterator over ranges of code points that do not map to `value`
+ *
+ * See the [Rust documentation for `iter_ranges_for_value_complemented`](https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value_complemented) for more information.
+ *
+ * Lifetimes: `this` must live at least as long as the output.
+ */
+ CodePointRangeIterator iter_ranges_for_value_complemented(uint8_t value) const;
+
+ /**
+ * Given a mask value (the nth bit marks property value = n), produce an iterator over ranges of code points
+ * whose property values are contained in the mask.
+ *
+ * The main mask property supported is that for General_Category, which can be obtained via `general_category_to_mask()` or
+ * by using `ICU4XGeneralCategoryNameToMaskMapper`
+ *
+ * Should only be used on maps for properties with values less than 32 (like Generak_Category),
+ * other maps will have unpredictable results
+ *
+ * See the [Rust documentation for `iter_ranges_for_group`](https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_group) for more information.
+ *
+ * Lifetimes: `this` must live at least as long as the output.
+ */
+ CodePointRangeIterator iter_ranges_for_mask(uint32_t mask) const;
+
+ /**
+ * Gets a [`ICU4XCodePointSetData`] representing all entries in this map that map to the given value
+ *
+ * See the [Rust documentation for `get_set_for_value`](https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get_set_for_value) for more information.
+ */
+ ICU4XCodePointSetData get_set_for_value(uint8_t value) const;
+
+ /**
+ * See the [Rust documentation for `general_category`](https://docs.rs/icu/latest/icu/properties/maps/fn.general_category.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointMapData8, ICU4XError> load_general_category(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `bidi_class`](https://docs.rs/icu/latest/icu/properties/maps/fn.bidi_class.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointMapData8, ICU4XError> load_bidi_class(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `east_asian_width`](https://docs.rs/icu/latest/icu/properties/maps/fn.east_asian_width.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointMapData8, ICU4XError> load_east_asian_width(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `indic_syllabic_category`](https://docs.rs/icu/latest/icu/properties/maps/fn.indic_syllabic_category.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointMapData8, ICU4XError> load_indic_syllabic_category(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `line_break`](https://docs.rs/icu/latest/icu/properties/maps/fn.line_break.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointMapData8, ICU4XError> load_line_break(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `grapheme_cluster_break`](https://docs.rs/icu/latest/icu/properties/maps/fn.grapheme_cluster_break.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointMapData8, ICU4XError> try_grapheme_cluster_break(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `word_break`](https://docs.rs/icu/latest/icu/properties/maps/fn.word_break.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointMapData8, ICU4XError> load_word_break(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `sentence_break`](https://docs.rs/icu/latest/icu/properties/maps/fn.sentence_break.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointMapData8, ICU4XError> load_sentence_break(const ICU4XDataProvider& provider);
+ inline const capi::ICU4XCodePointMapData8* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XCodePointMapData8* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XCodePointMapData8(capi::ICU4XCodePointMapData8* i) : inner(i) {}
+ ICU4XCodePointMapData8() = default;
+ ICU4XCodePointMapData8(ICU4XCodePointMapData8&&) noexcept = default;
+ ICU4XCodePointMapData8& operator=(ICU4XCodePointMapData8&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XCodePointMapData8, ICU4XCodePointMapData8Deleter> inner;
+};
+
+#include "CodePointRangeIterator.hpp"
+#include "ICU4XCodePointSetData.hpp"
+#include "ICU4XDataProvider.hpp"
+
+inline uint8_t ICU4XCodePointMapData8::get(char32_t cp) const {
+ return capi::ICU4XCodePointMapData8_get(this->inner.get(), cp);
+}
+inline uint8_t ICU4XCodePointMapData8::get32(uint32_t cp) const {
+ return capi::ICU4XCodePointMapData8_get32(this->inner.get(), cp);
+}
+inline uint32_t ICU4XCodePointMapData8::general_category_to_mask(uint8_t gc) {
+ return capi::ICU4XCodePointMapData8_general_category_to_mask(gc);
+}
+inline CodePointRangeIterator ICU4XCodePointMapData8::iter_ranges_for_value(uint8_t value) const {
+ return CodePointRangeIterator(capi::ICU4XCodePointMapData8_iter_ranges_for_value(this->inner.get(), value));
+}
+inline CodePointRangeIterator ICU4XCodePointMapData8::iter_ranges_for_value_complemented(uint8_t value) const {
+ return CodePointRangeIterator(capi::ICU4XCodePointMapData8_iter_ranges_for_value_complemented(this->inner.get(), value));
+}
+inline CodePointRangeIterator ICU4XCodePointMapData8::iter_ranges_for_mask(uint32_t mask) const {
+ return CodePointRangeIterator(capi::ICU4XCodePointMapData8_iter_ranges_for_mask(this->inner.get(), mask));
+}
+inline ICU4XCodePointSetData ICU4XCodePointMapData8::get_set_for_value(uint8_t value) const {
+ return ICU4XCodePointSetData(capi::ICU4XCodePointMapData8_get_set_for_value(this->inner.get(), value));
+}
+inline diplomat::result<ICU4XCodePointMapData8, ICU4XError> ICU4XCodePointMapData8::load_general_category(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointMapData8_load_general_category(provider.AsFFI());
+ diplomat::result<ICU4XCodePointMapData8, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointMapData8>(ICU4XCodePointMapData8(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointMapData8, ICU4XError> ICU4XCodePointMapData8::load_bidi_class(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointMapData8_load_bidi_class(provider.AsFFI());
+ diplomat::result<ICU4XCodePointMapData8, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointMapData8>(ICU4XCodePointMapData8(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointMapData8, ICU4XError> ICU4XCodePointMapData8::load_east_asian_width(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointMapData8_load_east_asian_width(provider.AsFFI());
+ diplomat::result<ICU4XCodePointMapData8, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointMapData8>(ICU4XCodePointMapData8(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointMapData8, ICU4XError> ICU4XCodePointMapData8::load_indic_syllabic_category(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointMapData8_load_indic_syllabic_category(provider.AsFFI());
+ diplomat::result<ICU4XCodePointMapData8, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointMapData8>(ICU4XCodePointMapData8(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointMapData8, ICU4XError> ICU4XCodePointMapData8::load_line_break(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointMapData8_load_line_break(provider.AsFFI());
+ diplomat::result<ICU4XCodePointMapData8, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointMapData8>(ICU4XCodePointMapData8(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointMapData8, ICU4XError> ICU4XCodePointMapData8::try_grapheme_cluster_break(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointMapData8_try_grapheme_cluster_break(provider.AsFFI());
+ diplomat::result<ICU4XCodePointMapData8, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointMapData8>(ICU4XCodePointMapData8(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointMapData8, ICU4XError> ICU4XCodePointMapData8::load_word_break(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointMapData8_load_word_break(provider.AsFFI());
+ diplomat::result<ICU4XCodePointMapData8, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointMapData8>(ICU4XCodePointMapData8(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointMapData8, ICU4XError> ICU4XCodePointMapData8::load_sentence_break(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointMapData8_load_sentence_break(provider.AsFFI());
+ diplomat::result<ICU4XCodePointMapData8, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointMapData8>(ICU4XCodePointMapData8(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCodePointSetBuilder.h b/intl/icu_capi/cpp/include/ICU4XCodePointSetBuilder.h
new file mode 100644
index 0000000000..d36697c7cf
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCodePointSetBuilder.h
@@ -0,0 +1,64 @@
+#ifndef ICU4XCodePointSetBuilder_H
+#define ICU4XCodePointSetBuilder_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCodePointSetBuilder ICU4XCodePointSetBuilder;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XCodePointSetData.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+ICU4XCodePointSetBuilder* ICU4XCodePointSetBuilder_create();
+
+ICU4XCodePointSetData* ICU4XCodePointSetBuilder_build(ICU4XCodePointSetBuilder* self);
+
+void ICU4XCodePointSetBuilder_complement(ICU4XCodePointSetBuilder* self);
+
+bool ICU4XCodePointSetBuilder_is_empty(const ICU4XCodePointSetBuilder* self);
+
+void ICU4XCodePointSetBuilder_add_char(ICU4XCodePointSetBuilder* self, char32_t ch);
+
+void ICU4XCodePointSetBuilder_add_u32(ICU4XCodePointSetBuilder* self, uint32_t ch);
+
+void ICU4XCodePointSetBuilder_add_inclusive_range(ICU4XCodePointSetBuilder* self, char32_t start, char32_t end);
+
+void ICU4XCodePointSetBuilder_add_inclusive_range_u32(ICU4XCodePointSetBuilder* self, uint32_t start, uint32_t end);
+
+void ICU4XCodePointSetBuilder_add_set(ICU4XCodePointSetBuilder* self, const ICU4XCodePointSetData* data);
+
+void ICU4XCodePointSetBuilder_remove_char(ICU4XCodePointSetBuilder* self, char32_t ch);
+
+void ICU4XCodePointSetBuilder_remove_inclusive_range(ICU4XCodePointSetBuilder* self, char32_t start, char32_t end);
+
+void ICU4XCodePointSetBuilder_remove_set(ICU4XCodePointSetBuilder* self, const ICU4XCodePointSetData* data);
+
+void ICU4XCodePointSetBuilder_retain_char(ICU4XCodePointSetBuilder* self, char32_t ch);
+
+void ICU4XCodePointSetBuilder_retain_inclusive_range(ICU4XCodePointSetBuilder* self, char32_t start, char32_t end);
+
+void ICU4XCodePointSetBuilder_retain_set(ICU4XCodePointSetBuilder* self, const ICU4XCodePointSetData* data);
+
+void ICU4XCodePointSetBuilder_complement_char(ICU4XCodePointSetBuilder* self, char32_t ch);
+
+void ICU4XCodePointSetBuilder_complement_inclusive_range(ICU4XCodePointSetBuilder* self, char32_t start, char32_t end);
+
+void ICU4XCodePointSetBuilder_complement_set(ICU4XCodePointSetBuilder* self, const ICU4XCodePointSetData* data);
+void ICU4XCodePointSetBuilder_destroy(ICU4XCodePointSetBuilder* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCodePointSetBuilder.hpp b/intl/icu_capi/cpp/include/ICU4XCodePointSetBuilder.hpp
new file mode 100644
index 0000000000..bf77eb56a4
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCodePointSetBuilder.hpp
@@ -0,0 +1,233 @@
+#ifndef ICU4XCodePointSetBuilder_HPP
+#define ICU4XCodePointSetBuilder_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCodePointSetBuilder.h"
+
+class ICU4XCodePointSetBuilder;
+class ICU4XCodePointSetData;
+
+/**
+ * A destruction policy for using ICU4XCodePointSetBuilder with std::unique_ptr.
+ */
+struct ICU4XCodePointSetBuilderDeleter {
+ void operator()(capi::ICU4XCodePointSetBuilder* l) const noexcept {
+ capi::ICU4XCodePointSetBuilder_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `CodePointInversionListBuilder`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html) for more information.
+ */
+class ICU4XCodePointSetBuilder {
+ public:
+
+ /**
+ * Make a new set builder containing nothing
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.new) for more information.
+ */
+ static ICU4XCodePointSetBuilder create();
+
+ /**
+ * Build this into a set
+ *
+ * This object is repopulated with an empty builder
+ *
+ * See the [Rust documentation for `build`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.build) for more information.
+ */
+ ICU4XCodePointSetData build();
+
+ /**
+ * Complements this set
+ *
+ * (Elements in this set are removed and vice versa)
+ *
+ * See the [Rust documentation for `complement`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement) for more information.
+ */
+ void complement();
+
+ /**
+ * Returns whether this set is empty
+ *
+ * See the [Rust documentation for `is_empty`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.is_empty) for more information.
+ */
+ bool is_empty() const;
+
+ /**
+ * Add a single character to the set
+ *
+ * See the [Rust documentation for `add_char`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_char) for more information.
+ */
+ void add_char(char32_t ch);
+
+ /**
+ * Add a single u32 value to the set
+ *
+ * See the [Rust documentation for `add_u32`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_u32) for more information.
+ */
+ void add_u32(uint32_t ch);
+
+ /**
+ * Add an inclusive range of characters to the set
+ *
+ * See the [Rust documentation for `add_range`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_range) for more information.
+ */
+ void add_inclusive_range(char32_t start, char32_t end);
+
+ /**
+ * Add an inclusive range of u32s to the set
+ *
+ * See the [Rust documentation for `add_range_u32`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_range_u32) for more information.
+ */
+ void add_inclusive_range_u32(uint32_t start, uint32_t end);
+
+ /**
+ * Add all elements that belong to the provided set to the set
+ *
+ * See the [Rust documentation for `add_set`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_set) for more information.
+ */
+ void add_set(const ICU4XCodePointSetData& data);
+
+ /**
+ * Remove a single character to the set
+ *
+ * See the [Rust documentation for `remove_char`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_char) for more information.
+ */
+ void remove_char(char32_t ch);
+
+ /**
+ * Remove an inclusive range of characters from the set
+ *
+ * See the [Rust documentation for `remove_range`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_range) for more information.
+ */
+ void remove_inclusive_range(char32_t start, char32_t end);
+
+ /**
+ * Remove all elements that belong to the provided set from the set
+ *
+ * See the [Rust documentation for `remove_set`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_set) for more information.
+ */
+ void remove_set(const ICU4XCodePointSetData& data);
+
+ /**
+ * Removes all elements from the set except a single character
+ *
+ * See the [Rust documentation for `retain_char`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_char) for more information.
+ */
+ void retain_char(char32_t ch);
+
+ /**
+ * Removes all elements from the set except an inclusive range of characters f
+ *
+ * See the [Rust documentation for `retain_range`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_range) for more information.
+ */
+ void retain_inclusive_range(char32_t start, char32_t end);
+
+ /**
+ * Removes all elements from the set except all elements in the provided set
+ *
+ * See the [Rust documentation for `retain_set`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_set) for more information.
+ */
+ void retain_set(const ICU4XCodePointSetData& data);
+
+ /**
+ * Complement a single character to the set
+ *
+ * (Characters which are in this set are removed and vice versa)
+ *
+ * See the [Rust documentation for `complement_char`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_char) for more information.
+ */
+ void complement_char(char32_t ch);
+
+ /**
+ * Complement an inclusive range of characters from the set
+ *
+ * (Characters which are in this set are removed and vice versa)
+ *
+ * See the [Rust documentation for `complement_range`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_range) for more information.
+ */
+ void complement_inclusive_range(char32_t start, char32_t end);
+
+ /**
+ * Complement all elements that belong to the provided set from the set
+ *
+ * (Characters which are in this set are removed and vice versa)
+ *
+ * See the [Rust documentation for `complement_set`](https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_set) for more information.
+ */
+ void complement_set(const ICU4XCodePointSetData& data);
+ inline const capi::ICU4XCodePointSetBuilder* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XCodePointSetBuilder* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XCodePointSetBuilder(capi::ICU4XCodePointSetBuilder* i) : inner(i) {}
+ ICU4XCodePointSetBuilder() = default;
+ ICU4XCodePointSetBuilder(ICU4XCodePointSetBuilder&&) noexcept = default;
+ ICU4XCodePointSetBuilder& operator=(ICU4XCodePointSetBuilder&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XCodePointSetBuilder, ICU4XCodePointSetBuilderDeleter> inner;
+};
+
+#include "ICU4XCodePointSetData.hpp"
+
+inline ICU4XCodePointSetBuilder ICU4XCodePointSetBuilder::create() {
+ return ICU4XCodePointSetBuilder(capi::ICU4XCodePointSetBuilder_create());
+}
+inline ICU4XCodePointSetData ICU4XCodePointSetBuilder::build() {
+ return ICU4XCodePointSetData(capi::ICU4XCodePointSetBuilder_build(this->inner.get()));
+}
+inline void ICU4XCodePointSetBuilder::complement() {
+ capi::ICU4XCodePointSetBuilder_complement(this->inner.get());
+}
+inline bool ICU4XCodePointSetBuilder::is_empty() const {
+ return capi::ICU4XCodePointSetBuilder_is_empty(this->inner.get());
+}
+inline void ICU4XCodePointSetBuilder::add_char(char32_t ch) {
+ capi::ICU4XCodePointSetBuilder_add_char(this->inner.get(), ch);
+}
+inline void ICU4XCodePointSetBuilder::add_u32(uint32_t ch) {
+ capi::ICU4XCodePointSetBuilder_add_u32(this->inner.get(), ch);
+}
+inline void ICU4XCodePointSetBuilder::add_inclusive_range(char32_t start, char32_t end) {
+ capi::ICU4XCodePointSetBuilder_add_inclusive_range(this->inner.get(), start, end);
+}
+inline void ICU4XCodePointSetBuilder::add_inclusive_range_u32(uint32_t start, uint32_t end) {
+ capi::ICU4XCodePointSetBuilder_add_inclusive_range_u32(this->inner.get(), start, end);
+}
+inline void ICU4XCodePointSetBuilder::add_set(const ICU4XCodePointSetData& data) {
+ capi::ICU4XCodePointSetBuilder_add_set(this->inner.get(), data.AsFFI());
+}
+inline void ICU4XCodePointSetBuilder::remove_char(char32_t ch) {
+ capi::ICU4XCodePointSetBuilder_remove_char(this->inner.get(), ch);
+}
+inline void ICU4XCodePointSetBuilder::remove_inclusive_range(char32_t start, char32_t end) {
+ capi::ICU4XCodePointSetBuilder_remove_inclusive_range(this->inner.get(), start, end);
+}
+inline void ICU4XCodePointSetBuilder::remove_set(const ICU4XCodePointSetData& data) {
+ capi::ICU4XCodePointSetBuilder_remove_set(this->inner.get(), data.AsFFI());
+}
+inline void ICU4XCodePointSetBuilder::retain_char(char32_t ch) {
+ capi::ICU4XCodePointSetBuilder_retain_char(this->inner.get(), ch);
+}
+inline void ICU4XCodePointSetBuilder::retain_inclusive_range(char32_t start, char32_t end) {
+ capi::ICU4XCodePointSetBuilder_retain_inclusive_range(this->inner.get(), start, end);
+}
+inline void ICU4XCodePointSetBuilder::retain_set(const ICU4XCodePointSetData& data) {
+ capi::ICU4XCodePointSetBuilder_retain_set(this->inner.get(), data.AsFFI());
+}
+inline void ICU4XCodePointSetBuilder::complement_char(char32_t ch) {
+ capi::ICU4XCodePointSetBuilder_complement_char(this->inner.get(), ch);
+}
+inline void ICU4XCodePointSetBuilder::complement_inclusive_range(char32_t start, char32_t end) {
+ capi::ICU4XCodePointSetBuilder_complement_inclusive_range(this->inner.get(), start, end);
+}
+inline void ICU4XCodePointSetBuilder::complement_set(const ICU4XCodePointSetData& data) {
+ capi::ICU4XCodePointSetBuilder_complement_set(this->inner.get(), data.AsFFI());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCodePointSetData.h b/intl/icu_capi/cpp/include/ICU4XCodePointSetData.h
new file mode 100644
index 0000000000..10356e90b7
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCodePointSetData.h
@@ -0,0 +1,172 @@
+#ifndef ICU4XCodePointSetData_H
+#define ICU4XCodePointSetData_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCodePointSetData ICU4XCodePointSetData;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "CodePointRangeIterator.h"
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XCodePointSetData_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+bool ICU4XCodePointSetData_contains(const ICU4XCodePointSetData* self, char32_t cp);
+
+bool ICU4XCodePointSetData_contains32(const ICU4XCodePointSetData* self, uint32_t cp);
+
+CodePointRangeIterator* ICU4XCodePointSetData_iter_ranges(const ICU4XCodePointSetData* self);
+
+CodePointRangeIterator* ICU4XCodePointSetData_iter_ranges_complemented(const ICU4XCodePointSetData* self);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_for_general_category_group(const ICU4XDataProvider* provider, uint32_t group);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ascii_hex_digit(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_alnum(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_alphabetic(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_bidi_control(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_bidi_mirrored(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_blank(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_cased(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_case_ignorable(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_full_composition_exclusion(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_casefolded(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_casemapped(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_nfkc_casefolded(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_lowercased(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_titlecased(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_uppercased(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_dash(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_deprecated(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_default_ignorable_code_point(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_diacritic(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_modifier_base(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_component(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_modifier(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_presentation(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_extender(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_extended_pictographic(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_graph(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_grapheme_base(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_grapheme_extend(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_grapheme_link(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_hex_digit(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_hyphen(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_id_continue(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ideographic(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_id_start(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ids_binary_operator(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ids_trinary_operator(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_join_control(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_logical_order_exception(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_lowercase(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_math(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_noncharacter_code_point(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfc_inert(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfd_inert(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfkc_inert(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfkd_inert(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_pattern_syntax(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_pattern_white_space(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_prepended_concatenation_mark(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_print(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_quotation_mark(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_radical(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_regional_indicator(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_soft_dotted(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_segment_starter(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_case_sensitive(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_sentence_terminal(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_terminal_punctuation(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_unified_ideograph(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_uppercase(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_variation_selector(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_white_space(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_xdigit(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_xid_continue(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_xid_start(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_for_ecma262(const ICU4XDataProvider* provider, const char* property_name_data, size_t property_name_len);
+void ICU4XCodePointSetData_destroy(ICU4XCodePointSetData* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCodePointSetData.hpp b/intl/icu_capi/cpp/include/ICU4XCodePointSetData.hpp
new file mode 100644
index 0000000000..64b32e2e97
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCodePointSetData.hpp
@@ -0,0 +1,1109 @@
+#ifndef ICU4XCodePointSetData_HPP
+#define ICU4XCodePointSetData_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCodePointSetData.h"
+
+class CodePointRangeIterator;
+class ICU4XDataProvider;
+class ICU4XCodePointSetData;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XCodePointSetData with std::unique_ptr.
+ */
+struct ICU4XCodePointSetDataDeleter {
+ void operator()(capi::ICU4XCodePointSetData* l) const noexcept {
+ capi::ICU4XCodePointSetData_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property.
+ *
+ * See the [Rust documentation for `properties`](https://docs.rs/icu/latest/icu/properties/index.html) for more information.
+ *
+ * See the [Rust documentation for `CodePointSetData`](https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetData.html) for more information.
+ *
+ * See the [Rust documentation for `CodePointSetDataBorrowed`](https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html) for more information.
+ */
+class ICU4XCodePointSetData {
+ public:
+
+ /**
+ * Checks whether the code point is in the set.
+ *
+ * See the [Rust documentation for `contains`](https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.contains) for more information.
+ */
+ bool contains(char32_t cp) const;
+
+ /**
+ * Checks whether the code point (specified as a 32 bit integer, in UTF-32) is in the set.
+ */
+ bool contains32(uint32_t cp) const;
+
+ /**
+ * Produces an iterator over ranges of code points contained in this set
+ *
+ * See the [Rust documentation for `iter_ranges`](https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.iter_ranges) for more information.
+ *
+ * Lifetimes: `this` must live at least as long as the output.
+ */
+ CodePointRangeIterator iter_ranges() const;
+
+ /**
+ * Produces an iterator over ranges of code points not contained in this set
+ *
+ * See the [Rust documentation for `iter_ranges_complemented`](https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.iter_ranges_complemented) for more information.
+ *
+ * Lifetimes: `this` must live at least as long as the output.
+ */
+ CodePointRangeIterator iter_ranges_complemented() const;
+
+ /**
+ * which is a mask with the same format as the `U_GC_XX_MASK` mask in ICU4C
+ *
+ * See the [Rust documentation for `for_general_category_group`](https://docs.rs/icu/latest/icu/properties/sets/fn.for_general_category_group.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_for_general_category_group(const ICU4XDataProvider& provider, uint32_t group);
+
+ /**
+ * See the [Rust documentation for `ascii_hex_digit`](https://docs.rs/icu/latest/icu/properties/sets/fn.ascii_hex_digit.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_ascii_hex_digit(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `alnum`](https://docs.rs/icu/latest/icu/properties/sets/fn.alnum.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_alnum(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `alphabetic`](https://docs.rs/icu/latest/icu/properties/sets/fn.alphabetic.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_alphabetic(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `bidi_control`](https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_control.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_bidi_control(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `bidi_mirrored`](https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_mirrored.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_bidi_mirrored(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `blank`](https://docs.rs/icu/latest/icu/properties/sets/fn.blank.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_blank(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `cased`](https://docs.rs/icu/latest/icu/properties/sets/fn.cased.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_cased(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `case_ignorable`](https://docs.rs/icu/latest/icu/properties/sets/fn.case_ignorable.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_case_ignorable(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `full_composition_exclusion`](https://docs.rs/icu/latest/icu/properties/sets/fn.full_composition_exclusion.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_full_composition_exclusion(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `changes_when_casefolded`](https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casefolded.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_changes_when_casefolded(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `changes_when_casemapped`](https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casemapped.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_changes_when_casemapped(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `changes_when_nfkc_casefolded`](https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_nfkc_casefolded.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_changes_when_nfkc_casefolded(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `changes_when_lowercased`](https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_lowercased.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_changes_when_lowercased(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `changes_when_titlecased`](https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_titlecased.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_changes_when_titlecased(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `changes_when_uppercased`](https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_uppercased.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_changes_when_uppercased(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `dash`](https://docs.rs/icu/latest/icu/properties/sets/fn.dash.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_dash(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `deprecated`](https://docs.rs/icu/latest/icu/properties/sets/fn.deprecated.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_deprecated(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `default_ignorable_code_point`](https://docs.rs/icu/latest/icu/properties/sets/fn.default_ignorable_code_point.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_default_ignorable_code_point(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `diacritic`](https://docs.rs/icu/latest/icu/properties/sets/fn.diacritic.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_diacritic(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `emoji_modifier_base`](https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier_base.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_emoji_modifier_base(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `emoji_component`](https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_component.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_emoji_component(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `emoji_modifier`](https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_emoji_modifier(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `emoji`](https://docs.rs/icu/latest/icu/properties/sets/fn.emoji.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_emoji(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `emoji_presentation`](https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_presentation.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_emoji_presentation(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `extender`](https://docs.rs/icu/latest/icu/properties/sets/fn.extender.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_extender(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `extended_pictographic`](https://docs.rs/icu/latest/icu/properties/sets/fn.extended_pictographic.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_extended_pictographic(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `graph`](https://docs.rs/icu/latest/icu/properties/sets/fn.graph.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_graph(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `grapheme_base`](https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_base.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_grapheme_base(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `grapheme_extend`](https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_extend.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_grapheme_extend(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `grapheme_link`](https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_link.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_grapheme_link(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `hex_digit`](https://docs.rs/icu/latest/icu/properties/sets/fn.hex_digit.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_hex_digit(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `hyphen`](https://docs.rs/icu/latest/icu/properties/sets/fn.hyphen.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_hyphen(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `id_continue`](https://docs.rs/icu/latest/icu/properties/sets/fn.id_continue.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_id_continue(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `ideographic`](https://docs.rs/icu/latest/icu/properties/sets/fn.ideographic.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_ideographic(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `id_start`](https://docs.rs/icu/latest/icu/properties/sets/fn.id_start.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_id_start(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `ids_binary_operator`](https://docs.rs/icu/latest/icu/properties/sets/fn.ids_binary_operator.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_ids_binary_operator(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `ids_trinary_operator`](https://docs.rs/icu/latest/icu/properties/sets/fn.ids_trinary_operator.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_ids_trinary_operator(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `join_control`](https://docs.rs/icu/latest/icu/properties/sets/fn.join_control.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_join_control(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `logical_order_exception`](https://docs.rs/icu/latest/icu/properties/sets/fn.logical_order_exception.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_logical_order_exception(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `lowercase`](https://docs.rs/icu/latest/icu/properties/sets/fn.lowercase.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_lowercase(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `math`](https://docs.rs/icu/latest/icu/properties/sets/fn.math.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_math(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `noncharacter_code_point`](https://docs.rs/icu/latest/icu/properties/sets/fn.noncharacter_code_point.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_noncharacter_code_point(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `nfc_inert`](https://docs.rs/icu/latest/icu/properties/sets/fn.nfc_inert.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_nfc_inert(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `nfd_inert`](https://docs.rs/icu/latest/icu/properties/sets/fn.nfd_inert.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_nfd_inert(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `nfkc_inert`](https://docs.rs/icu/latest/icu/properties/sets/fn.nfkc_inert.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_nfkc_inert(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `nfkd_inert`](https://docs.rs/icu/latest/icu/properties/sets/fn.nfkd_inert.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_nfkd_inert(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `pattern_syntax`](https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_syntax.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_pattern_syntax(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `pattern_white_space`](https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_white_space.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_pattern_white_space(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `prepended_concatenation_mark`](https://docs.rs/icu/latest/icu/properties/sets/fn.prepended_concatenation_mark.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_prepended_concatenation_mark(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `print`](https://docs.rs/icu/latest/icu/properties/sets/fn.print.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_print(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `quotation_mark`](https://docs.rs/icu/latest/icu/properties/sets/fn.quotation_mark.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_quotation_mark(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `radical`](https://docs.rs/icu/latest/icu/properties/sets/fn.radical.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_radical(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `regional_indicator`](https://docs.rs/icu/latest/icu/properties/sets/fn.regional_indicator.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_regional_indicator(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `soft_dotted`](https://docs.rs/icu/latest/icu/properties/sets/fn.soft_dotted.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_soft_dotted(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `segment_starter`](https://docs.rs/icu/latest/icu/properties/sets/fn.segment_starter.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_segment_starter(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `case_sensitive`](https://docs.rs/icu/latest/icu/properties/sets/fn.case_sensitive.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_case_sensitive(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `sentence_terminal`](https://docs.rs/icu/latest/icu/properties/sets/fn.sentence_terminal.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_sentence_terminal(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `terminal_punctuation`](https://docs.rs/icu/latest/icu/properties/sets/fn.terminal_punctuation.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_terminal_punctuation(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `unified_ideograph`](https://docs.rs/icu/latest/icu/properties/sets/fn.unified_ideograph.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_unified_ideograph(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `uppercase`](https://docs.rs/icu/latest/icu/properties/sets/fn.uppercase.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_uppercase(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `variation_selector`](https://docs.rs/icu/latest/icu/properties/sets/fn.variation_selector.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_variation_selector(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `white_space`](https://docs.rs/icu/latest/icu/properties/sets/fn.white_space.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_white_space(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `xdigit`](https://docs.rs/icu/latest/icu/properties/sets/fn.xdigit.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_xdigit(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `xid_continue`](https://docs.rs/icu/latest/icu/properties/sets/fn.xid_continue.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_xid_continue(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `xid_start`](https://docs.rs/icu/latest/icu/properties/sets/fn.xid_start.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_xid_start(const ICU4XDataProvider& provider);
+
+ /**
+ * Loads data for a property specified as a string as long as it is one of the
+ * [ECMA-262 binary properties][ecma] (not including Any, ASCII, and Assigned pseudoproperties).
+ *
+ * Returns `ICU4XError::PropertyUnexpectedPropertyNameError` in case the string does not
+ * match any property in the list
+ *
+ * [ecma]: https://tc39.es/ecma262/#table-binary-unicode-properties
+ *
+ * See the [Rust documentation for `for_ecma262`](https://docs.rs/icu/latest/icu/properties/sets/fn.for_ecma262.html) for more information.
+ */
+ static diplomat::result<ICU4XCodePointSetData, ICU4XError> load_for_ecma262(const ICU4XDataProvider& provider, const std::string_view property_name);
+ inline const capi::ICU4XCodePointSetData* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XCodePointSetData* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XCodePointSetData(capi::ICU4XCodePointSetData* i) : inner(i) {}
+ ICU4XCodePointSetData() = default;
+ ICU4XCodePointSetData(ICU4XCodePointSetData&&) noexcept = default;
+ ICU4XCodePointSetData& operator=(ICU4XCodePointSetData&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XCodePointSetData, ICU4XCodePointSetDataDeleter> inner;
+};
+
+#include "CodePointRangeIterator.hpp"
+#include "ICU4XDataProvider.hpp"
+
+inline bool ICU4XCodePointSetData::contains(char32_t cp) const {
+ return capi::ICU4XCodePointSetData_contains(this->inner.get(), cp);
+}
+inline bool ICU4XCodePointSetData::contains32(uint32_t cp) const {
+ return capi::ICU4XCodePointSetData_contains32(this->inner.get(), cp);
+}
+inline CodePointRangeIterator ICU4XCodePointSetData::iter_ranges() const {
+ return CodePointRangeIterator(capi::ICU4XCodePointSetData_iter_ranges(this->inner.get()));
+}
+inline CodePointRangeIterator ICU4XCodePointSetData::iter_ranges_complemented() const {
+ return CodePointRangeIterator(capi::ICU4XCodePointSetData_iter_ranges_complemented(this->inner.get()));
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_for_general_category_group(const ICU4XDataProvider& provider, uint32_t group) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_for_general_category_group(provider.AsFFI(), group);
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_ascii_hex_digit(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_ascii_hex_digit(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_alnum(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_alnum(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_alphabetic(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_alphabetic(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_bidi_control(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_bidi_control(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_bidi_mirrored(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_bidi_mirrored(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_blank(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_blank(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_cased(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_cased(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_case_ignorable(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_case_ignorable(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_full_composition_exclusion(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_full_composition_exclusion(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_changes_when_casefolded(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_changes_when_casefolded(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_changes_when_casemapped(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_changes_when_casemapped(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_changes_when_nfkc_casefolded(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_changes_when_nfkc_casefolded(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_changes_when_lowercased(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_changes_when_lowercased(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_changes_when_titlecased(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_changes_when_titlecased(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_changes_when_uppercased(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_changes_when_uppercased(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_dash(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_dash(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_deprecated(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_deprecated(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_default_ignorable_code_point(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_default_ignorable_code_point(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_diacritic(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_diacritic(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_emoji_modifier_base(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_emoji_modifier_base(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_emoji_component(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_emoji_component(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_emoji_modifier(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_emoji_modifier(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_emoji(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_emoji(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_emoji_presentation(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_emoji_presentation(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_extender(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_extender(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_extended_pictographic(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_extended_pictographic(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_graph(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_graph(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_grapheme_base(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_grapheme_base(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_grapheme_extend(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_grapheme_extend(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_grapheme_link(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_grapheme_link(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_hex_digit(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_hex_digit(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_hyphen(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_hyphen(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_id_continue(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_id_continue(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_ideographic(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_ideographic(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_id_start(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_id_start(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_ids_binary_operator(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_ids_binary_operator(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_ids_trinary_operator(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_ids_trinary_operator(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_join_control(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_join_control(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_logical_order_exception(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_logical_order_exception(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_lowercase(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_lowercase(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_math(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_math(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_noncharacter_code_point(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_noncharacter_code_point(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_nfc_inert(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_nfc_inert(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_nfd_inert(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_nfd_inert(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_nfkc_inert(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_nfkc_inert(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_nfkd_inert(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_nfkd_inert(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_pattern_syntax(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_pattern_syntax(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_pattern_white_space(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_pattern_white_space(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_prepended_concatenation_mark(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_prepended_concatenation_mark(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_print(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_print(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_quotation_mark(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_quotation_mark(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_radical(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_radical(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_regional_indicator(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_regional_indicator(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_soft_dotted(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_soft_dotted(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_segment_starter(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_segment_starter(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_case_sensitive(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_case_sensitive(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_sentence_terminal(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_sentence_terminal(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_terminal_punctuation(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_terminal_punctuation(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_unified_ideograph(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_unified_ideograph(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_uppercase(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_uppercase(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_variation_selector(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_variation_selector(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_white_space(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_white_space(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_xdigit(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_xdigit(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_xid_continue(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_xid_continue(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_xid_start(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_xid_start(provider.AsFFI());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XCodePointSetData, ICU4XError> ICU4XCodePointSetData::load_for_ecma262(const ICU4XDataProvider& provider, const std::string_view property_name) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCodePointSetData_load_for_ecma262(provider.AsFFI(), property_name.data(), property_name.size());
+ diplomat::result<ICU4XCodePointSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCodePointSetData>(ICU4XCodePointSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollator.h b/intl/icu_capi/cpp/include/ICU4XCollator.h
new file mode 100644
index 0000000000..973c2cedd9
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollator.h
@@ -0,0 +1,40 @@
+#ifndef ICU4XCollator_H
+#define ICU4XCollator_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCollator ICU4XCollator;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XCollatorOptionsV1.h"
+#include "diplomat_result_box_ICU4XCollator_ICU4XError.h"
+#include "ICU4XOrdering.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCollator_ICU4XError ICU4XCollator_create_v1(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XCollatorOptionsV1 options);
+
+ICU4XOrdering ICU4XCollator_compare(const ICU4XCollator* self, const char* left_data, size_t left_len, const char* right_data, size_t right_len);
+
+ICU4XOrdering ICU4XCollator_compare_valid_utf8(const ICU4XCollator* self, const char* left_data, size_t left_len, const char* right_data, size_t right_len);
+
+ICU4XOrdering ICU4XCollator_compare_utf16(const ICU4XCollator* self, const uint16_t* left_data, size_t left_len, const uint16_t* right_data, size_t right_len);
+void ICU4XCollator_destroy(ICU4XCollator* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollator.hpp b/intl/icu_capi/cpp/include/ICU4XCollator.hpp
new file mode 100644
index 0000000000..d661661f5a
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollator.hpp
@@ -0,0 +1,105 @@
+#ifndef ICU4XCollator_HPP
+#define ICU4XCollator_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCollator.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+struct ICU4XCollatorOptionsV1;
+class ICU4XCollator;
+#include "ICU4XError.hpp"
+#include "ICU4XOrdering.hpp"
+
+/**
+ * A destruction policy for using ICU4XCollator with std::unique_ptr.
+ */
+struct ICU4XCollatorDeleter {
+ void operator()(capi::ICU4XCollator* l) const noexcept {
+ capi::ICU4XCollator_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `Collator`](https://docs.rs/icu/latest/icu/collator/struct.Collator.html) for more information.
+ */
+class ICU4XCollator {
+ public:
+
+ /**
+ * Construct a new Collator instance.
+ *
+ * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.try_new) for more information.
+ */
+ static diplomat::result<ICU4XCollator, ICU4XError> create_v1(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XCollatorOptionsV1 options);
+
+ /**
+ * Compare potentially ill-formed UTF-8 strings.
+ *
+ * Ill-formed input is compared
+ * as if errors had been replaced with REPLACEMENT CHARACTERs according
+ * to the WHATWG Encoding Standard.
+ *
+ * See the [Rust documentation for `compare_utf8`](https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf8) for more information.
+ */
+ ICU4XOrdering compare(const std::string_view left, const std::string_view right) const;
+
+ /**
+ * Compare guaranteed well-formed UTF-8 strings.
+ *
+ * Note: In C++, passing ill-formed UTF-8 strings is undefined behavior
+ * (and may be memory-unsafe to do so, too).
+ *
+ * See the [Rust documentation for `compare`](https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare) for more information.
+ */
+ ICU4XOrdering compare_valid_utf8(const std::string_view left, const std::string_view right) const;
+
+ /**
+ * Compare potentially ill-formed UTF-16 strings, with unpaired surrogates
+ * compared as REPLACEMENT CHARACTER.
+ *
+ * See the [Rust documentation for `compare_utf16`](https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf16) for more information.
+ */
+ ICU4XOrdering compare_utf16(const diplomat::span<const uint16_t> left, const diplomat::span<const uint16_t> right) const;
+ inline const capi::ICU4XCollator* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XCollator* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XCollator(capi::ICU4XCollator* i) : inner(i) {}
+ ICU4XCollator() = default;
+ ICU4XCollator(ICU4XCollator&&) noexcept = default;
+ ICU4XCollator& operator=(ICU4XCollator&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XCollator, ICU4XCollatorDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+#include "ICU4XCollatorOptionsV1.hpp"
+
+inline diplomat::result<ICU4XCollator, ICU4XError> ICU4XCollator::create_v1(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XCollatorOptionsV1 options) {
+ ICU4XCollatorOptionsV1 diplomat_wrapped_struct_options = options;
+ auto diplomat_result_raw_out_value = capi::ICU4XCollator_create_v1(provider.AsFFI(), locale.AsFFI(), capi::ICU4XCollatorOptionsV1{ .strength = static_cast<capi::ICU4XCollatorStrength>(diplomat_wrapped_struct_options.strength), .alternate_handling = static_cast<capi::ICU4XCollatorAlternateHandling>(diplomat_wrapped_struct_options.alternate_handling), .case_first = static_cast<capi::ICU4XCollatorCaseFirst>(diplomat_wrapped_struct_options.case_first), .max_variable = static_cast<capi::ICU4XCollatorMaxVariable>(diplomat_wrapped_struct_options.max_variable), .case_level = static_cast<capi::ICU4XCollatorCaseLevel>(diplomat_wrapped_struct_options.case_level), .numeric = static_cast<capi::ICU4XCollatorNumeric>(diplomat_wrapped_struct_options.numeric), .backward_second_level = static_cast<capi::ICU4XCollatorBackwardSecondLevel>(diplomat_wrapped_struct_options.backward_second_level) });
+ diplomat::result<ICU4XCollator, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCollator>(ICU4XCollator(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XOrdering ICU4XCollator::compare(const std::string_view left, const std::string_view right) const {
+ return static_cast<ICU4XOrdering>(capi::ICU4XCollator_compare(this->inner.get(), left.data(), left.size(), right.data(), right.size()));
+}
+inline ICU4XOrdering ICU4XCollator::compare_valid_utf8(const std::string_view left, const std::string_view right) const {
+ return static_cast<ICU4XOrdering>(capi::ICU4XCollator_compare_valid_utf8(this->inner.get(), left.data(), left.size(), right.data(), right.size()));
+}
+inline ICU4XOrdering ICU4XCollator::compare_utf16(const diplomat::span<const uint16_t> left, const diplomat::span<const uint16_t> right) const {
+ return static_cast<ICU4XOrdering>(capi::ICU4XCollator_compare_utf16(this->inner.get(), left.data(), left.size(), right.data(), right.size()));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorAlternateHandling.h b/intl/icu_capi/cpp/include/ICU4XCollatorAlternateHandling.h
new file mode 100644
index 0000000000..dfc3d595eb
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorAlternateHandling.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XCollatorAlternateHandling_H
+#define ICU4XCollatorAlternateHandling_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XCollatorAlternateHandling {
+ ICU4XCollatorAlternateHandling_Auto = 0,
+ ICU4XCollatorAlternateHandling_NonIgnorable = 1,
+ ICU4XCollatorAlternateHandling_Shifted = 2,
+} ICU4XCollatorAlternateHandling;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorAlternateHandling_destroy(ICU4XCollatorAlternateHandling* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorAlternateHandling.hpp b/intl/icu_capi/cpp/include/ICU4XCollatorAlternateHandling.hpp
new file mode 100644
index 0000000000..957bdac780
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorAlternateHandling.hpp
@@ -0,0 +1,25 @@
+#ifndef ICU4XCollatorAlternateHandling_HPP
+#define ICU4XCollatorAlternateHandling_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCollatorAlternateHandling.h"
+
+
+
+/**
+ * See the [Rust documentation for `AlternateHandling`](https://docs.rs/icu/latest/icu/collator/enum.AlternateHandling.html) for more information.
+ */
+enum struct ICU4XCollatorAlternateHandling {
+ Auto = 0,
+ NonIgnorable = 1,
+ Shifted = 2,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorBackwardSecondLevel.h b/intl/icu_capi/cpp/include/ICU4XCollatorBackwardSecondLevel.h
new file mode 100644
index 0000000000..659f9b2f10
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorBackwardSecondLevel.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XCollatorBackwardSecondLevel_H
+#define ICU4XCollatorBackwardSecondLevel_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XCollatorBackwardSecondLevel {
+ ICU4XCollatorBackwardSecondLevel_Auto = 0,
+ ICU4XCollatorBackwardSecondLevel_Off = 1,
+ ICU4XCollatorBackwardSecondLevel_On = 2,
+} ICU4XCollatorBackwardSecondLevel;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorBackwardSecondLevel_destroy(ICU4XCollatorBackwardSecondLevel* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorBackwardSecondLevel.hpp b/intl/icu_capi/cpp/include/ICU4XCollatorBackwardSecondLevel.hpp
new file mode 100644
index 0000000000..7bd601a59f
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorBackwardSecondLevel.hpp
@@ -0,0 +1,25 @@
+#ifndef ICU4XCollatorBackwardSecondLevel_HPP
+#define ICU4XCollatorBackwardSecondLevel_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCollatorBackwardSecondLevel.h"
+
+
+
+/**
+ * See the [Rust documentation for `BackwardSecondLevel`](https://docs.rs/icu/latest/icu/collator/enum.BackwardSecondLevel.html) for more information.
+ */
+enum struct ICU4XCollatorBackwardSecondLevel {
+ Auto = 0,
+ Off = 1,
+ On = 2,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorCaseFirst.h b/intl/icu_capi/cpp/include/ICU4XCollatorCaseFirst.h
new file mode 100644
index 0000000000..c01eb216d0
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorCaseFirst.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XCollatorCaseFirst_H
+#define ICU4XCollatorCaseFirst_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XCollatorCaseFirst {
+ ICU4XCollatorCaseFirst_Auto = 0,
+ ICU4XCollatorCaseFirst_Off = 1,
+ ICU4XCollatorCaseFirst_LowerFirst = 2,
+ ICU4XCollatorCaseFirst_UpperFirst = 3,
+} ICU4XCollatorCaseFirst;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorCaseFirst_destroy(ICU4XCollatorCaseFirst* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorCaseFirst.hpp b/intl/icu_capi/cpp/include/ICU4XCollatorCaseFirst.hpp
new file mode 100644
index 0000000000..680e3e9f9a
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorCaseFirst.hpp
@@ -0,0 +1,26 @@
+#ifndef ICU4XCollatorCaseFirst_HPP
+#define ICU4XCollatorCaseFirst_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCollatorCaseFirst.h"
+
+
+
+/**
+ * See the [Rust documentation for `CaseFirst`](https://docs.rs/icu/latest/icu/collator/enum.CaseFirst.html) for more information.
+ */
+enum struct ICU4XCollatorCaseFirst {
+ Auto = 0,
+ Off = 1,
+ LowerFirst = 2,
+ UpperFirst = 3,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorCaseLevel.h b/intl/icu_capi/cpp/include/ICU4XCollatorCaseLevel.h
new file mode 100644
index 0000000000..cbf6865967
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorCaseLevel.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XCollatorCaseLevel_H
+#define ICU4XCollatorCaseLevel_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XCollatorCaseLevel {
+ ICU4XCollatorCaseLevel_Auto = 0,
+ ICU4XCollatorCaseLevel_Off = 1,
+ ICU4XCollatorCaseLevel_On = 2,
+} ICU4XCollatorCaseLevel;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorCaseLevel_destroy(ICU4XCollatorCaseLevel* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorCaseLevel.hpp b/intl/icu_capi/cpp/include/ICU4XCollatorCaseLevel.hpp
new file mode 100644
index 0000000000..849f891591
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorCaseLevel.hpp
@@ -0,0 +1,25 @@
+#ifndef ICU4XCollatorCaseLevel_HPP
+#define ICU4XCollatorCaseLevel_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCollatorCaseLevel.h"
+
+
+
+/**
+ * See the [Rust documentation for `CaseLevel`](https://docs.rs/icu/latest/icu/collator/enum.CaseLevel.html) for more information.
+ */
+enum struct ICU4XCollatorCaseLevel {
+ Auto = 0,
+ Off = 1,
+ On = 2,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorMaxVariable.h b/intl/icu_capi/cpp/include/ICU4XCollatorMaxVariable.h
new file mode 100644
index 0000000000..0e5a3a516f
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorMaxVariable.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XCollatorMaxVariable_H
+#define ICU4XCollatorMaxVariable_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XCollatorMaxVariable {
+ ICU4XCollatorMaxVariable_Auto = 0,
+ ICU4XCollatorMaxVariable_Space = 1,
+ ICU4XCollatorMaxVariable_Punctuation = 2,
+ ICU4XCollatorMaxVariable_Symbol = 3,
+ ICU4XCollatorMaxVariable_Currency = 4,
+} ICU4XCollatorMaxVariable;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorMaxVariable_destroy(ICU4XCollatorMaxVariable* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorMaxVariable.hpp b/intl/icu_capi/cpp/include/ICU4XCollatorMaxVariable.hpp
new file mode 100644
index 0000000000..6092118851
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorMaxVariable.hpp
@@ -0,0 +1,27 @@
+#ifndef ICU4XCollatorMaxVariable_HPP
+#define ICU4XCollatorMaxVariable_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCollatorMaxVariable.h"
+
+
+
+/**
+ * See the [Rust documentation for `MaxVariable`](https://docs.rs/icu/latest/icu/collator/enum.MaxVariable.html) for more information.
+ */
+enum struct ICU4XCollatorMaxVariable {
+ Auto = 0,
+ Space = 1,
+ Punctuation = 2,
+ Symbol = 3,
+ Currency = 4,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorNumeric.h b/intl/icu_capi/cpp/include/ICU4XCollatorNumeric.h
new file mode 100644
index 0000000000..4dd2ec0408
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorNumeric.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XCollatorNumeric_H
+#define ICU4XCollatorNumeric_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XCollatorNumeric {
+ ICU4XCollatorNumeric_Auto = 0,
+ ICU4XCollatorNumeric_Off = 1,
+ ICU4XCollatorNumeric_On = 2,
+} ICU4XCollatorNumeric;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorNumeric_destroy(ICU4XCollatorNumeric* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorNumeric.hpp b/intl/icu_capi/cpp/include/ICU4XCollatorNumeric.hpp
new file mode 100644
index 0000000000..1c60a7102f
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorNumeric.hpp
@@ -0,0 +1,25 @@
+#ifndef ICU4XCollatorNumeric_HPP
+#define ICU4XCollatorNumeric_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCollatorNumeric.h"
+
+
+
+/**
+ * See the [Rust documentation for `Numeric`](https://docs.rs/icu/latest/icu/collator/enum.Numeric.html) for more information.
+ */
+enum struct ICU4XCollatorNumeric {
+ Auto = 0,
+ Off = 1,
+ On = 2,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorOptionsV1.h b/intl/icu_capi/cpp/include/ICU4XCollatorOptionsV1.h
new file mode 100644
index 0000000000..dc73557efe
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorOptionsV1.h
@@ -0,0 +1,50 @@
+#ifndef ICU4XCollatorOptionsV1_H
+#define ICU4XCollatorOptionsV1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XCollatorStrength.h"
+#include "ICU4XCollatorAlternateHandling.h"
+#include "ICU4XCollatorCaseFirst.h"
+#include "ICU4XCollatorMaxVariable.h"
+#include "ICU4XCollatorCaseLevel.h"
+#include "ICU4XCollatorNumeric.h"
+#include "ICU4XCollatorBackwardSecondLevel.h"
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCollatorOptionsV1 {
+ ICU4XCollatorStrength strength;
+ ICU4XCollatorAlternateHandling alternate_handling;
+ ICU4XCollatorCaseFirst case_first;
+ ICU4XCollatorMaxVariable max_variable;
+ ICU4XCollatorCaseLevel case_level;
+ ICU4XCollatorNumeric numeric;
+ ICU4XCollatorBackwardSecondLevel backward_second_level;
+} ICU4XCollatorOptionsV1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XCollatorStrength.h"
+#include "ICU4XCollatorAlternateHandling.h"
+#include "ICU4XCollatorCaseFirst.h"
+#include "ICU4XCollatorMaxVariable.h"
+#include "ICU4XCollatorCaseLevel.h"
+#include "ICU4XCollatorNumeric.h"
+#include "ICU4XCollatorBackwardSecondLevel.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorOptionsV1_destroy(ICU4XCollatorOptionsV1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorOptionsV1.hpp b/intl/icu_capi/cpp/include/ICU4XCollatorOptionsV1.hpp
new file mode 100644
index 0000000000..cc646c2154
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorOptionsV1.hpp
@@ -0,0 +1,38 @@
+#ifndef ICU4XCollatorOptionsV1_HPP
+#define ICU4XCollatorOptionsV1_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCollatorOptionsV1.h"
+
+#include "ICU4XCollatorStrength.hpp"
+#include "ICU4XCollatorAlternateHandling.hpp"
+#include "ICU4XCollatorCaseFirst.hpp"
+#include "ICU4XCollatorMaxVariable.hpp"
+#include "ICU4XCollatorCaseLevel.hpp"
+#include "ICU4XCollatorNumeric.hpp"
+#include "ICU4XCollatorBackwardSecondLevel.hpp"
+
+
+/**
+ * See the [Rust documentation for `CollatorOptions`](https://docs.rs/icu/latest/icu/collator/struct.CollatorOptions.html) for more information.
+ */
+struct ICU4XCollatorOptionsV1 {
+ public:
+ ICU4XCollatorStrength strength;
+ ICU4XCollatorAlternateHandling alternate_handling;
+ ICU4XCollatorCaseFirst case_first;
+ ICU4XCollatorMaxVariable max_variable;
+ ICU4XCollatorCaseLevel case_level;
+ ICU4XCollatorNumeric numeric;
+ ICU4XCollatorBackwardSecondLevel backward_second_level;
+};
+
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorStrength.h b/intl/icu_capi/cpp/include/ICU4XCollatorStrength.h
new file mode 100644
index 0000000000..f230214feb
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorStrength.h
@@ -0,0 +1,35 @@
+#ifndef ICU4XCollatorStrength_H
+#define ICU4XCollatorStrength_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XCollatorStrength {
+ ICU4XCollatorStrength_Auto = 0,
+ ICU4XCollatorStrength_Primary = 1,
+ ICU4XCollatorStrength_Secondary = 2,
+ ICU4XCollatorStrength_Tertiary = 3,
+ ICU4XCollatorStrength_Quaternary = 4,
+ ICU4XCollatorStrength_Identical = 5,
+} ICU4XCollatorStrength;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XCollatorStrength_destroy(ICU4XCollatorStrength* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCollatorStrength.hpp b/intl/icu_capi/cpp/include/ICU4XCollatorStrength.hpp
new file mode 100644
index 0000000000..3fdebcd1f4
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCollatorStrength.hpp
@@ -0,0 +1,28 @@
+#ifndef ICU4XCollatorStrength_HPP
+#define ICU4XCollatorStrength_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCollatorStrength.h"
+
+
+
+/**
+ * See the [Rust documentation for `Strength`](https://docs.rs/icu/latest/icu/collator/enum.Strength.html) for more information.
+ */
+enum struct ICU4XCollatorStrength {
+ Auto = 0,
+ Primary = 1,
+ Secondary = 2,
+ Tertiary = 3,
+ Quaternary = 4,
+ Identical = 5,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XComposingNormalizer.h b/intl/icu_capi/cpp/include/ICU4XComposingNormalizer.h
new file mode 100644
index 0000000000..1798af0d8e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XComposingNormalizer.h
@@ -0,0 +1,38 @@
+#ifndef ICU4XComposingNormalizer_H
+#define ICU4XComposingNormalizer_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XComposingNormalizer ICU4XComposingNormalizer;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XComposingNormalizer_ICU4XError ICU4XComposingNormalizer_create_nfc(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XComposingNormalizer_ICU4XError ICU4XComposingNormalizer_create_nfkc(const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XComposingNormalizer_normalize(const ICU4XComposingNormalizer* self, const char* s_data, size_t s_len, DiplomatWriteable* write);
+
+bool ICU4XComposingNormalizer_is_normalized(const ICU4XComposingNormalizer* self, const char* s_data, size_t s_len);
+void ICU4XComposingNormalizer_destroy(ICU4XComposingNormalizer* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XComposingNormalizer.hpp b/intl/icu_capi/cpp/include/ICU4XComposingNormalizer.hpp
new file mode 100644
index 0000000000..c1a1dcc417
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XComposingNormalizer.hpp
@@ -0,0 +1,131 @@
+#ifndef ICU4XComposingNormalizer_HPP
+#define ICU4XComposingNormalizer_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XComposingNormalizer.h"
+
+class ICU4XDataProvider;
+class ICU4XComposingNormalizer;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XComposingNormalizer with std::unique_ptr.
+ */
+struct ICU4XComposingNormalizerDeleter {
+ void operator()(capi::ICU4XComposingNormalizer* l) const noexcept {
+ capi::ICU4XComposingNormalizer_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `ComposingNormalizer`](https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html) for more information.
+ */
+class ICU4XComposingNormalizer {
+ public:
+
+ /**
+ * Construct a new ICU4XComposingNormalizer instance for NFC
+ *
+ * See the [Rust documentation for `new_nfc`](https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfc) for more information.
+ */
+ static diplomat::result<ICU4XComposingNormalizer, ICU4XError> create_nfc(const ICU4XDataProvider& provider);
+
+ /**
+ * Construct a new ICU4XComposingNormalizer instance for NFKC
+ *
+ * See the [Rust documentation for `new_nfkc`](https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfkc) for more information.
+ */
+ static diplomat::result<ICU4XComposingNormalizer, ICU4XError> create_nfkc(const ICU4XDataProvider& provider);
+
+ /**
+ * Normalize a (potentially ill-formed) UTF8 string
+ *
+ * Errors are mapped to REPLACEMENT CHARACTER
+ *
+ * See the [Rust documentation for `normalize_utf8`](https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.normalize_utf8) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> normalize_to_writeable(const std::string_view s, W& write) const;
+
+ /**
+ * Normalize a (potentially ill-formed) UTF8 string
+ *
+ * Errors are mapped to REPLACEMENT CHARACTER
+ *
+ * See the [Rust documentation for `normalize_utf8`](https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.normalize_utf8) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> normalize(const std::string_view s) const;
+
+ /**
+ * Check if a (potentially ill-formed) UTF8 string is normalized
+ *
+ * Errors are mapped to REPLACEMENT CHARACTER
+ *
+ * See the [Rust documentation for `is_normalized_utf8`](https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.is_normalized_utf8) for more information.
+ */
+ bool is_normalized(const std::string_view s) const;
+ inline const capi::ICU4XComposingNormalizer* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XComposingNormalizer* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XComposingNormalizer(capi::ICU4XComposingNormalizer* i) : inner(i) {}
+ ICU4XComposingNormalizer() = default;
+ ICU4XComposingNormalizer(ICU4XComposingNormalizer&&) noexcept = default;
+ ICU4XComposingNormalizer& operator=(ICU4XComposingNormalizer&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XComposingNormalizer, ICU4XComposingNormalizerDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+
+inline diplomat::result<ICU4XComposingNormalizer, ICU4XError> ICU4XComposingNormalizer::create_nfc(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XComposingNormalizer_create_nfc(provider.AsFFI());
+ diplomat::result<ICU4XComposingNormalizer, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XComposingNormalizer>(ICU4XComposingNormalizer(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XComposingNormalizer, ICU4XError> ICU4XComposingNormalizer::create_nfkc(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XComposingNormalizer_create_nfkc(provider.AsFFI());
+ diplomat::result<ICU4XComposingNormalizer, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XComposingNormalizer>(ICU4XComposingNormalizer(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XComposingNormalizer::normalize_to_writeable(const std::string_view s, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XComposingNormalizer_normalize(this->inner.get(), s.data(), s.size(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XComposingNormalizer::normalize(const std::string_view s) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XComposingNormalizer_normalize(this->inner.get(), s.data(), s.size(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+inline bool ICU4XComposingNormalizer::is_normalized(const std::string_view s) const {
+ return capi::ICU4XComposingNormalizer_is_normalized(this->inner.get(), s.data(), s.size());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCustomTimeZone.h b/intl/icu_capi/cpp/include/ICU4XCustomTimeZone.h
new file mode 100644
index 0000000000..422b7fa382
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCustomTimeZone.h
@@ -0,0 +1,84 @@
+#ifndef ICU4XCustomTimeZone_H
+#define ICU4XCustomTimeZone_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XCustomTimeZone ICU4XCustomTimeZone;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "diplomat_result_int32_t_ICU4XError.h"
+#include "diplomat_result_bool_ICU4XError.h"
+#include "ICU4XIanaToBcp47Mapper.h"
+#include "ICU4XMetazoneCalculator.h"
+#include "ICU4XIsoDateTime.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XCustomTimeZone_ICU4XError ICU4XCustomTimeZone_create_from_string(const char* s_data, size_t s_len);
+
+ICU4XCustomTimeZone* ICU4XCustomTimeZone_create_empty();
+
+ICU4XCustomTimeZone* ICU4XCustomTimeZone_create_utc();
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_gmt_offset_seconds(ICU4XCustomTimeZone* self, int32_t offset_seconds);
+
+void ICU4XCustomTimeZone_clear_gmt_offset(ICU4XCustomTimeZone* self);
+
+diplomat_result_int32_t_ICU4XError ICU4XCustomTimeZone_gmt_offset_seconds(const ICU4XCustomTimeZone* self);
+
+diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_is_gmt_offset_positive(const ICU4XCustomTimeZone* self);
+
+diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_is_gmt_offset_zero(const ICU4XCustomTimeZone* self);
+
+diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_gmt_offset_has_minutes(const ICU4XCustomTimeZone* self);
+
+diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_gmt_offset_has_seconds(const ICU4XCustomTimeZone* self);
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_time_zone_id(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len);
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_iana_time_zone_id(ICU4XCustomTimeZone* self, const ICU4XIanaToBcp47Mapper* mapper, const char* id_data, size_t id_len);
+
+void ICU4XCustomTimeZone_clear_time_zone_id(ICU4XCustomTimeZone* self);
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_time_zone_id(const ICU4XCustomTimeZone* self, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_metazone_id(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len);
+
+void ICU4XCustomTimeZone_clear_metazone_id(ICU4XCustomTimeZone* self);
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_metazone_id(const ICU4XCustomTimeZone* self, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_zone_variant(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len);
+
+void ICU4XCustomTimeZone_clear_zone_variant(ICU4XCustomTimeZone* self);
+
+diplomat_result_void_ICU4XError ICU4XCustomTimeZone_zone_variant(const ICU4XCustomTimeZone* self, DiplomatWriteable* write);
+
+void ICU4XCustomTimeZone_set_standard_time(ICU4XCustomTimeZone* self);
+
+void ICU4XCustomTimeZone_set_daylight_time(ICU4XCustomTimeZone* self);
+
+diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_is_standard_time(const ICU4XCustomTimeZone* self);
+
+diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_is_daylight_time(const ICU4XCustomTimeZone* self);
+
+void ICU4XCustomTimeZone_maybe_calculate_metazone(ICU4XCustomTimeZone* self, const ICU4XMetazoneCalculator* metazone_calculator, const ICU4XIsoDateTime* local_datetime);
+void ICU4XCustomTimeZone_destroy(ICU4XCustomTimeZone* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XCustomTimeZone.hpp b/intl/icu_capi/cpp/include/ICU4XCustomTimeZone.hpp
new file mode 100644
index 0000000000..f3bea2d494
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XCustomTimeZone.hpp
@@ -0,0 +1,547 @@
+#ifndef ICU4XCustomTimeZone_HPP
+#define ICU4XCustomTimeZone_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XCustomTimeZone.h"
+
+class ICU4XCustomTimeZone;
+#include "ICU4XError.hpp"
+class ICU4XIanaToBcp47Mapper;
+class ICU4XMetazoneCalculator;
+class ICU4XIsoDateTime;
+
+/**
+ * A destruction policy for using ICU4XCustomTimeZone with std::unique_ptr.
+ */
+struct ICU4XCustomTimeZoneDeleter {
+ void operator()(capi::ICU4XCustomTimeZone* l) const noexcept {
+ capi::ICU4XCustomTimeZone_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `CustomTimeZone`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html) for more information.
+ */
+class ICU4XCustomTimeZone {
+ public:
+
+ /**
+ * Creates a time zone from an offset string.
+ *
+ * See the [Rust documentation for `from_str`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.from_str) for more information.
+ */
+ static diplomat::result<ICU4XCustomTimeZone, ICU4XError> create_from_string(const std::string_view s);
+
+ /**
+ * Creates a time zone with no information.
+ *
+ * See the [Rust documentation for `new_empty`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.new_empty) for more information.
+ */
+ static ICU4XCustomTimeZone create_empty();
+
+ /**
+ * Creates a time zone for UTC.
+ *
+ * See the [Rust documentation for `utc`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.utc) for more information.
+ */
+ static ICU4XCustomTimeZone create_utc();
+
+ /**
+ * Sets the `gmt_offset` field from offset seconds.
+ *
+ * Errors if the offset seconds are out of range.
+ *
+ * See the [Rust documentation for `try_from_offset_seconds`](https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.try_from_offset_seconds) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html)
+ */
+ diplomat::result<std::monostate, ICU4XError> try_set_gmt_offset_seconds(int32_t offset_seconds);
+
+ /**
+ * Clears the `gmt_offset` field.
+ *
+ * See the [Rust documentation for `offset_seconds`](https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.offset_seconds) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html)
+ */
+ void clear_gmt_offset();
+
+ /**
+ * Returns the value of the `gmt_offset` field as offset seconds.
+ *
+ * Errors if the `gmt_offset` field is empty.
+ *
+ * See the [Rust documentation for `offset_seconds`](https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.offset_seconds) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html)
+ */
+ diplomat::result<int32_t, ICU4XError> gmt_offset_seconds() const;
+
+ /**
+ * Returns whether the `gmt_offset` field is positive.
+ *
+ * Errors if the `gmt_offset` field is empty.
+ *
+ * See the [Rust documentation for `is_positive`](https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.is_positive) for more information.
+ */
+ diplomat::result<bool, ICU4XError> is_gmt_offset_positive() const;
+
+ /**
+ * Returns whether the `gmt_offset` field is zero.
+ *
+ * Errors if the `gmt_offset` field is empty (which is not the same as zero).
+ *
+ * See the [Rust documentation for `is_zero`](https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.is_zero) for more information.
+ */
+ diplomat::result<bool, ICU4XError> is_gmt_offset_zero() const;
+
+ /**
+ * Returns whether the `gmt_offset` field has nonzero minutes.
+ *
+ * Errors if the `gmt_offset` field is empty.
+ *
+ * See the [Rust documentation for `has_minutes`](https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.has_minutes) for more information.
+ */
+ diplomat::result<bool, ICU4XError> gmt_offset_has_minutes() const;
+
+ /**
+ * Returns whether the `gmt_offset` field has nonzero seconds.
+ *
+ * Errors if the `gmt_offset` field is empty.
+ *
+ * See the [Rust documentation for `has_seconds`](https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.has_seconds) for more information.
+ */
+ diplomat::result<bool, ICU4XError> gmt_offset_has_seconds() const;
+
+ /**
+ * Sets the `time_zone_id` field from a BCP-47 string.
+ *
+ * Errors if the string is not a valid BCP-47 time zone ID.
+ *
+ * See the [Rust documentation for `time_zone_id`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html)
+ */
+ diplomat::result<std::monostate, ICU4XError> try_set_time_zone_id(const std::string_view id);
+
+ /**
+ * Sets the `time_zone_id` field from an IANA string by looking up
+ * the corresponding BCP-47 string.
+ *
+ * Errors if the string is not a valid BCP-47 time zone ID.
+ *
+ * See the [Rust documentation for `get`](https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47MapperBorrowed.html#method.get) for more information.
+ */
+ diplomat::result<std::monostate, ICU4XError> try_set_iana_time_zone_id(const ICU4XIanaToBcp47Mapper& mapper, const std::string_view id);
+
+ /**
+ * Clears the `time_zone_id` field.
+ *
+ * See the [Rust documentation for `time_zone_id`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html)
+ */
+ void clear_time_zone_id();
+
+ /**
+ * Writes the value of the `time_zone_id` field as a string.
+ *
+ * Errors if the `time_zone_id` field is empty.
+ *
+ * See the [Rust documentation for `time_zone_id`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html)
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> time_zone_id_to_writeable(W& write) const;
+
+ /**
+ * Writes the value of the `time_zone_id` field as a string.
+ *
+ * Errors if the `time_zone_id` field is empty.
+ *
+ * See the [Rust documentation for `time_zone_id`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html)
+ */
+ diplomat::result<std::string, ICU4XError> time_zone_id() const;
+
+ /**
+ * Sets the `metazone_id` field from a string.
+ *
+ * Errors if the string is not a valid BCP-47 metazone ID.
+ *
+ * See the [Rust documentation for `metazone_id`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html)
+ */
+ diplomat::result<std::monostate, ICU4XError> try_set_metazone_id(const std::string_view id);
+
+ /**
+ * Clears the `metazone_id` field.
+ *
+ * See the [Rust documentation for `metazone_id`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html)
+ */
+ void clear_metazone_id();
+
+ /**
+ * Writes the value of the `metazone_id` field as a string.
+ *
+ * Errors if the `metazone_id` field is empty.
+ *
+ * See the [Rust documentation for `metazone_id`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html)
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> metazone_id_to_writeable(W& write) const;
+
+ /**
+ * Writes the value of the `metazone_id` field as a string.
+ *
+ * Errors if the `metazone_id` field is empty.
+ *
+ * See the [Rust documentation for `metazone_id`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html)
+ */
+ diplomat::result<std::string, ICU4XError> metazone_id() const;
+
+ /**
+ * Sets the `zone_variant` field from a string.
+ *
+ * Errors if the string is not a valid zone variant.
+ *
+ * See the [Rust documentation for `zone_variant`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html)
+ */
+ diplomat::result<std::monostate, ICU4XError> try_set_zone_variant(const std::string_view id);
+
+ /**
+ * Clears the `zone_variant` field.
+ *
+ * See the [Rust documentation for `zone_variant`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html)
+ */
+ void clear_zone_variant();
+
+ /**
+ * Writes the value of the `zone_variant` field as a string.
+ *
+ * Errors if the `zone_variant` field is empty.
+ *
+ * See the [Rust documentation for `zone_variant`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html)
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> zone_variant_to_writeable(W& write) const;
+
+ /**
+ * Writes the value of the `zone_variant` field as a string.
+ *
+ * Errors if the `zone_variant` field is empty.
+ *
+ * See the [Rust documentation for `zone_variant`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html)
+ */
+ diplomat::result<std::string, ICU4XError> zone_variant() const;
+
+ /**
+ * Sets the `zone_variant` field to standard time.
+ *
+ * See the [Rust documentation for `standard`](https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.standard) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant)
+ */
+ void set_standard_time();
+
+ /**
+ * Sets the `zone_variant` field to daylight time.
+ *
+ * See the [Rust documentation for `daylight`](https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.daylight) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant)
+ */
+ void set_daylight_time();
+
+ /**
+ * Returns whether the `zone_variant` field is standard time.
+ *
+ * Errors if the `zone_variant` field is empty.
+ *
+ * See the [Rust documentation for `standard`](https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.standard) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant)
+ */
+ diplomat::result<bool, ICU4XError> is_standard_time() const;
+
+ /**
+ * Returns whether the `zone_variant` field is daylight time.
+ *
+ * Errors if the `zone_variant` field is empty.
+ *
+ * See the [Rust documentation for `daylight`](https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.daylight) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant)
+ */
+ diplomat::result<bool, ICU4XError> is_daylight_time() const;
+
+ /**
+ * Sets the metazone based on the time zone and the local timestamp.
+ *
+ * See the [Rust documentation for `maybe_calculate_metazone`](https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.maybe_calculate_metazone) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html#method.compute_metazone_from_time_zone)
+ */
+ void maybe_calculate_metazone(const ICU4XMetazoneCalculator& metazone_calculator, const ICU4XIsoDateTime& local_datetime);
+ inline const capi::ICU4XCustomTimeZone* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XCustomTimeZone* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XCustomTimeZone(capi::ICU4XCustomTimeZone* i) : inner(i) {}
+ ICU4XCustomTimeZone() = default;
+ ICU4XCustomTimeZone(ICU4XCustomTimeZone&&) noexcept = default;
+ ICU4XCustomTimeZone& operator=(ICU4XCustomTimeZone&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XCustomTimeZone, ICU4XCustomTimeZoneDeleter> inner;
+};
+
+#include "ICU4XIanaToBcp47Mapper.hpp"
+#include "ICU4XMetazoneCalculator.hpp"
+#include "ICU4XIsoDateTime.hpp"
+
+inline diplomat::result<ICU4XCustomTimeZone, ICU4XError> ICU4XCustomTimeZone::create_from_string(const std::string_view s) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_create_from_string(s.data(), s.size());
+ diplomat::result<ICU4XCustomTimeZone, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XCustomTimeZone>(ICU4XCustomTimeZone(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XCustomTimeZone ICU4XCustomTimeZone::create_empty() {
+ return ICU4XCustomTimeZone(capi::ICU4XCustomTimeZone_create_empty());
+}
+inline ICU4XCustomTimeZone ICU4XCustomTimeZone::create_utc() {
+ return ICU4XCustomTimeZone(capi::ICU4XCustomTimeZone_create_utc());
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XCustomTimeZone::try_set_gmt_offset_seconds(int32_t offset_seconds) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_try_set_gmt_offset_seconds(this->inner.get(), offset_seconds);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline void ICU4XCustomTimeZone::clear_gmt_offset() {
+ capi::ICU4XCustomTimeZone_clear_gmt_offset(this->inner.get());
+}
+inline diplomat::result<int32_t, ICU4XError> ICU4XCustomTimeZone::gmt_offset_seconds() const {
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_gmt_offset_seconds(this->inner.get());
+ diplomat::result<int32_t, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<int32_t>(diplomat_result_raw_out_value.ok);
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<bool, ICU4XError> ICU4XCustomTimeZone::is_gmt_offset_positive() const {
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_is_gmt_offset_positive(this->inner.get());
+ diplomat::result<bool, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<bool>(diplomat_result_raw_out_value.ok);
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<bool, ICU4XError> ICU4XCustomTimeZone::is_gmt_offset_zero() const {
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_is_gmt_offset_zero(this->inner.get());
+ diplomat::result<bool, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<bool>(diplomat_result_raw_out_value.ok);
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<bool, ICU4XError> ICU4XCustomTimeZone::gmt_offset_has_minutes() const {
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_gmt_offset_has_minutes(this->inner.get());
+ diplomat::result<bool, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<bool>(diplomat_result_raw_out_value.ok);
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<bool, ICU4XError> ICU4XCustomTimeZone::gmt_offset_has_seconds() const {
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_gmt_offset_has_seconds(this->inner.get());
+ diplomat::result<bool, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<bool>(diplomat_result_raw_out_value.ok);
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XCustomTimeZone::try_set_time_zone_id(const std::string_view id) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_try_set_time_zone_id(this->inner.get(), id.data(), id.size());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XCustomTimeZone::try_set_iana_time_zone_id(const ICU4XIanaToBcp47Mapper& mapper, const std::string_view id) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_try_set_iana_time_zone_id(this->inner.get(), mapper.AsFFI(), id.data(), id.size());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline void ICU4XCustomTimeZone::clear_time_zone_id() {
+ capi::ICU4XCustomTimeZone_clear_time_zone_id(this->inner.get());
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XCustomTimeZone::time_zone_id_to_writeable(W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_time_zone_id(this->inner.get(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XCustomTimeZone::time_zone_id() const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_time_zone_id(this->inner.get(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XCustomTimeZone::try_set_metazone_id(const std::string_view id) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_try_set_metazone_id(this->inner.get(), id.data(), id.size());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline void ICU4XCustomTimeZone::clear_metazone_id() {
+ capi::ICU4XCustomTimeZone_clear_metazone_id(this->inner.get());
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XCustomTimeZone::metazone_id_to_writeable(W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_metazone_id(this->inner.get(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XCustomTimeZone::metazone_id() const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_metazone_id(this->inner.get(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XCustomTimeZone::try_set_zone_variant(const std::string_view id) {
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_try_set_zone_variant(this->inner.get(), id.data(), id.size());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline void ICU4XCustomTimeZone::clear_zone_variant() {
+ capi::ICU4XCustomTimeZone_clear_zone_variant(this->inner.get());
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XCustomTimeZone::zone_variant_to_writeable(W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_zone_variant(this->inner.get(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XCustomTimeZone::zone_variant() const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_zone_variant(this->inner.get(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+inline void ICU4XCustomTimeZone::set_standard_time() {
+ capi::ICU4XCustomTimeZone_set_standard_time(this->inner.get());
+}
+inline void ICU4XCustomTimeZone::set_daylight_time() {
+ capi::ICU4XCustomTimeZone_set_daylight_time(this->inner.get());
+}
+inline diplomat::result<bool, ICU4XError> ICU4XCustomTimeZone::is_standard_time() const {
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_is_standard_time(this->inner.get());
+ diplomat::result<bool, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<bool>(diplomat_result_raw_out_value.ok);
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<bool, ICU4XError> ICU4XCustomTimeZone::is_daylight_time() const {
+ auto diplomat_result_raw_out_value = capi::ICU4XCustomTimeZone_is_daylight_time(this->inner.get());
+ diplomat::result<bool, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<bool>(diplomat_result_raw_out_value.ok);
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline void ICU4XCustomTimeZone::maybe_calculate_metazone(const ICU4XMetazoneCalculator& metazone_calculator, const ICU4XIsoDateTime& local_datetime) {
+ capi::ICU4XCustomTimeZone_maybe_calculate_metazone(this->inner.get(), metazone_calculator.AsFFI(), local_datetime.AsFFI());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDataProvider.h b/intl/icu_capi/cpp/include/ICU4XDataProvider.h
new file mode 100644
index 0000000000..8d7700e224
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDataProvider.h
@@ -0,0 +1,48 @@
+#ifndef ICU4XDataProvider_H
+#define ICU4XDataProvider_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDataProvider ICU4XDataProvider;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XDataProvider_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XLocaleFallbacker.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+ICU4XDataProvider* ICU4XDataProvider_create_compiled();
+
+diplomat_result_box_ICU4XDataProvider_ICU4XError ICU4XDataProvider_create_fs(const char* path_data, size_t path_len);
+
+ICU4XDataProvider* ICU4XDataProvider_create_test();
+
+diplomat_result_box_ICU4XDataProvider_ICU4XError ICU4XDataProvider_create_from_byte_slice(const uint8_t* blob_data, size_t blob_len);
+
+ICU4XDataProvider* ICU4XDataProvider_create_empty();
+
+diplomat_result_void_ICU4XError ICU4XDataProvider_fork_by_key(ICU4XDataProvider* self, ICU4XDataProvider* other);
+
+diplomat_result_void_ICU4XError ICU4XDataProvider_fork_by_locale(ICU4XDataProvider* self, ICU4XDataProvider* other);
+
+diplomat_result_void_ICU4XError ICU4XDataProvider_enable_locale_fallback(ICU4XDataProvider* self);
+
+diplomat_result_void_ICU4XError ICU4XDataProvider_enable_locale_fallback_with(ICU4XDataProvider* self, const ICU4XLocaleFallbacker* fallbacker);
+void ICU4XDataProvider_destroy(ICU4XDataProvider* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDataProvider.hpp b/intl/icu_capi/cpp/include/ICU4XDataProvider.hpp
new file mode 100644
index 0000000000..b007076aca
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDataProvider.hpp
@@ -0,0 +1,196 @@
+#ifndef ICU4XDataProvider_HPP
+#define ICU4XDataProvider_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XDataProvider.h"
+
+class ICU4XDataProvider;
+#include "ICU4XError.hpp"
+class ICU4XLocaleFallbacker;
+
+/**
+ * A destruction policy for using ICU4XDataProvider with std::unique_ptr.
+ */
+struct ICU4XDataProviderDeleter {
+ void operator()(capi::ICU4XDataProvider* l) const noexcept {
+ capi::ICU4XDataProvider_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X data provider, capable of loading ICU4X data keys from some source.
+ *
+ * See the [Rust documentation for `icu_provider`](https://docs.rs/icu_provider/latest/icu_provider/index.html) for more information.
+ */
+class ICU4XDataProvider {
+ public:
+
+ /**
+ * Constructs an [`ICU4XDataProvider`] that uses compiled data.
+ *
+ * Requires the `compiled_data` feature.
+ *
+ * This provider cannot be modified or combined with other providers, so `enable_fallback`,
+ * `enabled_fallback_with`, `fork_by_locale`, and `fork_by_key` will return `Err`s.
+ */
+ static ICU4XDataProvider create_compiled();
+
+ /**
+ * Constructs an `FsDataProvider` and returns it as an [`ICU4XDataProvider`].
+ * Requires the `provider_fs` Cargo feature.
+ * Not supported in WASM.
+ *
+ * See the [Rust documentation for `FsDataProvider`](https://docs.rs/icu_provider_fs/latest/icu_provider_fs/struct.FsDataProvider.html) for more information.
+ */
+ static diplomat::result<ICU4XDataProvider, ICU4XError> create_fs(const std::string_view path);
+
+ /**
+ * Deprecated
+ *
+ * Use `create_compiled()`.
+ */
+ static ICU4XDataProvider create_test();
+
+ /**
+ * Constructs a `BlobDataProvider` and returns it as an [`ICU4XDataProvider`].
+ *
+ * See the [Rust documentation for `BlobDataProvider`](https://docs.rs/icu_provider_blob/latest/icu_provider_blob/struct.BlobDataProvider.html) for more information.
+ *
+ * Lifetimes: `blob` must live for the duration of the program.
+ */
+ static diplomat::result<ICU4XDataProvider, ICU4XError> create_from_byte_slice(const diplomat::span<const uint8_t> blob);
+
+ /**
+ * Constructs an empty [`ICU4XDataProvider`].
+ *
+ * See the [Rust documentation for `EmptyDataProvider`](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/empty/struct.EmptyDataProvider.html) for more information.
+ */
+ static ICU4XDataProvider create_empty();
+
+ /**
+ * Creates a provider that tries the current provider and then, if the current provider
+ * doesn't support the data key, another provider `other`.
+ *
+ * This takes ownership of the `other` provider, leaving an empty provider in its place.
+ *
+ * The providers must be the same type (Any or Buffer). This condition is satisfied if
+ * both providers originate from the same constructor, such as `create_from_byte_slice`
+ * or `create_fs`. If the condition is not upheld, a runtime error occurs.
+ *
+ * See the [Rust documentation for `ForkByKeyProvider`](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/type.ForkByKeyProvider.html) for more information.
+ */
+ diplomat::result<std::monostate, ICU4XError> fork_by_key(ICU4XDataProvider& other);
+
+ /**
+ * Same as `fork_by_key` but forks by locale instead of key.
+ *
+ * See the [Rust documentation for `MissingLocalePredicate`](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/predicates/struct.MissingLocalePredicate.html) for more information.
+ */
+ diplomat::result<std::monostate, ICU4XError> fork_by_locale(ICU4XDataProvider& other);
+
+ /**
+ * Enables locale fallbacking for data requests made to this provider.
+ *
+ * Note that the test provider (from `create_test`) already has fallbacking enabled.
+ *
+ * See the [Rust documentation for `try_new`](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.try_new) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html)
+ */
+ diplomat::result<std::monostate, ICU4XError> enable_locale_fallback();
+
+ /**
+ * See the [Rust documentation for `new_with_fallbacker`](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.new_with_fallbacker) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html)
+ */
+ diplomat::result<std::monostate, ICU4XError> enable_locale_fallback_with(const ICU4XLocaleFallbacker& fallbacker);
+ inline const capi::ICU4XDataProvider* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XDataProvider* AsFFIMut() { return this->inner.get(); }
+ inline explicit ICU4XDataProvider(capi::ICU4XDataProvider* i) : inner(i) {}
+ ICU4XDataProvider() = default;
+ ICU4XDataProvider(ICU4XDataProvider&&) noexcept = default;
+ ICU4XDataProvider& operator=(ICU4XDataProvider&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XDataProvider, ICU4XDataProviderDeleter> inner;
+};
+
+#include "ICU4XLocaleFallbacker.hpp"
+
+inline ICU4XDataProvider ICU4XDataProvider::create_compiled() {
+ return ICU4XDataProvider(capi::ICU4XDataProvider_create_compiled());
+}
+inline diplomat::result<ICU4XDataProvider, ICU4XError> ICU4XDataProvider::create_fs(const std::string_view path) {
+ auto diplomat_result_raw_out_value = capi::ICU4XDataProvider_create_fs(path.data(), path.size());
+ diplomat::result<ICU4XDataProvider, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XDataProvider>(ICU4XDataProvider(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XDataProvider ICU4XDataProvider::create_test() {
+ return ICU4XDataProvider(capi::ICU4XDataProvider_create_test());
+}
+inline diplomat::result<ICU4XDataProvider, ICU4XError> ICU4XDataProvider::create_from_byte_slice(const diplomat::span<const uint8_t> blob) {
+ auto diplomat_result_raw_out_value = capi::ICU4XDataProvider_create_from_byte_slice(blob.data(), blob.size());
+ diplomat::result<ICU4XDataProvider, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XDataProvider>(ICU4XDataProvider(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XDataProvider ICU4XDataProvider::create_empty() {
+ return ICU4XDataProvider(capi::ICU4XDataProvider_create_empty());
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XDataProvider::fork_by_key(ICU4XDataProvider& other) {
+ auto diplomat_result_raw_out_value = capi::ICU4XDataProvider_fork_by_key(this->inner.get(), other.AsFFIMut());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XDataProvider::fork_by_locale(ICU4XDataProvider& other) {
+ auto diplomat_result_raw_out_value = capi::ICU4XDataProvider_fork_by_locale(this->inner.get(), other.AsFFIMut());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XDataProvider::enable_locale_fallback() {
+ auto diplomat_result_raw_out_value = capi::ICU4XDataProvider_enable_locale_fallback(this->inner.get());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XDataProvider::enable_locale_fallback_with(const ICU4XLocaleFallbacker& fallbacker) {
+ auto diplomat_result_raw_out_value = capi::ICU4XDataProvider_enable_locale_fallback_with(this->inner.get(), fallbacker.AsFFI());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDataStruct.h b/intl/icu_capi/cpp/include/ICU4XDataStruct.h
new file mode 100644
index 0000000000..a07ff02fb8
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDataStruct.h
@@ -0,0 +1,30 @@
+#ifndef ICU4XDataStruct_H
+#define ICU4XDataStruct_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDataStruct ICU4XDataStruct;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XDataStruct_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XDataStruct_ICU4XError ICU4XDataStruct_create_decimal_symbols_v1(const char* plus_sign_prefix_data, size_t plus_sign_prefix_len, const char* plus_sign_suffix_data, size_t plus_sign_suffix_len, const char* minus_sign_prefix_data, size_t minus_sign_prefix_len, const char* minus_sign_suffix_data, size_t minus_sign_suffix_len, const char* decimal_separator_data, size_t decimal_separator_len, const char* grouping_separator_data, size_t grouping_separator_len, uint8_t primary_group_size, uint8_t secondary_group_size, uint8_t min_group_size, const char32_t* digits_data, size_t digits_len);
+void ICU4XDataStruct_destroy(ICU4XDataStruct* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDataStruct.hpp b/intl/icu_capi/cpp/include/ICU4XDataStruct.hpp
new file mode 100644
index 0000000000..877de4400a
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDataStruct.hpp
@@ -0,0 +1,63 @@
+#ifndef ICU4XDataStruct_HPP
+#define ICU4XDataStruct_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XDataStruct.h"
+
+class ICU4XDataStruct;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XDataStruct with std::unique_ptr.
+ */
+struct ICU4XDataStructDeleter {
+ void operator()(capi::ICU4XDataStruct* l) const noexcept {
+ capi::ICU4XDataStruct_destroy(l);
+ }
+};
+
+/**
+ * A generic data struct to be used by ICU4X
+ *
+ * This can be used to construct a StructDataProvider.
+ */
+class ICU4XDataStruct {
+ public:
+
+ /**
+ * Construct a new DecimalSymbolsV1 data struct.
+ *
+ * C++ users: All string arguments must be valid UTF8
+ *
+ * See the [Rust documentation for `DecimalSymbolsV1`](https://docs.rs/icu/latest/icu/decimal/provider/struct.DecimalSymbolsV1.html) for more information.
+ */
+ static diplomat::result<ICU4XDataStruct, ICU4XError> create_decimal_symbols_v1(const std::string_view plus_sign_prefix, const std::string_view plus_sign_suffix, const std::string_view minus_sign_prefix, const std::string_view minus_sign_suffix, const std::string_view decimal_separator, const std::string_view grouping_separator, uint8_t primary_group_size, uint8_t secondary_group_size, uint8_t min_group_size, const diplomat::span<const char32_t> digits);
+ inline const capi::ICU4XDataStruct* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XDataStruct* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XDataStruct(capi::ICU4XDataStruct* i) : inner(i) {}
+ ICU4XDataStruct() = default;
+ ICU4XDataStruct(ICU4XDataStruct&&) noexcept = default;
+ ICU4XDataStruct& operator=(ICU4XDataStruct&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XDataStruct, ICU4XDataStructDeleter> inner;
+};
+
+
+inline diplomat::result<ICU4XDataStruct, ICU4XError> ICU4XDataStruct::create_decimal_symbols_v1(const std::string_view plus_sign_prefix, const std::string_view plus_sign_suffix, const std::string_view minus_sign_prefix, const std::string_view minus_sign_suffix, const std::string_view decimal_separator, const std::string_view grouping_separator, uint8_t primary_group_size, uint8_t secondary_group_size, uint8_t min_group_size, const diplomat::span<const char32_t> digits) {
+ auto diplomat_result_raw_out_value = capi::ICU4XDataStruct_create_decimal_symbols_v1(plus_sign_prefix.data(), plus_sign_prefix.size(), plus_sign_suffix.data(), plus_sign_suffix.size(), minus_sign_prefix.data(), minus_sign_prefix.size(), minus_sign_suffix.data(), minus_sign_suffix.size(), decimal_separator.data(), decimal_separator.size(), grouping_separator.data(), grouping_separator.size(), primary_group_size, secondary_group_size, min_group_size, digits.data(), digits.size());
+ diplomat::result<ICU4XDataStruct, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XDataStruct>(ICU4XDataStruct(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDate.h b/intl/icu_capi/cpp/include/ICU4XDate.h
new file mode 100644
index 0000000000..f5a0c06de6
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDate.h
@@ -0,0 +1,66 @@
+#ifndef ICU4XDate_H
+#define ICU4XDate_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDate ICU4XDate;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XCalendar.h"
+#include "diplomat_result_box_ICU4XDate_ICU4XError.h"
+#include "ICU4XIsoDate.h"
+#include "ICU4XIsoWeekday.h"
+#include "ICU4XWeekCalculator.h"
+#include "diplomat_result_ICU4XWeekOf_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XDate_ICU4XError ICU4XDate_create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, const ICU4XCalendar* calendar);
+
+diplomat_result_box_ICU4XDate_ICU4XError ICU4XDate_create_from_codes_in_calendar(const char* era_code_data, size_t era_code_len, int32_t year, const char* month_code_data, size_t month_code_len, uint8_t day, const ICU4XCalendar* calendar);
+
+ICU4XDate* ICU4XDate_to_calendar(const ICU4XDate* self, const ICU4XCalendar* calendar);
+
+ICU4XIsoDate* ICU4XDate_to_iso(const ICU4XDate* self);
+
+uint32_t ICU4XDate_day_of_month(const ICU4XDate* self);
+
+ICU4XIsoWeekday ICU4XDate_day_of_week(const ICU4XDate* self);
+
+uint32_t ICU4XDate_week_of_month(const ICU4XDate* self, ICU4XIsoWeekday first_weekday);
+
+diplomat_result_ICU4XWeekOf_ICU4XError ICU4XDate_week_of_year(const ICU4XDate* self, const ICU4XWeekCalculator* calculator);
+
+uint32_t ICU4XDate_ordinal_month(const ICU4XDate* self);
+
+diplomat_result_void_ICU4XError ICU4XDate_month_code(const ICU4XDate* self, DiplomatWriteable* write);
+
+int32_t ICU4XDate_year_in_era(const ICU4XDate* self);
+
+diplomat_result_void_ICU4XError ICU4XDate_era(const ICU4XDate* self, DiplomatWriteable* write);
+
+uint8_t ICU4XDate_months_in_year(const ICU4XDate* self);
+
+uint8_t ICU4XDate_days_in_month(const ICU4XDate* self);
+
+uint16_t ICU4XDate_days_in_year(const ICU4XDate* self);
+
+ICU4XCalendar* ICU4XDate_calendar(const ICU4XDate* self);
+void ICU4XDate_destroy(ICU4XDate* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDate.hpp b/intl/icu_capi/cpp/include/ICU4XDate.hpp
new file mode 100644
index 0000000000..ef23cc31a8
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDate.hpp
@@ -0,0 +1,303 @@
+#ifndef ICU4XDate_HPP
+#define ICU4XDate_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XDate.h"
+
+class ICU4XCalendar;
+class ICU4XDate;
+#include "ICU4XError.hpp"
+class ICU4XIsoDate;
+#include "ICU4XIsoWeekday.hpp"
+class ICU4XWeekCalculator;
+struct ICU4XWeekOf;
+
+/**
+ * A destruction policy for using ICU4XDate with std::unique_ptr.
+ */
+struct ICU4XDateDeleter {
+ void operator()(capi::ICU4XDate* l) const noexcept {
+ capi::ICU4XDate_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X Date object capable of containing a date and time for any calendar.
+ *
+ * See the [Rust documentation for `Date`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html) for more information.
+ */
+class ICU4XDate {
+ public:
+
+ /**
+ * Creates a new [`ICU4XDate`] representing the ISO date and time
+ * given but in a given calendar
+ *
+ * See the [Rust documentation for `new_from_iso`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.new_from_iso) for more information.
+ */
+ static diplomat::result<ICU4XDate, ICU4XError> create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, const ICU4XCalendar& calendar);
+
+ /**
+ * Creates a new [`ICU4XDate`] from the given codes, which are interpreted in the given calendar system
+ *
+ * See the [Rust documentation for `try_new_from_codes`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_from_codes) for more information.
+ */
+ static diplomat::result<ICU4XDate, ICU4XError> create_from_codes_in_calendar(const std::string_view era_code, int32_t year, const std::string_view month_code, uint8_t day, const ICU4XCalendar& calendar);
+
+ /**
+ * Convert this date to one in a different calendar
+ *
+ * See the [Rust documentation for `to_calendar`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_calendar) for more information.
+ */
+ ICU4XDate to_calendar(const ICU4XCalendar& calendar) const;
+
+ /**
+ * Converts this date to ISO
+ *
+ * See the [Rust documentation for `to_iso`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_iso) for more information.
+ */
+ ICU4XIsoDate to_iso() const;
+
+ /**
+ * Returns the 1-indexed day in the month for this date
+ *
+ * See the [Rust documentation for `day_of_month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month) for more information.
+ */
+ uint32_t day_of_month() const;
+
+ /**
+ * Returns the day in the week for this day
+ *
+ * See the [Rust documentation for `day_of_week`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week) for more information.
+ */
+ ICU4XIsoWeekday day_of_week() const;
+
+ /**
+ * Returns the week number in this month, 1-indexed, based on what
+ * is considered the first day of the week (often a locale preference).
+ *
+ * `first_weekday` can be obtained via `first_weekday()` on [`ICU4XWeekCalculator`]
+ *
+ * See the [Rust documentation for `week_of_month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month) for more information.
+ */
+ uint32_t week_of_month(ICU4XIsoWeekday first_weekday) const;
+
+ /**
+ * Returns the week number in this year, using week data
+ *
+ * See the [Rust documentation for `week_of_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year) for more information.
+ */
+ diplomat::result<ICU4XWeekOf, ICU4XError> week_of_year(const ICU4XWeekCalculator& calculator) const;
+
+ /**
+ * Returns 1-indexed number of the month of this date in its year
+ *
+ * Note that for lunar calendars this may not lead to the same month
+ * having the same ordinal month across years; use month_code if you care
+ * about month identity.
+ *
+ * See the [Rust documentation for `month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month) for more information.
+ */
+ uint32_t ordinal_month() const;
+
+ /**
+ * Returns the month code for this date. Typically something
+ * like "M01", "M02", but can be more complicated for lunar calendars.
+ *
+ * See the [Rust documentation for `month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> month_code_to_writeable(W& write) const;
+
+ /**
+ * Returns the month code for this date. Typically something
+ * like "M01", "M02", but can be more complicated for lunar calendars.
+ *
+ * See the [Rust documentation for `month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> month_code() const;
+
+ /**
+ * Returns the year number in the current era for this date
+ *
+ * See the [Rust documentation for `year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year) for more information.
+ */
+ int32_t year_in_era() const;
+
+ /**
+ * Returns the era for this date,
+ *
+ * See the [Rust documentation for `year`](https://docs.rs/icu/latest/icu/struct.Date.html#method.year) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/types/struct.Era.html)
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> era_to_writeable(W& write) const;
+
+ /**
+ * Returns the era for this date,
+ *
+ * See the [Rust documentation for `year`](https://docs.rs/icu/latest/icu/struct.Date.html#method.year) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/types/struct.Era.html)
+ */
+ diplomat::result<std::string, ICU4XError> era() const;
+
+ /**
+ * Returns the number of months in the year represented by this date
+ *
+ * See the [Rust documentation for `months_in_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year) for more information.
+ */
+ uint8_t months_in_year() const;
+
+ /**
+ * Returns the number of days in the month represented by this date
+ *
+ * See the [Rust documentation for `days_in_month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month) for more information.
+ */
+ uint8_t days_in_month() const;
+
+ /**
+ * Returns the number of days in the year represented by this date
+ *
+ * See the [Rust documentation for `days_in_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year) for more information.
+ */
+ uint16_t days_in_year() const;
+
+ /**
+ * Returns the [`ICU4XCalendar`] object backing this date
+ *
+ * See the [Rust documentation for `calendar`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.calendar) for more information.
+ */
+ ICU4XCalendar calendar() const;
+ inline const capi::ICU4XDate* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XDate* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XDate(capi::ICU4XDate* i) : inner(i) {}
+ ICU4XDate() = default;
+ ICU4XDate(ICU4XDate&&) noexcept = default;
+ ICU4XDate& operator=(ICU4XDate&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XDate, ICU4XDateDeleter> inner;
+};
+
+#include "ICU4XCalendar.hpp"
+#include "ICU4XIsoDate.hpp"
+#include "ICU4XWeekCalculator.hpp"
+#include "ICU4XWeekOf.hpp"
+
+inline diplomat::result<ICU4XDate, ICU4XError> ICU4XDate::create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, const ICU4XCalendar& calendar) {
+ auto diplomat_result_raw_out_value = capi::ICU4XDate_create_from_iso_in_calendar(year, month, day, calendar.AsFFI());
+ diplomat::result<ICU4XDate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XDate>(ICU4XDate(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XDate, ICU4XError> ICU4XDate::create_from_codes_in_calendar(const std::string_view era_code, int32_t year, const std::string_view month_code, uint8_t day, const ICU4XCalendar& calendar) {
+ auto diplomat_result_raw_out_value = capi::ICU4XDate_create_from_codes_in_calendar(era_code.data(), era_code.size(), year, month_code.data(), month_code.size(), day, calendar.AsFFI());
+ diplomat::result<ICU4XDate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XDate>(ICU4XDate(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XDate ICU4XDate::to_calendar(const ICU4XCalendar& calendar) const {
+ return ICU4XDate(capi::ICU4XDate_to_calendar(this->inner.get(), calendar.AsFFI()));
+}
+inline ICU4XIsoDate ICU4XDate::to_iso() const {
+ return ICU4XIsoDate(capi::ICU4XDate_to_iso(this->inner.get()));
+}
+inline uint32_t ICU4XDate::day_of_month() const {
+ return capi::ICU4XDate_day_of_month(this->inner.get());
+}
+inline ICU4XIsoWeekday ICU4XDate::day_of_week() const {
+ return static_cast<ICU4XIsoWeekday>(capi::ICU4XDate_day_of_week(this->inner.get()));
+}
+inline uint32_t ICU4XDate::week_of_month(ICU4XIsoWeekday first_weekday) const {
+ return capi::ICU4XDate_week_of_month(this->inner.get(), static_cast<capi::ICU4XIsoWeekday>(first_weekday));
+}
+inline diplomat::result<ICU4XWeekOf, ICU4XError> ICU4XDate::week_of_year(const ICU4XWeekCalculator& calculator) const {
+ auto diplomat_result_raw_out_value = capi::ICU4XDate_week_of_year(this->inner.get(), calculator.AsFFI());
+ diplomat::result<ICU4XWeekOf, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ capi::ICU4XWeekOf diplomat_raw_struct_out_value = diplomat_result_raw_out_value.ok;
+ diplomat_result_out_value = diplomat::Ok<ICU4XWeekOf>(ICU4XWeekOf{ .week = std::move(diplomat_raw_struct_out_value.week), .unit = std::move(static_cast<ICU4XWeekRelativeUnit>(diplomat_raw_struct_out_value.unit)) });
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline uint32_t ICU4XDate::ordinal_month() const {
+ return capi::ICU4XDate_ordinal_month(this->inner.get());
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XDate::month_code_to_writeable(W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XDate_month_code(this->inner.get(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XDate::month_code() const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XDate_month_code(this->inner.get(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+inline int32_t ICU4XDate::year_in_era() const {
+ return capi::ICU4XDate_year_in_era(this->inner.get());
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XDate::era_to_writeable(W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XDate_era(this->inner.get(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XDate::era() const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XDate_era(this->inner.get(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+inline uint8_t ICU4XDate::months_in_year() const {
+ return capi::ICU4XDate_months_in_year(this->inner.get());
+}
+inline uint8_t ICU4XDate::days_in_month() const {
+ return capi::ICU4XDate_days_in_month(this->inner.get());
+}
+inline uint16_t ICU4XDate::days_in_year() const {
+ return capi::ICU4XDate_days_in_year(this->inner.get());
+}
+inline ICU4XCalendar ICU4XDate::calendar() const {
+ return ICU4XCalendar(capi::ICU4XDate_calendar(this->inner.get()));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDateFormatter.h b/intl/icu_capi/cpp/include/ICU4XDateFormatter.h
new file mode 100644
index 0000000000..8dc5316e47
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDateFormatter.h
@@ -0,0 +1,46 @@
+#ifndef ICU4XDateFormatter_H
+#define ICU4XDateFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDateFormatter ICU4XDateFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XDateLength.h"
+#include "diplomat_result_box_ICU4XDateFormatter_ICU4XError.h"
+#include "ICU4XDate.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XIsoDate.h"
+#include "ICU4XDateTime.h"
+#include "ICU4XIsoDateTime.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XDateFormatter_ICU4XError ICU4XDateFormatter_create_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length);
+
+diplomat_result_void_ICU4XError ICU4XDateFormatter_format_date(const ICU4XDateFormatter* self, const ICU4XDate* value, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XDateFormatter_format_iso_date(const ICU4XDateFormatter* self, const ICU4XIsoDate* value, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XDateFormatter_format_datetime(const ICU4XDateFormatter* self, const ICU4XDateTime* value, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XDateFormatter_format_iso_datetime(const ICU4XDateFormatter* self, const ICU4XIsoDateTime* value, DiplomatWriteable* write);
+void ICU4XDateFormatter_destroy(ICU4XDateFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDateFormatter.hpp b/intl/icu_capi/cpp/include/ICU4XDateFormatter.hpp
new file mode 100644
index 0000000000..13525b0cc6
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDateFormatter.hpp
@@ -0,0 +1,231 @@
+#ifndef ICU4XDateFormatter_HPP
+#define ICU4XDateFormatter_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XDateFormatter.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+#include "ICU4XDateLength.hpp"
+class ICU4XDateFormatter;
+#include "ICU4XError.hpp"
+class ICU4XDate;
+class ICU4XIsoDate;
+class ICU4XDateTime;
+class ICU4XIsoDateTime;
+
+/**
+ * A destruction policy for using ICU4XDateFormatter with std::unique_ptr.
+ */
+struct ICU4XDateFormatterDeleter {
+ void operator()(capi::ICU4XDateFormatter* l) const noexcept {
+ capi::ICU4XDateFormatter_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X DateFormatter object capable of formatting a [`ICU4XDate`] as a string,
+ * using some calendar specified at runtime in the locale.
+ *
+ * See the [Rust documentation for `DateFormatter`](https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html) for more information.
+ */
+class ICU4XDateFormatter {
+ public:
+
+ /**
+ * Creates a new [`ICU4XDateFormatter`] from locale data.
+ *
+ * See the [Rust documentation for `try_new_with_length`](https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.try_new_with_length) for more information.
+ */
+ static diplomat::result<ICU4XDateFormatter, ICU4XError> create_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length);
+
+ /**
+ * Formats a [`ICU4XDate`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_date_to_writeable(const ICU4XDate& value, W& write) const;
+
+ /**
+ * Formats a [`ICU4XDate`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_date(const ICU4XDate& value) const;
+
+ /**
+ * Formats a [`ICU4XIsoDate`] to a string.
+ *
+ * Will convert to this formatter's calendar first
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_date_to_writeable(const ICU4XIsoDate& value, W& write) const;
+
+ /**
+ * Formats a [`ICU4XIsoDate`] to a string.
+ *
+ * Will convert to this formatter's calendar first
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_iso_date(const ICU4XIsoDate& value) const;
+
+ /**
+ * Formats a [`ICU4XDateTime`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_datetime_to_writeable(const ICU4XDateTime& value, W& write) const;
+
+ /**
+ * Formats a [`ICU4XDateTime`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_datetime(const ICU4XDateTime& value) const;
+
+ /**
+ * Formats a [`ICU4XIsoDateTime`] to a string.
+ *
+ * Will convert to this formatter's calendar first
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_datetime_to_writeable(const ICU4XIsoDateTime& value, W& write) const;
+
+ /**
+ * Formats a [`ICU4XIsoDateTime`] to a string.
+ *
+ * Will convert to this formatter's calendar first
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_iso_datetime(const ICU4XIsoDateTime& value) const;
+ inline const capi::ICU4XDateFormatter* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XDateFormatter* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XDateFormatter(capi::ICU4XDateFormatter* i) : inner(i) {}
+ ICU4XDateFormatter() = default;
+ ICU4XDateFormatter(ICU4XDateFormatter&&) noexcept = default;
+ ICU4XDateFormatter& operator=(ICU4XDateFormatter&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XDateFormatter, ICU4XDateFormatterDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+#include "ICU4XDate.hpp"
+#include "ICU4XIsoDate.hpp"
+#include "ICU4XDateTime.hpp"
+#include "ICU4XIsoDateTime.hpp"
+
+inline diplomat::result<ICU4XDateFormatter, ICU4XError> ICU4XDateFormatter::create_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length) {
+ auto diplomat_result_raw_out_value = capi::ICU4XDateFormatter_create_with_length(provider.AsFFI(), locale.AsFFI(), static_cast<capi::ICU4XDateLength>(date_length));
+ diplomat::result<ICU4XDateFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XDateFormatter>(ICU4XDateFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XDateFormatter::format_date_to_writeable(const ICU4XDate& value, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateFormatter_format_date(this->inner.get(), value.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XDateFormatter::format_date(const ICU4XDate& value) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateFormatter_format_date(this->inner.get(), value.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XDateFormatter::format_iso_date_to_writeable(const ICU4XIsoDate& value, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateFormatter_format_iso_date(this->inner.get(), value.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XDateFormatter::format_iso_date(const ICU4XIsoDate& value) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateFormatter_format_iso_date(this->inner.get(), value.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XDateFormatter::format_datetime_to_writeable(const ICU4XDateTime& value, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateFormatter_format_datetime(this->inner.get(), value.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XDateFormatter::format_datetime(const ICU4XDateTime& value) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateFormatter_format_datetime(this->inner.get(), value.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XDateFormatter::format_iso_datetime_to_writeable(const ICU4XIsoDateTime& value, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateFormatter_format_iso_datetime(this->inner.get(), value.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XDateFormatter::format_iso_datetime(const ICU4XIsoDateTime& value) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateFormatter_format_iso_datetime(this->inner.get(), value.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDateLength.h b/intl/icu_capi/cpp/include/ICU4XDateLength.h
new file mode 100644
index 0000000000..b2ca918233
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDateLength.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XDateLength_H
+#define ICU4XDateLength_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XDateLength {
+ ICU4XDateLength_Full = 0,
+ ICU4XDateLength_Long = 1,
+ ICU4XDateLength_Medium = 2,
+ ICU4XDateLength_Short = 3,
+} ICU4XDateLength;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XDateLength_destroy(ICU4XDateLength* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDateLength.hpp b/intl/icu_capi/cpp/include/ICU4XDateLength.hpp
new file mode 100644
index 0000000000..8e7edd4d64
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDateLength.hpp
@@ -0,0 +1,26 @@
+#ifndef ICU4XDateLength_HPP
+#define ICU4XDateLength_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XDateLength.h"
+
+
+
+/**
+ * See the [Rust documentation for `Date`](https://docs.rs/icu/latest/icu/datetime/options/length/enum.Date.html) for more information.
+ */
+enum struct ICU4XDateLength {
+ Full = 0,
+ Long = 1,
+ Medium = 2,
+ Short = 3,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDateTime.h b/intl/icu_capi/cpp/include/ICU4XDateTime.h
new file mode 100644
index 0000000000..adb0a19798
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDateTime.h
@@ -0,0 +1,82 @@
+#ifndef ICU4XDateTime_H
+#define ICU4XDateTime_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDateTime ICU4XDateTime;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XCalendar.h"
+#include "diplomat_result_box_ICU4XDateTime_ICU4XError.h"
+#include "ICU4XDate.h"
+#include "ICU4XTime.h"
+#include "ICU4XIsoDateTime.h"
+#include "ICU4XIsoWeekday.h"
+#include "ICU4XWeekCalculator.h"
+#include "diplomat_result_ICU4XWeekOf_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XDateTime_ICU4XError ICU4XDateTime_create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar* calendar);
+
+diplomat_result_box_ICU4XDateTime_ICU4XError ICU4XDateTime_create_from_codes_in_calendar(const char* era_code_data, size_t era_code_len, int32_t year, const char* month_code_data, size_t month_code_len, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar* calendar);
+
+ICU4XDateTime* ICU4XDateTime_create_from_date_and_time(const ICU4XDate* date, const ICU4XTime* time);
+
+ICU4XDate* ICU4XDateTime_date(const ICU4XDateTime* self);
+
+ICU4XTime* ICU4XDateTime_time(const ICU4XDateTime* self);
+
+ICU4XIsoDateTime* ICU4XDateTime_to_iso(const ICU4XDateTime* self);
+
+ICU4XDateTime* ICU4XDateTime_to_calendar(const ICU4XDateTime* self, const ICU4XCalendar* calendar);
+
+uint8_t ICU4XDateTime_hour(const ICU4XDateTime* self);
+
+uint8_t ICU4XDateTime_minute(const ICU4XDateTime* self);
+
+uint8_t ICU4XDateTime_second(const ICU4XDateTime* self);
+
+uint32_t ICU4XDateTime_nanosecond(const ICU4XDateTime* self);
+
+uint32_t ICU4XDateTime_day_of_month(const ICU4XDateTime* self);
+
+ICU4XIsoWeekday ICU4XDateTime_day_of_week(const ICU4XDateTime* self);
+
+uint32_t ICU4XDateTime_week_of_month(const ICU4XDateTime* self, ICU4XIsoWeekday first_weekday);
+
+diplomat_result_ICU4XWeekOf_ICU4XError ICU4XDateTime_week_of_year(const ICU4XDateTime* self, const ICU4XWeekCalculator* calculator);
+
+uint32_t ICU4XDateTime_ordinal_month(const ICU4XDateTime* self);
+
+diplomat_result_void_ICU4XError ICU4XDateTime_month_code(const ICU4XDateTime* self, DiplomatWriteable* write);
+
+int32_t ICU4XDateTime_year_in_era(const ICU4XDateTime* self);
+
+diplomat_result_void_ICU4XError ICU4XDateTime_era(const ICU4XDateTime* self, DiplomatWriteable* write);
+
+uint8_t ICU4XDateTime_months_in_year(const ICU4XDateTime* self);
+
+uint8_t ICU4XDateTime_days_in_month(const ICU4XDateTime* self);
+
+uint16_t ICU4XDateTime_days_in_year(const ICU4XDateTime* self);
+
+ICU4XCalendar* ICU4XDateTime_calendar(const ICU4XDateTime* self);
+void ICU4XDateTime_destroy(ICU4XDateTime* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDateTime.hpp b/intl/icu_capi/cpp/include/ICU4XDateTime.hpp
new file mode 100644
index 0000000000..baf7ca9565
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDateTime.hpp
@@ -0,0 +1,373 @@
+#ifndef ICU4XDateTime_HPP
+#define ICU4XDateTime_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XDateTime.h"
+
+class ICU4XCalendar;
+class ICU4XDateTime;
+#include "ICU4XError.hpp"
+class ICU4XDate;
+class ICU4XTime;
+class ICU4XIsoDateTime;
+#include "ICU4XIsoWeekday.hpp"
+class ICU4XWeekCalculator;
+struct ICU4XWeekOf;
+
+/**
+ * A destruction policy for using ICU4XDateTime with std::unique_ptr.
+ */
+struct ICU4XDateTimeDeleter {
+ void operator()(capi::ICU4XDateTime* l) const noexcept {
+ capi::ICU4XDateTime_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X DateTime object capable of containing a date and time for any calendar.
+ *
+ * See the [Rust documentation for `DateTime`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html) for more information.
+ */
+class ICU4XDateTime {
+ public:
+
+ /**
+ * Creates a new [`ICU4XDateTime`] representing the ISO date and time
+ * given but in a given calendar
+ *
+ * See the [Rust documentation for `new_from_iso`](https://docs.rs/icu/latest/icu/struct.DateTime.html#method.new_from_iso) for more information.
+ */
+ static diplomat::result<ICU4XDateTime, ICU4XError> create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar& calendar);
+
+ /**
+ * Creates a new [`ICU4XDateTime`] from the given codes, which are interpreted in the given calendar system
+ *
+ * See the [Rust documentation for `try_new_from_codes`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_from_codes) for more information.
+ */
+ static diplomat::result<ICU4XDateTime, ICU4XError> create_from_codes_in_calendar(const std::string_view era_code, int32_t year, const std::string_view month_code, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar& calendar);
+
+ /**
+ * Creates a new [`ICU4XDateTime`] from an [`ICU4XDate`] and [`ICU4XTime`] object
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.new) for more information.
+ */
+ static ICU4XDateTime create_from_date_and_time(const ICU4XDate& date, const ICU4XTime& time);
+
+ /**
+ * Gets a copy of the date contained in this object
+ *
+ * See the [Rust documentation for `date`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.date) for more information.
+ */
+ ICU4XDate date() const;
+
+ /**
+ * Gets the time contained in this object
+ *
+ * See the [Rust documentation for `time`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.time) for more information.
+ */
+ ICU4XTime time() const;
+
+ /**
+ * Converts this date to ISO
+ *
+ * See the [Rust documentation for `to_iso`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_iso) for more information.
+ */
+ ICU4XIsoDateTime to_iso() const;
+
+ /**
+ * Convert this datetime to one in a different calendar
+ *
+ * See the [Rust documentation for `to_calendar`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_calendar) for more information.
+ */
+ ICU4XDateTime to_calendar(const ICU4XCalendar& calendar) const;
+
+ /**
+ * Returns the hour in this time
+ *
+ * See the [Rust documentation for `hour`](https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour) for more information.
+ */
+ uint8_t hour() const;
+
+ /**
+ * Returns the minute in this time
+ *
+ * See the [Rust documentation for `minute`](https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute) for more information.
+ */
+ uint8_t minute() const;
+
+ /**
+ * Returns the second in this time
+ *
+ * See the [Rust documentation for `second`](https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second) for more information.
+ */
+ uint8_t second() const;
+
+ /**
+ * Returns the nanosecond in this time
+ *
+ * See the [Rust documentation for `nanosecond`](https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond) for more information.
+ */
+ uint32_t nanosecond() const;
+
+ /**
+ * Returns the 1-indexed day in the month for this date
+ *
+ * See the [Rust documentation for `day_of_month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month) for more information.
+ */
+ uint32_t day_of_month() const;
+
+ /**
+ * Returns the day in the week for this day
+ *
+ * See the [Rust documentation for `day_of_week`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week) for more information.
+ */
+ ICU4XIsoWeekday day_of_week() const;
+
+ /**
+ * Returns the week number in this month, 1-indexed, based on what
+ * is considered the first day of the week (often a locale preference).
+ *
+ * `first_weekday` can be obtained via `first_weekday()` on [`ICU4XWeekCalculator`]
+ *
+ * See the [Rust documentation for `week_of_month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month) for more information.
+ */
+ uint32_t week_of_month(ICU4XIsoWeekday first_weekday) const;
+
+ /**
+ * Returns the week number in this year, using week data
+ *
+ * See the [Rust documentation for `week_of_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year) for more information.
+ */
+ diplomat::result<ICU4XWeekOf, ICU4XError> week_of_year(const ICU4XWeekCalculator& calculator) const;
+
+ /**
+ * Returns 1-indexed number of the month of this date in its year
+ *
+ * Note that for lunar calendars this may not lead to the same month
+ * having the same ordinal month across years; use month_code if you care
+ * about month identity.
+ *
+ * See the [Rust documentation for `month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month) for more information.
+ */
+ uint32_t ordinal_month() const;
+
+ /**
+ * Returns the month code for this date. Typically something
+ * like "M01", "M02", but can be more complicated for lunar calendars.
+ *
+ * See the [Rust documentation for `month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> month_code_to_writeable(W& write) const;
+
+ /**
+ * Returns the month code for this date. Typically something
+ * like "M01", "M02", but can be more complicated for lunar calendars.
+ *
+ * See the [Rust documentation for `month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> month_code() const;
+
+ /**
+ * Returns the year number in the current era for this date
+ *
+ * See the [Rust documentation for `year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year) for more information.
+ */
+ int32_t year_in_era() const;
+
+ /**
+ * Returns the era for this date,
+ *
+ * See the [Rust documentation for `year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> era_to_writeable(W& write) const;
+
+ /**
+ * Returns the era for this date,
+ *
+ * See the [Rust documentation for `year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> era() const;
+
+ /**
+ * Returns the number of months in the year represented by this date
+ *
+ * See the [Rust documentation for `months_in_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year) for more information.
+ */
+ uint8_t months_in_year() const;
+
+ /**
+ * Returns the number of days in the month represented by this date
+ *
+ * See the [Rust documentation for `days_in_month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month) for more information.
+ */
+ uint8_t days_in_month() const;
+
+ /**
+ * Returns the number of days in the year represented by this date
+ *
+ * See the [Rust documentation for `days_in_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year) for more information.
+ */
+ uint16_t days_in_year() const;
+
+ /**
+ * Returns the [`ICU4XCalendar`] object backing this date
+ *
+ * See the [Rust documentation for `calendar`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.calendar) for more information.
+ */
+ ICU4XCalendar calendar() const;
+ inline const capi::ICU4XDateTime* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XDateTime* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XDateTime(capi::ICU4XDateTime* i) : inner(i) {}
+ ICU4XDateTime() = default;
+ ICU4XDateTime(ICU4XDateTime&&) noexcept = default;
+ ICU4XDateTime& operator=(ICU4XDateTime&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XDateTime, ICU4XDateTimeDeleter> inner;
+};
+
+#include "ICU4XCalendar.hpp"
+#include "ICU4XDate.hpp"
+#include "ICU4XTime.hpp"
+#include "ICU4XIsoDateTime.hpp"
+#include "ICU4XWeekCalculator.hpp"
+#include "ICU4XWeekOf.hpp"
+
+inline diplomat::result<ICU4XDateTime, ICU4XError> ICU4XDateTime::create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar& calendar) {
+ auto diplomat_result_raw_out_value = capi::ICU4XDateTime_create_from_iso_in_calendar(year, month, day, hour, minute, second, nanosecond, calendar.AsFFI());
+ diplomat::result<ICU4XDateTime, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XDateTime>(ICU4XDateTime(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XDateTime, ICU4XError> ICU4XDateTime::create_from_codes_in_calendar(const std::string_view era_code, int32_t year, const std::string_view month_code, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar& calendar) {
+ auto diplomat_result_raw_out_value = capi::ICU4XDateTime_create_from_codes_in_calendar(era_code.data(), era_code.size(), year, month_code.data(), month_code.size(), day, hour, minute, second, nanosecond, calendar.AsFFI());
+ diplomat::result<ICU4XDateTime, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XDateTime>(ICU4XDateTime(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XDateTime ICU4XDateTime::create_from_date_and_time(const ICU4XDate& date, const ICU4XTime& time) {
+ return ICU4XDateTime(capi::ICU4XDateTime_create_from_date_and_time(date.AsFFI(), time.AsFFI()));
+}
+inline ICU4XDate ICU4XDateTime::date() const {
+ return ICU4XDate(capi::ICU4XDateTime_date(this->inner.get()));
+}
+inline ICU4XTime ICU4XDateTime::time() const {
+ return ICU4XTime(capi::ICU4XDateTime_time(this->inner.get()));
+}
+inline ICU4XIsoDateTime ICU4XDateTime::to_iso() const {
+ return ICU4XIsoDateTime(capi::ICU4XDateTime_to_iso(this->inner.get()));
+}
+inline ICU4XDateTime ICU4XDateTime::to_calendar(const ICU4XCalendar& calendar) const {
+ return ICU4XDateTime(capi::ICU4XDateTime_to_calendar(this->inner.get(), calendar.AsFFI()));
+}
+inline uint8_t ICU4XDateTime::hour() const {
+ return capi::ICU4XDateTime_hour(this->inner.get());
+}
+inline uint8_t ICU4XDateTime::minute() const {
+ return capi::ICU4XDateTime_minute(this->inner.get());
+}
+inline uint8_t ICU4XDateTime::second() const {
+ return capi::ICU4XDateTime_second(this->inner.get());
+}
+inline uint32_t ICU4XDateTime::nanosecond() const {
+ return capi::ICU4XDateTime_nanosecond(this->inner.get());
+}
+inline uint32_t ICU4XDateTime::day_of_month() const {
+ return capi::ICU4XDateTime_day_of_month(this->inner.get());
+}
+inline ICU4XIsoWeekday ICU4XDateTime::day_of_week() const {
+ return static_cast<ICU4XIsoWeekday>(capi::ICU4XDateTime_day_of_week(this->inner.get()));
+}
+inline uint32_t ICU4XDateTime::week_of_month(ICU4XIsoWeekday first_weekday) const {
+ return capi::ICU4XDateTime_week_of_month(this->inner.get(), static_cast<capi::ICU4XIsoWeekday>(first_weekday));
+}
+inline diplomat::result<ICU4XWeekOf, ICU4XError> ICU4XDateTime::week_of_year(const ICU4XWeekCalculator& calculator) const {
+ auto diplomat_result_raw_out_value = capi::ICU4XDateTime_week_of_year(this->inner.get(), calculator.AsFFI());
+ diplomat::result<ICU4XWeekOf, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ capi::ICU4XWeekOf diplomat_raw_struct_out_value = diplomat_result_raw_out_value.ok;
+ diplomat_result_out_value = diplomat::Ok<ICU4XWeekOf>(ICU4XWeekOf{ .week = std::move(diplomat_raw_struct_out_value.week), .unit = std::move(static_cast<ICU4XWeekRelativeUnit>(diplomat_raw_struct_out_value.unit)) });
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline uint32_t ICU4XDateTime::ordinal_month() const {
+ return capi::ICU4XDateTime_ordinal_month(this->inner.get());
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XDateTime::month_code_to_writeable(W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateTime_month_code(this->inner.get(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XDateTime::month_code() const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateTime_month_code(this->inner.get(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+inline int32_t ICU4XDateTime::year_in_era() const {
+ return capi::ICU4XDateTime_year_in_era(this->inner.get());
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XDateTime::era_to_writeable(W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateTime_era(this->inner.get(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XDateTime::era() const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateTime_era(this->inner.get(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+inline uint8_t ICU4XDateTime::months_in_year() const {
+ return capi::ICU4XDateTime_months_in_year(this->inner.get());
+}
+inline uint8_t ICU4XDateTime::days_in_month() const {
+ return capi::ICU4XDateTime_days_in_month(this->inner.get());
+}
+inline uint16_t ICU4XDateTime::days_in_year() const {
+ return capi::ICU4XDateTime_days_in_year(this->inner.get());
+}
+inline ICU4XCalendar ICU4XDateTime::calendar() const {
+ return ICU4XCalendar(capi::ICU4XDateTime_calendar(this->inner.get()));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDateTimeFormatter.h b/intl/icu_capi/cpp/include/ICU4XDateTimeFormatter.h
new file mode 100644
index 0000000000..5f0af4ddba
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDateTimeFormatter.h
@@ -0,0 +1,41 @@
+#ifndef ICU4XDateTimeFormatter_H
+#define ICU4XDateTimeFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDateTimeFormatter ICU4XDateTimeFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XDateLength.h"
+#include "ICU4XTimeLength.h"
+#include "diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError.h"
+#include "ICU4XDateTime.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XIsoDateTime.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError ICU4XDateTimeFormatter_create_with_lengths(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length);
+
+diplomat_result_void_ICU4XError ICU4XDateTimeFormatter_format_datetime(const ICU4XDateTimeFormatter* self, const ICU4XDateTime* value, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XDateTimeFormatter_format_iso_datetime(const ICU4XDateTimeFormatter* self, const ICU4XIsoDateTime* value, DiplomatWriteable* write);
+void ICU4XDateTimeFormatter_destroy(ICU4XDateTimeFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDateTimeFormatter.hpp b/intl/icu_capi/cpp/include/ICU4XDateTimeFormatter.hpp
new file mode 100644
index 0000000000..2a556eedc8
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDateTimeFormatter.hpp
@@ -0,0 +1,150 @@
+#ifndef ICU4XDateTimeFormatter_HPP
+#define ICU4XDateTimeFormatter_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XDateTimeFormatter.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+#include "ICU4XDateLength.hpp"
+#include "ICU4XTimeLength.hpp"
+class ICU4XDateTimeFormatter;
+#include "ICU4XError.hpp"
+class ICU4XDateTime;
+class ICU4XIsoDateTime;
+
+/**
+ * A destruction policy for using ICU4XDateTimeFormatter with std::unique_ptr.
+ */
+struct ICU4XDateTimeFormatterDeleter {
+ void operator()(capi::ICU4XDateTimeFormatter* l) const noexcept {
+ capi::ICU4XDateTimeFormatter_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X DateFormatter object capable of formatting a [`ICU4XDateTime`] as a string,
+ * using some calendar specified at runtime in the locale.
+ *
+ * See the [Rust documentation for `DateTimeFormatter`](https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html) for more information.
+ */
+class ICU4XDateTimeFormatter {
+ public:
+
+ /**
+ * Creates a new [`ICU4XDateTimeFormatter`] from locale data.
+ *
+ * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information.
+ */
+ static diplomat::result<ICU4XDateTimeFormatter, ICU4XError> create_with_lengths(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length);
+
+ /**
+ * Formats a [`ICU4XDateTime`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_datetime_to_writeable(const ICU4XDateTime& value, W& write) const;
+
+ /**
+ * Formats a [`ICU4XDateTime`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_datetime(const ICU4XDateTime& value) const;
+
+ /**
+ * Formats a [`ICU4XIsoDateTime`] to a string.
+ *
+ * Will convert to this formatter's calendar first
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_datetime_to_writeable(const ICU4XIsoDateTime& value, W& write) const;
+
+ /**
+ * Formats a [`ICU4XIsoDateTime`] to a string.
+ *
+ * Will convert to this formatter's calendar first
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_iso_datetime(const ICU4XIsoDateTime& value) const;
+ inline const capi::ICU4XDateTimeFormatter* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XDateTimeFormatter* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XDateTimeFormatter(capi::ICU4XDateTimeFormatter* i) : inner(i) {}
+ ICU4XDateTimeFormatter() = default;
+ ICU4XDateTimeFormatter(ICU4XDateTimeFormatter&&) noexcept = default;
+ ICU4XDateTimeFormatter& operator=(ICU4XDateTimeFormatter&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XDateTimeFormatter, ICU4XDateTimeFormatterDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+#include "ICU4XDateTime.hpp"
+#include "ICU4XIsoDateTime.hpp"
+
+inline diplomat::result<ICU4XDateTimeFormatter, ICU4XError> ICU4XDateTimeFormatter::create_with_lengths(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length) {
+ auto diplomat_result_raw_out_value = capi::ICU4XDateTimeFormatter_create_with_lengths(provider.AsFFI(), locale.AsFFI(), static_cast<capi::ICU4XDateLength>(date_length), static_cast<capi::ICU4XTimeLength>(time_length));
+ diplomat::result<ICU4XDateTimeFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XDateTimeFormatter>(ICU4XDateTimeFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XDateTimeFormatter::format_datetime_to_writeable(const ICU4XDateTime& value, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateTimeFormatter_format_datetime(this->inner.get(), value.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XDateTimeFormatter::format_datetime(const ICU4XDateTime& value) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateTimeFormatter_format_datetime(this->inner.get(), value.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XDateTimeFormatter::format_iso_datetime_to_writeable(const ICU4XIsoDateTime& value, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateTimeFormatter_format_iso_datetime(this->inner.get(), value.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XDateTimeFormatter::format_iso_datetime(const ICU4XIsoDateTime& value) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XDateTimeFormatter_format_iso_datetime(this->inner.get(), value.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDecomposed.h b/intl/icu_capi/cpp/include/ICU4XDecomposed.h
new file mode 100644
index 0000000000..3f287e8192
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDecomposed.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XDecomposed_H
+#define ICU4XDecomposed_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDecomposed {
+ char32_t first;
+ char32_t second;
+} ICU4XDecomposed;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XDecomposed_destroy(ICU4XDecomposed* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDecomposed.hpp b/intl/icu_capi/cpp/include/ICU4XDecomposed.hpp
new file mode 100644
index 0000000000..5628ae2be9
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDecomposed.hpp
@@ -0,0 +1,30 @@
+#ifndef ICU4XDecomposed_HPP
+#define ICU4XDecomposed_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XDecomposed.h"
+
+
+
+/**
+ * The outcome of non-recursive canonical decomposition of a character.
+ * `second` will be NUL when the decomposition expands to a single character
+ * (which may or may not be the original one)
+ *
+ * See the [Rust documentation for `Decomposed`](https://docs.rs/icu/latest/icu/normalizer/properties/enum.Decomposed.html) for more information.
+ */
+struct ICU4XDecomposed {
+ public:
+ char32_t first;
+ char32_t second;
+};
+
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDecomposingNormalizer.h b/intl/icu_capi/cpp/include/ICU4XDecomposingNormalizer.h
new file mode 100644
index 0000000000..f542f7a730
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDecomposingNormalizer.h
@@ -0,0 +1,38 @@
+#ifndef ICU4XDecomposingNormalizer_H
+#define ICU4XDecomposingNormalizer_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDecomposingNormalizer ICU4XDecomposingNormalizer;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError ICU4XDecomposingNormalizer_create_nfd(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError ICU4XDecomposingNormalizer_create_nfkd(const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XDecomposingNormalizer_normalize(const ICU4XDecomposingNormalizer* self, const char* s_data, size_t s_len, DiplomatWriteable* write);
+
+bool ICU4XDecomposingNormalizer_is_normalized(const ICU4XDecomposingNormalizer* self, const char* s_data, size_t s_len);
+void ICU4XDecomposingNormalizer_destroy(ICU4XDecomposingNormalizer* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDecomposingNormalizer.hpp b/intl/icu_capi/cpp/include/ICU4XDecomposingNormalizer.hpp
new file mode 100644
index 0000000000..501513f7c2
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDecomposingNormalizer.hpp
@@ -0,0 +1,131 @@
+#ifndef ICU4XDecomposingNormalizer_HPP
+#define ICU4XDecomposingNormalizer_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XDecomposingNormalizer.h"
+
+class ICU4XDataProvider;
+class ICU4XDecomposingNormalizer;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XDecomposingNormalizer with std::unique_ptr.
+ */
+struct ICU4XDecomposingNormalizerDeleter {
+ void operator()(capi::ICU4XDecomposingNormalizer* l) const noexcept {
+ capi::ICU4XDecomposingNormalizer_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `DecomposingNormalizer`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html) for more information.
+ */
+class ICU4XDecomposingNormalizer {
+ public:
+
+ /**
+ * Construct a new ICU4XDecomposingNormalizer instance for NFC
+ *
+ * See the [Rust documentation for `new_nfd`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfd) for more information.
+ */
+ static diplomat::result<ICU4XDecomposingNormalizer, ICU4XError> create_nfd(const ICU4XDataProvider& provider);
+
+ /**
+ * Construct a new ICU4XDecomposingNormalizer instance for NFKC
+ *
+ * See the [Rust documentation for `new_nfkd`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfkd) for more information.
+ */
+ static diplomat::result<ICU4XDecomposingNormalizer, ICU4XError> create_nfkd(const ICU4XDataProvider& provider);
+
+ /**
+ * Normalize a (potentially ill-formed) UTF8 string
+ *
+ * Errors are mapped to REPLACEMENT CHARACTER
+ *
+ * See the [Rust documentation for `normalize_utf8`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.normalize_utf8) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> normalize_to_writeable(const std::string_view s, W& write) const;
+
+ /**
+ * Normalize a (potentially ill-formed) UTF8 string
+ *
+ * Errors are mapped to REPLACEMENT CHARACTER
+ *
+ * See the [Rust documentation for `normalize_utf8`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.normalize_utf8) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> normalize(const std::string_view s) const;
+
+ /**
+ * Check if a (potentially ill-formed) UTF8 string is normalized
+ *
+ * Errors are mapped to REPLACEMENT CHARACTER
+ *
+ * See the [Rust documentation for `is_normalized_utf8`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.is_normalized_utf8) for more information.
+ */
+ bool is_normalized(const std::string_view s) const;
+ inline const capi::ICU4XDecomposingNormalizer* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XDecomposingNormalizer* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XDecomposingNormalizer(capi::ICU4XDecomposingNormalizer* i) : inner(i) {}
+ ICU4XDecomposingNormalizer() = default;
+ ICU4XDecomposingNormalizer(ICU4XDecomposingNormalizer&&) noexcept = default;
+ ICU4XDecomposingNormalizer& operator=(ICU4XDecomposingNormalizer&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XDecomposingNormalizer, ICU4XDecomposingNormalizerDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+
+inline diplomat::result<ICU4XDecomposingNormalizer, ICU4XError> ICU4XDecomposingNormalizer::create_nfd(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XDecomposingNormalizer_create_nfd(provider.AsFFI());
+ diplomat::result<ICU4XDecomposingNormalizer, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XDecomposingNormalizer>(ICU4XDecomposingNormalizer(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XDecomposingNormalizer, ICU4XError> ICU4XDecomposingNormalizer::create_nfkd(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XDecomposingNormalizer_create_nfkd(provider.AsFFI());
+ diplomat::result<ICU4XDecomposingNormalizer, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XDecomposingNormalizer>(ICU4XDecomposingNormalizer(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XDecomposingNormalizer::normalize_to_writeable(const std::string_view s, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XDecomposingNormalizer_normalize(this->inner.get(), s.data(), s.size(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XDecomposingNormalizer::normalize(const std::string_view s) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XDecomposingNormalizer_normalize(this->inner.get(), s.data(), s.size(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+inline bool ICU4XDecomposingNormalizer::is_normalized(const std::string_view s) const {
+ return capi::ICU4XDecomposingNormalizer_is_normalized(this->inner.get(), s.data(), s.size());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDisplayNamesFallback.h b/intl/icu_capi/cpp/include/ICU4XDisplayNamesFallback.h
new file mode 100644
index 0000000000..085fc8de5d
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDisplayNamesFallback.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XDisplayNamesFallback_H
+#define ICU4XDisplayNamesFallback_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XDisplayNamesFallback {
+ ICU4XDisplayNamesFallback_Code = 0,
+ ICU4XDisplayNamesFallback_None = 1,
+} ICU4XDisplayNamesFallback;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XDisplayNamesFallback_destroy(ICU4XDisplayNamesFallback* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDisplayNamesFallback.hpp b/intl/icu_capi/cpp/include/ICU4XDisplayNamesFallback.hpp
new file mode 100644
index 0000000000..230539852b
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDisplayNamesFallback.hpp
@@ -0,0 +1,24 @@
+#ifndef ICU4XDisplayNamesFallback_HPP
+#define ICU4XDisplayNamesFallback_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XDisplayNamesFallback.h"
+
+
+
+/**
+ * See the [Rust documentation for `Fallback`](https://docs.rs/icu/latest/icu/displaynames/options/enum.Fallback.html) for more information.
+ */
+enum struct ICU4XDisplayNamesFallback {
+ Code = 0,
+ None = 1,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDisplayNamesOptionsV1.h b/intl/icu_capi/cpp/include/ICU4XDisplayNamesOptionsV1.h
new file mode 100644
index 0000000000..e998cde0e7
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDisplayNamesOptionsV1.h
@@ -0,0 +1,38 @@
+#ifndef ICU4XDisplayNamesOptionsV1_H
+#define ICU4XDisplayNamesOptionsV1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XDisplayNamesStyle.h"
+#include "ICU4XDisplayNamesFallback.h"
+#include "ICU4XLanguageDisplay.h"
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XDisplayNamesOptionsV1 {
+ ICU4XDisplayNamesStyle style;
+ ICU4XDisplayNamesFallback fallback;
+ ICU4XLanguageDisplay language_display;
+} ICU4XDisplayNamesOptionsV1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDisplayNamesStyle.h"
+#include "ICU4XDisplayNamesFallback.h"
+#include "ICU4XLanguageDisplay.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XDisplayNamesOptionsV1_destroy(ICU4XDisplayNamesOptionsV1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDisplayNamesOptionsV1.hpp b/intl/icu_capi/cpp/include/ICU4XDisplayNamesOptionsV1.hpp
new file mode 100644
index 0000000000..52b66efa7e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDisplayNamesOptionsV1.hpp
@@ -0,0 +1,43 @@
+#ifndef ICU4XDisplayNamesOptionsV1_HPP
+#define ICU4XDisplayNamesOptionsV1_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XDisplayNamesOptionsV1.h"
+
+#include "ICU4XDisplayNamesStyle.hpp"
+#include "ICU4XDisplayNamesFallback.hpp"
+#include "ICU4XLanguageDisplay.hpp"
+
+
+/**
+ * See the [Rust documentation for `DisplayNamesOptions`](https://docs.rs/icu/latest/icu/displaynames/options/struct.DisplayNamesOptions.html) for more information.
+ */
+struct ICU4XDisplayNamesOptionsV1 {
+ public:
+
+ /**
+ * The optional formatting style to use for display name.
+ */
+ ICU4XDisplayNamesStyle style;
+
+ /**
+ * The fallback return when the system does not have the
+ * requested display name, defaults to "code".
+ */
+ ICU4XDisplayNamesFallback fallback;
+
+ /**
+ * The language display kind, defaults to "dialect".
+ */
+ ICU4XLanguageDisplay language_display;
+};
+
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDisplayNamesStyle.h b/intl/icu_capi/cpp/include/ICU4XDisplayNamesStyle.h
new file mode 100644
index 0000000000..048da455da
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDisplayNamesStyle.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XDisplayNamesStyle_H
+#define ICU4XDisplayNamesStyle_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XDisplayNamesStyle {
+ ICU4XDisplayNamesStyle_Auto = 0,
+ ICU4XDisplayNamesStyle_Narrow = 1,
+ ICU4XDisplayNamesStyle_Short = 2,
+ ICU4XDisplayNamesStyle_Long = 3,
+ ICU4XDisplayNamesStyle_Menu = 4,
+} ICU4XDisplayNamesStyle;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XDisplayNamesStyle_destroy(ICU4XDisplayNamesStyle* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XDisplayNamesStyle.hpp b/intl/icu_capi/cpp/include/ICU4XDisplayNamesStyle.hpp
new file mode 100644
index 0000000000..0199bdc80d
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XDisplayNamesStyle.hpp
@@ -0,0 +1,27 @@
+#ifndef ICU4XDisplayNamesStyle_HPP
+#define ICU4XDisplayNamesStyle_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XDisplayNamesStyle.h"
+
+
+
+/**
+ * See the [Rust documentation for `Style`](https://docs.rs/icu/latest/icu/displaynames/options/enum.Style.html) for more information.
+ */
+enum struct ICU4XDisplayNamesStyle {
+ Auto = 0,
+ Narrow = 1,
+ Short = 2,
+ Long = 3,
+ Menu = 4,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XError.h b/intl/icu_capi/cpp/include/ICU4XError.h
new file mode 100644
index 0000000000..8836275ac5
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XError.h
@@ -0,0 +1,84 @@
+#ifndef ICU4XError_H
+#define ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XError {
+ ICU4XError_UnknownError = 0,
+ ICU4XError_WriteableError = 1,
+ ICU4XError_OutOfBoundsError = 2,
+ ICU4XError_DataMissingDataKeyError = 256,
+ ICU4XError_DataMissingVariantError = 257,
+ ICU4XError_DataMissingLocaleError = 258,
+ ICU4XError_DataNeedsVariantError = 259,
+ ICU4XError_DataNeedsLocaleError = 260,
+ ICU4XError_DataExtraneousLocaleError = 261,
+ ICU4XError_DataFilteredResourceError = 262,
+ ICU4XError_DataMismatchedTypeError = 263,
+ ICU4XError_DataMissingPayloadError = 264,
+ ICU4XError_DataInvalidStateError = 265,
+ ICU4XError_DataCustomError = 266,
+ ICU4XError_DataIoError = 267,
+ ICU4XError_DataUnavailableBufferFormatError = 268,
+ ICU4XError_DataMismatchedAnyBufferError = 269,
+ ICU4XError_LocaleUndefinedSubtagError = 512,
+ ICU4XError_LocaleParserLanguageError = 513,
+ ICU4XError_LocaleParserSubtagError = 514,
+ ICU4XError_LocaleParserExtensionError = 515,
+ ICU4XError_DataStructValidityError = 768,
+ ICU4XError_PropertyUnknownScriptIdError = 1024,
+ ICU4XError_PropertyUnknownGeneralCategoryGroupError = 1025,
+ ICU4XError_PropertyUnexpectedPropertyNameError = 1026,
+ ICU4XError_FixedDecimalLimitError = 1280,
+ ICU4XError_FixedDecimalSyntaxError = 1281,
+ ICU4XError_PluralsParserError = 1536,
+ ICU4XError_CalendarParseError = 1792,
+ ICU4XError_CalendarOverflowError = 1793,
+ ICU4XError_CalendarUnderflowError = 1794,
+ ICU4XError_CalendarOutOfRangeError = 1795,
+ ICU4XError_CalendarUnknownEraError = 1796,
+ ICU4XError_CalendarUnknownMonthCodeError = 1797,
+ ICU4XError_CalendarMissingInputError = 1798,
+ ICU4XError_CalendarUnknownKindError = 1799,
+ ICU4XError_CalendarMissingError = 1800,
+ ICU4XError_DateTimePatternError = 2048,
+ ICU4XError_DateTimeMissingInputFieldError = 2049,
+ ICU4XError_DateTimeSkeletonError = 2050,
+ ICU4XError_DateTimeUnsupportedFieldError = 2051,
+ ICU4XError_DateTimeUnsupportedOptionsError = 2052,
+ ICU4XError_DateTimeMissingWeekdaySymbolError = 2053,
+ ICU4XError_DateTimeMissingMonthSymbolError = 2054,
+ ICU4XError_DateTimeFixedDecimalError = 2055,
+ ICU4XError_DateTimeMismatchedCalendarError = 2056,
+ ICU4XError_TinyStrTooLargeError = 2304,
+ ICU4XError_TinyStrContainsNullError = 2305,
+ ICU4XError_TinyStrNonAsciiError = 2306,
+ ICU4XError_TimeZoneOffsetOutOfBoundsError = 2560,
+ ICU4XError_TimeZoneInvalidOffsetError = 2561,
+ ICU4XError_TimeZoneMissingInputError = 2562,
+ ICU4XError_TimeZoneInvalidIdError = 2563,
+ ICU4XError_NormalizerFutureExtensionError = 2816,
+ ICU4XError_NormalizerValidationError = 2817,
+} ICU4XError;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XError_destroy(ICU4XError* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XError.hpp b/intl/icu_capi/cpp/include/ICU4XError.hpp
new file mode 100644
index 0000000000..1a306ca2b5
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XError.hpp
@@ -0,0 +1,104 @@
+#ifndef ICU4XError_HPP
+#define ICU4XError_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XError.h"
+
+
+
+/**
+ * A common enum for errors that ICU4X may return, organized by API
+ *
+ * The error names are stable and can be checked against as strings in the JS API
+ *
+ * Additional information: [1](https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FixedDecimalError.html), [2](https://docs.rs/icu/latest/icu/calendar/enum.CalendarError.html), [3](https://docs.rs/icu/latest/icu/collator/enum.CollatorError.html), [4](https://docs.rs/icu/latest/icu/datetime/enum.DateTimeError.html), [5](https://docs.rs/icu/latest/icu/decimal/enum.DecimalError.html), [6](https://docs.rs/icu/latest/icu/list/enum.ListError.html), [7](https://docs.rs/icu/latest/icu/locid/enum.ParserError.html), [8](https://docs.rs/icu/latest/icu/locid_transform/enum.LocaleTransformError.html), [9](https://docs.rs/icu/latest/icu/normalizer/enum.NormalizerError.html), [10](https://docs.rs/icu/latest/icu/plurals/enum.PluralsError.html), [11](https://docs.rs/icu/latest/icu/properties/enum.PropertiesError.html), [12](https://docs.rs/icu/latest/icu/provider/struct.DataError.html), [13](https://docs.rs/icu/latest/icu/provider/enum.DataErrorKind.html), [14](https://docs.rs/icu/latest/icu/segmenter/enum.SegmenterError.html), [15](https://docs.rs/icu/latest/icu/timezone/enum.TimeZoneError.html)
+ */
+enum struct ICU4XError {
+
+ /**
+ * The error is not currently categorized as ICU4XError.
+ * Please file a bug
+ */
+ UnknownError = 0,
+
+ /**
+ * An error arising from writing to a string
+ * Typically found when not enough space is allocated
+ * Most APIs that return a string may return this error
+ */
+ WriteableError = 1,
+ OutOfBoundsError = 2,
+ DataMissingDataKeyError = 256,
+ DataMissingVariantError = 257,
+ DataMissingLocaleError = 258,
+ DataNeedsVariantError = 259,
+ DataNeedsLocaleError = 260,
+ DataExtraneousLocaleError = 261,
+ DataFilteredResourceError = 262,
+ DataMismatchedTypeError = 263,
+ DataMissingPayloadError = 264,
+ DataInvalidStateError = 265,
+ DataCustomError = 266,
+ DataIoError = 267,
+ DataUnavailableBufferFormatError = 268,
+ DataMismatchedAnyBufferError = 269,
+
+ /**
+ * The subtag being requested was not set
+ */
+ LocaleUndefinedSubtagError = 512,
+
+ /**
+ * The locale or subtag string failed to parse
+ */
+ LocaleParserLanguageError = 513,
+ LocaleParserSubtagError = 514,
+ LocaleParserExtensionError = 515,
+
+ /**
+ * Attempted to construct an invalid data struct
+ */
+ DataStructValidityError = 768,
+ PropertyUnknownScriptIdError = 1024,
+ PropertyUnknownGeneralCategoryGroupError = 1025,
+ PropertyUnexpectedPropertyNameError = 1026,
+ FixedDecimalLimitError = 1280,
+ FixedDecimalSyntaxError = 1281,
+ PluralsParserError = 1536,
+ CalendarParseError = 1792,
+ CalendarOverflowError = 1793,
+ CalendarUnderflowError = 1794,
+ CalendarOutOfRangeError = 1795,
+ CalendarUnknownEraError = 1796,
+ CalendarUnknownMonthCodeError = 1797,
+ CalendarMissingInputError = 1798,
+ CalendarUnknownKindError = 1799,
+ CalendarMissingError = 1800,
+ DateTimePatternError = 2048,
+ DateTimeMissingInputFieldError = 2049,
+ DateTimeSkeletonError = 2050,
+ DateTimeUnsupportedFieldError = 2051,
+ DateTimeUnsupportedOptionsError = 2052,
+ DateTimeMissingWeekdaySymbolError = 2053,
+ DateTimeMissingMonthSymbolError = 2054,
+ DateTimeFixedDecimalError = 2055,
+ DateTimeMismatchedCalendarError = 2056,
+ TinyStrTooLargeError = 2304,
+ TinyStrContainsNullError = 2305,
+ TinyStrNonAsciiError = 2306,
+ TimeZoneOffsetOutOfBoundsError = 2560,
+ TimeZoneInvalidOffsetError = 2561,
+ TimeZoneMissingInputError = 2562,
+ TimeZoneInvalidIdError = 2563,
+ NormalizerFutureExtensionError = 2816,
+ NormalizerValidationError = 2817,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XFixedDecimal.h b/intl/icu_capi/cpp/include/ICU4XFixedDecimal.h
new file mode 100644
index 0000000000..361294b687
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XFixedDecimal.h
@@ -0,0 +1,101 @@
+#ifndef ICU4XFixedDecimal_H
+#define ICU4XFixedDecimal_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XFixedDecimal ICU4XFixedDecimal;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XFixedDecimal_ICU4XError.h"
+#include "ICU4XFixedDecimalSign.h"
+#include "ICU4XFixedDecimalSignDisplay.h"
+#include "diplomat_result_void_void.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_i32(int32_t v);
+
+ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_u32(uint32_t v);
+
+ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_i64(int64_t v);
+
+ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_u64(uint64_t v);
+
+diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_integer_precision(double f);
+
+diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_lower_magnitude(double f, int16_t magnitude);
+
+diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_significant_digits(double f, uint8_t digits);
+
+diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_floating_precision(double f);
+
+diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_string(const char* v_data, size_t v_len);
+
+uint8_t ICU4XFixedDecimal_digit_at(const ICU4XFixedDecimal* self, int16_t magnitude);
+
+int16_t ICU4XFixedDecimal_magnitude_start(const ICU4XFixedDecimal* self);
+
+int16_t ICU4XFixedDecimal_magnitude_end(const ICU4XFixedDecimal* self);
+
+int16_t ICU4XFixedDecimal_nonzero_magnitude_start(const ICU4XFixedDecimal* self);
+
+int16_t ICU4XFixedDecimal_nonzero_magnitude_end(const ICU4XFixedDecimal* self);
+
+bool ICU4XFixedDecimal_is_zero(const ICU4XFixedDecimal* self);
+
+void ICU4XFixedDecimal_multiply_pow10(ICU4XFixedDecimal* self, int16_t power);
+
+ICU4XFixedDecimalSign ICU4XFixedDecimal_sign(const ICU4XFixedDecimal* self);
+
+void ICU4XFixedDecimal_set_sign(ICU4XFixedDecimal* self, ICU4XFixedDecimalSign sign);
+
+void ICU4XFixedDecimal_apply_sign_display(ICU4XFixedDecimal* self, ICU4XFixedDecimalSignDisplay sign_display);
+
+void ICU4XFixedDecimal_trim_start(ICU4XFixedDecimal* self);
+
+void ICU4XFixedDecimal_trim_end(ICU4XFixedDecimal* self);
+
+void ICU4XFixedDecimal_pad_start(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_pad_end(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_set_max_position(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_trunc(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_half_trunc(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_expand(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_half_expand(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_ceil(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_half_ceil(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_floor(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_half_floor(ICU4XFixedDecimal* self, int16_t position);
+
+void ICU4XFixedDecimal_half_even(ICU4XFixedDecimal* self, int16_t position);
+
+diplomat_result_void_void ICU4XFixedDecimal_concatenate_end(ICU4XFixedDecimal* self, ICU4XFixedDecimal* other);
+
+void ICU4XFixedDecimal_to_string(const ICU4XFixedDecimal* self, DiplomatWriteable* to);
+void ICU4XFixedDecimal_destroy(ICU4XFixedDecimal* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XFixedDecimal.hpp b/intl/icu_capi/cpp/include/ICU4XFixedDecimal.hpp
new file mode 100644
index 0000000000..fed2ac629a
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XFixedDecimal.hpp
@@ -0,0 +1,426 @@
+#ifndef ICU4XFixedDecimal_HPP
+#define ICU4XFixedDecimal_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XFixedDecimal.h"
+
+class ICU4XFixedDecimal;
+#include "ICU4XError.hpp"
+#include "ICU4XFixedDecimalSign.hpp"
+#include "ICU4XFixedDecimalSignDisplay.hpp"
+
+/**
+ * A destruction policy for using ICU4XFixedDecimal with std::unique_ptr.
+ */
+struct ICU4XFixedDecimalDeleter {
+ void operator()(capi::ICU4XFixedDecimal* l) const noexcept {
+ capi::ICU4XFixedDecimal_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `FixedDecimal`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html) for more information.
+ */
+class ICU4XFixedDecimal {
+ public:
+
+ /**
+ * Construct an [`ICU4XFixedDecimal`] from an integer.
+ *
+ * See the [Rust documentation for `FixedDecimal`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html) for more information.
+ */
+ static ICU4XFixedDecimal create_from_i32(int32_t v);
+
+ /**
+ * Construct an [`ICU4XFixedDecimal`] from an integer.
+ *
+ * See the [Rust documentation for `FixedDecimal`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html) for more information.
+ */
+ static ICU4XFixedDecimal create_from_u32(uint32_t v);
+
+ /**
+ * Construct an [`ICU4XFixedDecimal`] from an integer.
+ *
+ * See the [Rust documentation for `FixedDecimal`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html) for more information.
+ */
+ static ICU4XFixedDecimal create_from_i64(int64_t v);
+
+ /**
+ * Construct an [`ICU4XFixedDecimal`] from an integer.
+ *
+ * See the [Rust documentation for `FixedDecimal`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html) for more information.
+ */
+ static ICU4XFixedDecimal create_from_u64(uint64_t v);
+
+ /**
+ * Construct an [`ICU4XFixedDecimal`] from an integer-valued float
+ *
+ * See the [Rust documentation for `try_from_f64`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64) for more information.
+ *
+ * See the [Rust documentation for `FloatPrecision`](https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html) for more information.
+ */
+ static diplomat::result<ICU4XFixedDecimal, ICU4XError> create_from_f64_with_integer_precision(double f);
+
+ /**
+ * Construct an [`ICU4XFixedDecimal`] from an float, with a given power of 10 for the lower magnitude
+ *
+ * See the [Rust documentation for `try_from_f64`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64) for more information.
+ *
+ * See the [Rust documentation for `FloatPrecision`](https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html) for more information.
+ */
+ static diplomat::result<ICU4XFixedDecimal, ICU4XError> create_from_f64_with_lower_magnitude(double f, int16_t magnitude);
+
+ /**
+ * Construct an [`ICU4XFixedDecimal`] from an float, for a given number of significant digits
+ *
+ * See the [Rust documentation for `try_from_f64`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64) for more information.
+ *
+ * See the [Rust documentation for `FloatPrecision`](https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html) for more information.
+ */
+ static diplomat::result<ICU4XFixedDecimal, ICU4XError> create_from_f64_with_significant_digits(double f, uint8_t digits);
+
+ /**
+ * Construct an [`ICU4XFixedDecimal`] from an float, with enough digits to recover
+ * the original floating point in IEEE 754 without needing trailing zeros
+ *
+ * See the [Rust documentation for `try_from_f64`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64) for more information.
+ *
+ * See the [Rust documentation for `FloatPrecision`](https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html) for more information.
+ */
+ static diplomat::result<ICU4XFixedDecimal, ICU4XError> create_from_f64_with_floating_precision(double f);
+
+ /**
+ * Construct an [`ICU4XFixedDecimal`] from a string.
+ *
+ * See the [Rust documentation for `from_str`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.from_str) for more information.
+ */
+ static diplomat::result<ICU4XFixedDecimal, ICU4XError> create_from_string(const std::string_view v);
+
+ /**
+ * See the [Rust documentation for `digit_at`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.digit_at) for more information.
+ */
+ uint8_t digit_at(int16_t magnitude) const;
+
+ /**
+ * See the [Rust documentation for `magnitude_range`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.magnitude_range) for more information.
+ */
+ int16_t magnitude_start() const;
+
+ /**
+ * See the [Rust documentation for `magnitude_range`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.magnitude_range) for more information.
+ */
+ int16_t magnitude_end() const;
+
+ /**
+ * See the [Rust documentation for `nonzero_magnitude_start`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.nonzero_magnitude_start) for more information.
+ */
+ int16_t nonzero_magnitude_start() const;
+
+ /**
+ * See the [Rust documentation for `nonzero_magnitude_end`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.nonzero_magnitude_end) for more information.
+ */
+ int16_t nonzero_magnitude_end() const;
+
+ /**
+ * See the [Rust documentation for `is_zero`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.is_zero) for more information.
+ */
+ bool is_zero() const;
+
+ /**
+ * Multiply the [`ICU4XFixedDecimal`] by a given power of ten.
+ *
+ * See the [Rust documentation for `multiply_pow10`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.multiply_pow10) for more information.
+ */
+ void multiply_pow10(int16_t power);
+
+ /**
+ * See the [Rust documentation for `sign`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.sign) for more information.
+ */
+ ICU4XFixedDecimalSign sign() const;
+
+ /**
+ * Set the sign of the [`ICU4XFixedDecimal`].
+ *
+ * See the [Rust documentation for `set_sign`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.set_sign) for more information.
+ */
+ void set_sign(ICU4XFixedDecimalSign sign);
+
+ /**
+ * See the [Rust documentation for `apply_sign_display`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.apply_sign_display) for more information.
+ */
+ void apply_sign_display(ICU4XFixedDecimalSignDisplay sign_display);
+
+ /**
+ * See the [Rust documentation for `trim_start`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trim_start) for more information.
+ */
+ void trim_start();
+
+ /**
+ * See the [Rust documentation for `trim_end`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trim_end) for more information.
+ */
+ void trim_end();
+
+ /**
+ * Zero-pad the [`ICU4XFixedDecimal`] on the left to a particular position
+ *
+ * See the [Rust documentation for `pad_start`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.pad_start) for more information.
+ */
+ void pad_start(int16_t position);
+
+ /**
+ * Zero-pad the [`ICU4XFixedDecimal`] on the right to a particular position
+ *
+ * See the [Rust documentation for `pad_end`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.pad_end) for more information.
+ */
+ void pad_end(int16_t position);
+
+ /**
+ * Truncate the [`ICU4XFixedDecimal`] on the left to a particular position, deleting digits if necessary. This is useful for, e.g. abbreviating years
+ * ("2022" -> "22")
+ *
+ * See the [Rust documentation for `set_max_position`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.set_max_position) for more information.
+ */
+ void set_max_position(int16_t position);
+
+ /**
+ * See the [Rust documentation for `trunc`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trunc) for more information.
+ */
+ void trunc(int16_t position);
+
+ /**
+ * See the [Rust documentation for `half_trunc`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_trunc) for more information.
+ */
+ void half_trunc(int16_t position);
+
+ /**
+ * See the [Rust documentation for `expand`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.expand) for more information.
+ */
+ void expand(int16_t position);
+
+ /**
+ * See the [Rust documentation for `half_expand`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_expand) for more information.
+ */
+ void half_expand(int16_t position);
+
+ /**
+ * See the [Rust documentation for `ceil`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.ceil) for more information.
+ */
+ void ceil(int16_t position);
+
+ /**
+ * See the [Rust documentation for `half_ceil`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_ceil) for more information.
+ */
+ void half_ceil(int16_t position);
+
+ /**
+ * See the [Rust documentation for `floor`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.floor) for more information.
+ */
+ void floor(int16_t position);
+
+ /**
+ * See the [Rust documentation for `half_floor`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_floor) for more information.
+ */
+ void half_floor(int16_t position);
+
+ /**
+ * See the [Rust documentation for `half_even`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_even) for more information.
+ */
+ void half_even(int16_t position);
+
+ /**
+ * Concatenates `other` to the end of `self`.
+ *
+ * If successful, `other` will be set to 0 and a successful status is returned.
+ *
+ * If not successful, `other` will be unchanged and an error is returned.
+ *
+ * See the [Rust documentation for `concatenate_end`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.concatenate_end) for more information.
+ */
+ diplomat::result<std::monostate, std::monostate> concatenate_end(ICU4XFixedDecimal& other);
+
+ /**
+ * Format the [`ICU4XFixedDecimal`] as a string.
+ *
+ * See the [Rust documentation for `write_to`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.write_to) for more information.
+ */
+ template<typename W> void to_string_to_writeable(W& to) const;
+
+ /**
+ * Format the [`ICU4XFixedDecimal`] as a string.
+ *
+ * See the [Rust documentation for `write_to`](https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.write_to) for more information.
+ */
+ std::string to_string() const;
+ inline const capi::ICU4XFixedDecimal* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XFixedDecimal* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XFixedDecimal(capi::ICU4XFixedDecimal* i) : inner(i) {}
+ ICU4XFixedDecimal() = default;
+ ICU4XFixedDecimal(ICU4XFixedDecimal&&) noexcept = default;
+ ICU4XFixedDecimal& operator=(ICU4XFixedDecimal&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XFixedDecimal, ICU4XFixedDecimalDeleter> inner;
+};
+
+
+inline ICU4XFixedDecimal ICU4XFixedDecimal::create_from_i32(int32_t v) {
+ return ICU4XFixedDecimal(capi::ICU4XFixedDecimal_create_from_i32(v));
+}
+inline ICU4XFixedDecimal ICU4XFixedDecimal::create_from_u32(uint32_t v) {
+ return ICU4XFixedDecimal(capi::ICU4XFixedDecimal_create_from_u32(v));
+}
+inline ICU4XFixedDecimal ICU4XFixedDecimal::create_from_i64(int64_t v) {
+ return ICU4XFixedDecimal(capi::ICU4XFixedDecimal_create_from_i64(v));
+}
+inline ICU4XFixedDecimal ICU4XFixedDecimal::create_from_u64(uint64_t v) {
+ return ICU4XFixedDecimal(capi::ICU4XFixedDecimal_create_from_u64(v));
+}
+inline diplomat::result<ICU4XFixedDecimal, ICU4XError> ICU4XFixedDecimal::create_from_f64_with_integer_precision(double f) {
+ auto diplomat_result_raw_out_value = capi::ICU4XFixedDecimal_create_from_f64_with_integer_precision(f);
+ diplomat::result<ICU4XFixedDecimal, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XFixedDecimal>(ICU4XFixedDecimal(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XFixedDecimal, ICU4XError> ICU4XFixedDecimal::create_from_f64_with_lower_magnitude(double f, int16_t magnitude) {
+ auto diplomat_result_raw_out_value = capi::ICU4XFixedDecimal_create_from_f64_with_lower_magnitude(f, magnitude);
+ diplomat::result<ICU4XFixedDecimal, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XFixedDecimal>(ICU4XFixedDecimal(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XFixedDecimal, ICU4XError> ICU4XFixedDecimal::create_from_f64_with_significant_digits(double f, uint8_t digits) {
+ auto diplomat_result_raw_out_value = capi::ICU4XFixedDecimal_create_from_f64_with_significant_digits(f, digits);
+ diplomat::result<ICU4XFixedDecimal, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XFixedDecimal>(ICU4XFixedDecimal(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XFixedDecimal, ICU4XError> ICU4XFixedDecimal::create_from_f64_with_floating_precision(double f) {
+ auto diplomat_result_raw_out_value = capi::ICU4XFixedDecimal_create_from_f64_with_floating_precision(f);
+ diplomat::result<ICU4XFixedDecimal, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XFixedDecimal>(ICU4XFixedDecimal(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XFixedDecimal, ICU4XError> ICU4XFixedDecimal::create_from_string(const std::string_view v) {
+ auto diplomat_result_raw_out_value = capi::ICU4XFixedDecimal_create_from_string(v.data(), v.size());
+ diplomat::result<ICU4XFixedDecimal, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XFixedDecimal>(ICU4XFixedDecimal(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline uint8_t ICU4XFixedDecimal::digit_at(int16_t magnitude) const {
+ return capi::ICU4XFixedDecimal_digit_at(this->inner.get(), magnitude);
+}
+inline int16_t ICU4XFixedDecimal::magnitude_start() const {
+ return capi::ICU4XFixedDecimal_magnitude_start(this->inner.get());
+}
+inline int16_t ICU4XFixedDecimal::magnitude_end() const {
+ return capi::ICU4XFixedDecimal_magnitude_end(this->inner.get());
+}
+inline int16_t ICU4XFixedDecimal::nonzero_magnitude_start() const {
+ return capi::ICU4XFixedDecimal_nonzero_magnitude_start(this->inner.get());
+}
+inline int16_t ICU4XFixedDecimal::nonzero_magnitude_end() const {
+ return capi::ICU4XFixedDecimal_nonzero_magnitude_end(this->inner.get());
+}
+inline bool ICU4XFixedDecimal::is_zero() const {
+ return capi::ICU4XFixedDecimal_is_zero(this->inner.get());
+}
+inline void ICU4XFixedDecimal::multiply_pow10(int16_t power) {
+ capi::ICU4XFixedDecimal_multiply_pow10(this->inner.get(), power);
+}
+inline ICU4XFixedDecimalSign ICU4XFixedDecimal::sign() const {
+ return static_cast<ICU4XFixedDecimalSign>(capi::ICU4XFixedDecimal_sign(this->inner.get()));
+}
+inline void ICU4XFixedDecimal::set_sign(ICU4XFixedDecimalSign sign) {
+ capi::ICU4XFixedDecimal_set_sign(this->inner.get(), static_cast<capi::ICU4XFixedDecimalSign>(sign));
+}
+inline void ICU4XFixedDecimal::apply_sign_display(ICU4XFixedDecimalSignDisplay sign_display) {
+ capi::ICU4XFixedDecimal_apply_sign_display(this->inner.get(), static_cast<capi::ICU4XFixedDecimalSignDisplay>(sign_display));
+}
+inline void ICU4XFixedDecimal::trim_start() {
+ capi::ICU4XFixedDecimal_trim_start(this->inner.get());
+}
+inline void ICU4XFixedDecimal::trim_end() {
+ capi::ICU4XFixedDecimal_trim_end(this->inner.get());
+}
+inline void ICU4XFixedDecimal::pad_start(int16_t position) {
+ capi::ICU4XFixedDecimal_pad_start(this->inner.get(), position);
+}
+inline void ICU4XFixedDecimal::pad_end(int16_t position) {
+ capi::ICU4XFixedDecimal_pad_end(this->inner.get(), position);
+}
+inline void ICU4XFixedDecimal::set_max_position(int16_t position) {
+ capi::ICU4XFixedDecimal_set_max_position(this->inner.get(), position);
+}
+inline void ICU4XFixedDecimal::trunc(int16_t position) {
+ capi::ICU4XFixedDecimal_trunc(this->inner.get(), position);
+}
+inline void ICU4XFixedDecimal::half_trunc(int16_t position) {
+ capi::ICU4XFixedDecimal_half_trunc(this->inner.get(), position);
+}
+inline void ICU4XFixedDecimal::expand(int16_t position) {
+ capi::ICU4XFixedDecimal_expand(this->inner.get(), position);
+}
+inline void ICU4XFixedDecimal::half_expand(int16_t position) {
+ capi::ICU4XFixedDecimal_half_expand(this->inner.get(), position);
+}
+inline void ICU4XFixedDecimal::ceil(int16_t position) {
+ capi::ICU4XFixedDecimal_ceil(this->inner.get(), position);
+}
+inline void ICU4XFixedDecimal::half_ceil(int16_t position) {
+ capi::ICU4XFixedDecimal_half_ceil(this->inner.get(), position);
+}
+inline void ICU4XFixedDecimal::floor(int16_t position) {
+ capi::ICU4XFixedDecimal_floor(this->inner.get(), position);
+}
+inline void ICU4XFixedDecimal::half_floor(int16_t position) {
+ capi::ICU4XFixedDecimal_half_floor(this->inner.get(), position);
+}
+inline void ICU4XFixedDecimal::half_even(int16_t position) {
+ capi::ICU4XFixedDecimal_half_even(this->inner.get(), position);
+}
+inline diplomat::result<std::monostate, std::monostate> ICU4XFixedDecimal::concatenate_end(ICU4XFixedDecimal& other) {
+ auto diplomat_result_raw_out_value = capi::ICU4XFixedDecimal_concatenate_end(this->inner.get(), other.AsFFIMut());
+ diplomat::result<std::monostate, std::monostate> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err(std::monostate());
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline void ICU4XFixedDecimal::to_string_to_writeable(W& to) const {
+ capi::DiplomatWriteable to_writer = diplomat::WriteableTrait<W>::Construct(to);
+ capi::ICU4XFixedDecimal_to_string(this->inner.get(), &to_writer);
+}
+inline std::string ICU4XFixedDecimal::to_string() const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ capi::ICU4XFixedDecimal_to_string(this->inner.get(), &diplomat_writeable_out);
+ return diplomat_writeable_string;
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XFixedDecimalFormatter.h b/intl/icu_capi/cpp/include/ICU4XFixedDecimalFormatter.h
new file mode 100644
index 0000000000..aa1cfd6a48
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XFixedDecimalFormatter.h
@@ -0,0 +1,40 @@
+#ifndef ICU4XFixedDecimalFormatter_H
+#define ICU4XFixedDecimalFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XFixedDecimalFormatter ICU4XFixedDecimalFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XFixedDecimalGroupingStrategy.h"
+#include "diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.h"
+#include "ICU4XDataStruct.h"
+#include "ICU4XFixedDecimal.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError ICU4XFixedDecimalFormatter_create_with_grouping_strategy(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XFixedDecimalGroupingStrategy grouping_strategy);
+
+diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError ICU4XFixedDecimalFormatter_create_with_decimal_symbols_v1(const ICU4XDataStruct* data_struct, ICU4XFixedDecimalGroupingStrategy grouping_strategy);
+
+diplomat_result_void_ICU4XError ICU4XFixedDecimalFormatter_format(const ICU4XFixedDecimalFormatter* self, const ICU4XFixedDecimal* value, DiplomatWriteable* write);
+void ICU4XFixedDecimalFormatter_destroy(ICU4XFixedDecimalFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XFixedDecimalFormatter.hpp b/intl/icu_capi/cpp/include/ICU4XFixedDecimalFormatter.hpp
new file mode 100644
index 0000000000..9ba29490e7
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XFixedDecimalFormatter.hpp
@@ -0,0 +1,126 @@
+#ifndef ICU4XFixedDecimalFormatter_HPP
+#define ICU4XFixedDecimalFormatter_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XFixedDecimalFormatter.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+#include "ICU4XFixedDecimalGroupingStrategy.hpp"
+class ICU4XFixedDecimalFormatter;
+#include "ICU4XError.hpp"
+class ICU4XDataStruct;
+class ICU4XFixedDecimal;
+
+/**
+ * A destruction policy for using ICU4XFixedDecimalFormatter with std::unique_ptr.
+ */
+struct ICU4XFixedDecimalFormatterDeleter {
+ void operator()(capi::ICU4XFixedDecimalFormatter* l) const noexcept {
+ capi::ICU4XFixedDecimalFormatter_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X Fixed Decimal Format object, capable of formatting a [`ICU4XFixedDecimal`] as a string.
+ *
+ * See the [Rust documentation for `FixedDecimalFormatter`](https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html) for more information.
+ */
+class ICU4XFixedDecimalFormatter {
+ public:
+
+ /**
+ * Creates a new [`ICU4XFixedDecimalFormatter`] from locale data.
+ *
+ * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.try_new) for more information.
+ */
+ static diplomat::result<ICU4XFixedDecimalFormatter, ICU4XError> create_with_grouping_strategy(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XFixedDecimalGroupingStrategy grouping_strategy);
+
+ /**
+ * Creates a new [`ICU4XFixedDecimalFormatter`] from preconstructed locale data in the form of an [`ICU4XDataStruct`]
+ * constructed from `ICU4XDataStruct::create_decimal_symbols()`.
+ *
+ * The contents of the data struct will be consumed: if you wish to use the struct again it will have to be reconstructed.
+ * Passing a consumed struct to this method will return an error.
+ */
+ static diplomat::result<ICU4XFixedDecimalFormatter, ICU4XError> create_with_decimal_symbols_v1(const ICU4XDataStruct& data_struct, ICU4XFixedDecimalGroupingStrategy grouping_strategy);
+
+ /**
+ * Formats a [`ICU4XFixedDecimal`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_to_writeable(const ICU4XFixedDecimal& value, W& write) const;
+
+ /**
+ * Formats a [`ICU4XFixedDecimal`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format(const ICU4XFixedDecimal& value) const;
+ inline const capi::ICU4XFixedDecimalFormatter* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XFixedDecimalFormatter* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XFixedDecimalFormatter(capi::ICU4XFixedDecimalFormatter* i) : inner(i) {}
+ ICU4XFixedDecimalFormatter() = default;
+ ICU4XFixedDecimalFormatter(ICU4XFixedDecimalFormatter&&) noexcept = default;
+ ICU4XFixedDecimalFormatter& operator=(ICU4XFixedDecimalFormatter&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XFixedDecimalFormatter, ICU4XFixedDecimalFormatterDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+#include "ICU4XDataStruct.hpp"
+#include "ICU4XFixedDecimal.hpp"
+
+inline diplomat::result<ICU4XFixedDecimalFormatter, ICU4XError> ICU4XFixedDecimalFormatter::create_with_grouping_strategy(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XFixedDecimalGroupingStrategy grouping_strategy) {
+ auto diplomat_result_raw_out_value = capi::ICU4XFixedDecimalFormatter_create_with_grouping_strategy(provider.AsFFI(), locale.AsFFI(), static_cast<capi::ICU4XFixedDecimalGroupingStrategy>(grouping_strategy));
+ diplomat::result<ICU4XFixedDecimalFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XFixedDecimalFormatter>(ICU4XFixedDecimalFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XFixedDecimalFormatter, ICU4XError> ICU4XFixedDecimalFormatter::create_with_decimal_symbols_v1(const ICU4XDataStruct& data_struct, ICU4XFixedDecimalGroupingStrategy grouping_strategy) {
+ auto diplomat_result_raw_out_value = capi::ICU4XFixedDecimalFormatter_create_with_decimal_symbols_v1(data_struct.AsFFI(), static_cast<capi::ICU4XFixedDecimalGroupingStrategy>(grouping_strategy));
+ diplomat::result<ICU4XFixedDecimalFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XFixedDecimalFormatter>(ICU4XFixedDecimalFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XFixedDecimalFormatter::format_to_writeable(const ICU4XFixedDecimal& value, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XFixedDecimalFormatter_format(this->inner.get(), value.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XFixedDecimalFormatter::format(const ICU4XFixedDecimal& value) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XFixedDecimalFormatter_format(this->inner.get(), value.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XFixedDecimalGroupingStrategy.h b/intl/icu_capi/cpp/include/ICU4XFixedDecimalGroupingStrategy.h
new file mode 100644
index 0000000000..7648892cc5
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XFixedDecimalGroupingStrategy.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XFixedDecimalGroupingStrategy_H
+#define ICU4XFixedDecimalGroupingStrategy_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XFixedDecimalGroupingStrategy {
+ ICU4XFixedDecimalGroupingStrategy_Auto = 0,
+ ICU4XFixedDecimalGroupingStrategy_Never = 1,
+ ICU4XFixedDecimalGroupingStrategy_Always = 2,
+ ICU4XFixedDecimalGroupingStrategy_Min2 = 3,
+} ICU4XFixedDecimalGroupingStrategy;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XFixedDecimalGroupingStrategy_destroy(ICU4XFixedDecimalGroupingStrategy* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XFixedDecimalGroupingStrategy.hpp b/intl/icu_capi/cpp/include/ICU4XFixedDecimalGroupingStrategy.hpp
new file mode 100644
index 0000000000..85effe2fc5
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XFixedDecimalGroupingStrategy.hpp
@@ -0,0 +1,26 @@
+#ifndef ICU4XFixedDecimalGroupingStrategy_HPP
+#define ICU4XFixedDecimalGroupingStrategy_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XFixedDecimalGroupingStrategy.h"
+
+
+
+/**
+ * See the [Rust documentation for `GroupingStrategy`](https://docs.rs/icu/latest/icu/decimal/options/enum.GroupingStrategy.html) for more information.
+ */
+enum struct ICU4XFixedDecimalGroupingStrategy {
+ Auto = 0,
+ Never = 1,
+ Always = 2,
+ Min2 = 3,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XFixedDecimalSign.h b/intl/icu_capi/cpp/include/ICU4XFixedDecimalSign.h
new file mode 100644
index 0000000000..12fff3cf1c
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XFixedDecimalSign.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XFixedDecimalSign_H
+#define ICU4XFixedDecimalSign_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XFixedDecimalSign {
+ ICU4XFixedDecimalSign_None = 0,
+ ICU4XFixedDecimalSign_Negative = 1,
+ ICU4XFixedDecimalSign_Positive = 2,
+} ICU4XFixedDecimalSign;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XFixedDecimalSign_destroy(ICU4XFixedDecimalSign* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XFixedDecimalSign.hpp b/intl/icu_capi/cpp/include/ICU4XFixedDecimalSign.hpp
new file mode 100644
index 0000000000..b56cdfc4b6
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XFixedDecimalSign.hpp
@@ -0,0 +1,39 @@
+#ifndef ICU4XFixedDecimalSign_HPP
+#define ICU4XFixedDecimalSign_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XFixedDecimalSign.h"
+
+
+
+/**
+ * The sign of a FixedDecimal, as shown in formatting.
+ *
+ * See the [Rust documentation for `Sign`](https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.Sign.html) for more information.
+ */
+enum struct ICU4XFixedDecimalSign {
+
+ /**
+ * No sign (implicitly positive, e.g., 1729).
+ */
+ None = 0,
+
+ /**
+ * A negative sign, e.g., -1729.
+ */
+ Negative = 1,
+
+ /**
+ * An explicit positive sign, e.g., +1729.
+ */
+ Positive = 2,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XFixedDecimalSignDisplay.h b/intl/icu_capi/cpp/include/ICU4XFixedDecimalSignDisplay.h
new file mode 100644
index 0000000000..8c2612e516
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XFixedDecimalSignDisplay.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XFixedDecimalSignDisplay_H
+#define ICU4XFixedDecimalSignDisplay_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XFixedDecimalSignDisplay {
+ ICU4XFixedDecimalSignDisplay_Auto = 0,
+ ICU4XFixedDecimalSignDisplay_Never = 1,
+ ICU4XFixedDecimalSignDisplay_Always = 2,
+ ICU4XFixedDecimalSignDisplay_ExceptZero = 3,
+ ICU4XFixedDecimalSignDisplay_Negative = 4,
+} ICU4XFixedDecimalSignDisplay;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XFixedDecimalSignDisplay_destroy(ICU4XFixedDecimalSignDisplay* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XFixedDecimalSignDisplay.hpp b/intl/icu_capi/cpp/include/ICU4XFixedDecimalSignDisplay.hpp
new file mode 100644
index 0000000000..6261edacea
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XFixedDecimalSignDisplay.hpp
@@ -0,0 +1,29 @@
+#ifndef ICU4XFixedDecimalSignDisplay_HPP
+#define ICU4XFixedDecimalSignDisplay_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XFixedDecimalSignDisplay.h"
+
+
+
+/**
+ * ECMA-402 compatible sign display preference.
+ *
+ * See the [Rust documentation for `SignDisplay`](https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.SignDisplay.html) for more information.
+ */
+enum struct ICU4XFixedDecimalSignDisplay {
+ Auto = 0,
+ Never = 1,
+ Always = 2,
+ ExceptZero = 3,
+ Negative = 4,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGeneralCategoryNameToMaskMapper.h b/intl/icu_capi/cpp/include/ICU4XGeneralCategoryNameToMaskMapper.h
new file mode 100644
index 0000000000..3a4e2d4d13
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGeneralCategoryNameToMaskMapper.h
@@ -0,0 +1,35 @@
+#ifndef ICU4XGeneralCategoryNameToMaskMapper_H
+#define ICU4XGeneralCategoryNameToMaskMapper_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGeneralCategoryNameToMaskMapper ICU4XGeneralCategoryNameToMaskMapper;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+uint32_t ICU4XGeneralCategoryNameToMaskMapper_get_strict(const ICU4XGeneralCategoryNameToMaskMapper* self, const char* name_data, size_t name_len);
+
+uint32_t ICU4XGeneralCategoryNameToMaskMapper_get_loose(const ICU4XGeneralCategoryNameToMaskMapper* self, const char* name_data, size_t name_len);
+
+diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError ICU4XGeneralCategoryNameToMaskMapper_load(const ICU4XDataProvider* provider);
+void ICU4XGeneralCategoryNameToMaskMapper_destroy(ICU4XGeneralCategoryNameToMaskMapper* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGeneralCategoryNameToMaskMapper.hpp b/intl/icu_capi/cpp/include/ICU4XGeneralCategoryNameToMaskMapper.hpp
new file mode 100644
index 0000000000..0a7fe54be0
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGeneralCategoryNameToMaskMapper.hpp
@@ -0,0 +1,83 @@
+#ifndef ICU4XGeneralCategoryNameToMaskMapper_HPP
+#define ICU4XGeneralCategoryNameToMaskMapper_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XGeneralCategoryNameToMaskMapper.h"
+
+class ICU4XDataProvider;
+class ICU4XGeneralCategoryNameToMaskMapper;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XGeneralCategoryNameToMaskMapper with std::unique_ptr.
+ */
+struct ICU4XGeneralCategoryNameToMaskMapperDeleter {
+ void operator()(capi::ICU4XGeneralCategoryNameToMaskMapper* l) const noexcept {
+ capi::ICU4XGeneralCategoryNameToMaskMapper_destroy(l);
+ }
+};
+
+/**
+ * A type capable of looking up General Category mask values from a string name.
+ *
+ * See the [Rust documentation for `get_name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html#method.get_name_to_enum_mapper) for more information.
+ *
+ * See the [Rust documentation for `PropertyValueNameToEnumMapper`](https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapper.html) for more information.
+ */
+class ICU4XGeneralCategoryNameToMaskMapper {
+ public:
+
+ /**
+ * Get the mask value matching the given name, using strict matching
+ *
+ * Returns 0 if the name is unknown for this property
+ */
+ uint32_t get_strict(const std::string_view name) const;
+
+ /**
+ * Get the mask value matching the given name, using loose matching
+ *
+ * Returns 0 if the name is unknown for this property
+ */
+ uint32_t get_loose(const std::string_view name) const;
+
+ /**
+ * See the [Rust documentation for `get_name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html#method.get_name_to_enum_mapper) for more information.
+ */
+ static diplomat::result<ICU4XGeneralCategoryNameToMaskMapper, ICU4XError> load(const ICU4XDataProvider& provider);
+ inline const capi::ICU4XGeneralCategoryNameToMaskMapper* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XGeneralCategoryNameToMaskMapper* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XGeneralCategoryNameToMaskMapper(capi::ICU4XGeneralCategoryNameToMaskMapper* i) : inner(i) {}
+ ICU4XGeneralCategoryNameToMaskMapper() = default;
+ ICU4XGeneralCategoryNameToMaskMapper(ICU4XGeneralCategoryNameToMaskMapper&&) noexcept = default;
+ ICU4XGeneralCategoryNameToMaskMapper& operator=(ICU4XGeneralCategoryNameToMaskMapper&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XGeneralCategoryNameToMaskMapper, ICU4XGeneralCategoryNameToMaskMapperDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+
+inline uint32_t ICU4XGeneralCategoryNameToMaskMapper::get_strict(const std::string_view name) const {
+ return capi::ICU4XGeneralCategoryNameToMaskMapper_get_strict(this->inner.get(), name.data(), name.size());
+}
+inline uint32_t ICU4XGeneralCategoryNameToMaskMapper::get_loose(const std::string_view name) const {
+ return capi::ICU4XGeneralCategoryNameToMaskMapper_get_loose(this->inner.get(), name.data(), name.size());
+}
+inline diplomat::result<ICU4XGeneralCategoryNameToMaskMapper, ICU4XError> ICU4XGeneralCategoryNameToMaskMapper::load(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XGeneralCategoryNameToMaskMapper_load(provider.AsFFI());
+ diplomat::result<ICU4XGeneralCategoryNameToMaskMapper, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XGeneralCategoryNameToMaskMapper>(ICU4XGeneralCategoryNameToMaskMapper(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorLatin1.h b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorLatin1.h
new file mode 100644
index 0000000000..9e23489fd3
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorLatin1.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XGraphemeClusterBreakIteratorLatin1_H
+#define ICU4XGraphemeClusterBreakIteratorLatin1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGraphemeClusterBreakIteratorLatin1 ICU4XGraphemeClusterBreakIteratorLatin1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XGraphemeClusterBreakIteratorLatin1_next(ICU4XGraphemeClusterBreakIteratorLatin1* self);
+void ICU4XGraphemeClusterBreakIteratorLatin1_destroy(ICU4XGraphemeClusterBreakIteratorLatin1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorLatin1.hpp b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorLatin1.hpp
new file mode 100644
index 0000000000..3948a6e00b
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorLatin1.hpp
@@ -0,0 +1,51 @@
+#ifndef ICU4XGraphemeClusterBreakIteratorLatin1_HPP
+#define ICU4XGraphemeClusterBreakIteratorLatin1_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XGraphemeClusterBreakIteratorLatin1.h"
+
+
+/**
+ * A destruction policy for using ICU4XGraphemeClusterBreakIteratorLatin1 with std::unique_ptr.
+ */
+struct ICU4XGraphemeClusterBreakIteratorLatin1Deleter {
+ void operator()(capi::ICU4XGraphemeClusterBreakIteratorLatin1* l) const noexcept {
+ capi::ICU4XGraphemeClusterBreakIteratorLatin1_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `GraphemeClusterBreakIterator`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html) for more information.
+ */
+class ICU4XGraphemeClusterBreakIteratorLatin1 {
+ public:
+
+ /**
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ * out of range of a 32-bit signed integer.
+ *
+ * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next) for more information.
+ */
+ int32_t next();
+ inline const capi::ICU4XGraphemeClusterBreakIteratorLatin1* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XGraphemeClusterBreakIteratorLatin1* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XGraphemeClusterBreakIteratorLatin1(capi::ICU4XGraphemeClusterBreakIteratorLatin1* i) : inner(i) {}
+ ICU4XGraphemeClusterBreakIteratorLatin1() = default;
+ ICU4XGraphemeClusterBreakIteratorLatin1(ICU4XGraphemeClusterBreakIteratorLatin1&&) noexcept = default;
+ ICU4XGraphemeClusterBreakIteratorLatin1& operator=(ICU4XGraphemeClusterBreakIteratorLatin1&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XGraphemeClusterBreakIteratorLatin1, ICU4XGraphemeClusterBreakIteratorLatin1Deleter> inner;
+};
+
+
+inline int32_t ICU4XGraphemeClusterBreakIteratorLatin1::next() {
+ return capi::ICU4XGraphemeClusterBreakIteratorLatin1_next(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf16.h b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf16.h
new file mode 100644
index 0000000000..f0de4c0214
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf16.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XGraphemeClusterBreakIteratorUtf16_H
+#define ICU4XGraphemeClusterBreakIteratorUtf16_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGraphemeClusterBreakIteratorUtf16 ICU4XGraphemeClusterBreakIteratorUtf16;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XGraphemeClusterBreakIteratorUtf16_next(ICU4XGraphemeClusterBreakIteratorUtf16* self);
+void ICU4XGraphemeClusterBreakIteratorUtf16_destroy(ICU4XGraphemeClusterBreakIteratorUtf16* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf16.hpp b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf16.hpp
new file mode 100644
index 0000000000..3c16a0c53c
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf16.hpp
@@ -0,0 +1,51 @@
+#ifndef ICU4XGraphemeClusterBreakIteratorUtf16_HPP
+#define ICU4XGraphemeClusterBreakIteratorUtf16_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XGraphemeClusterBreakIteratorUtf16.h"
+
+
+/**
+ * A destruction policy for using ICU4XGraphemeClusterBreakIteratorUtf16 with std::unique_ptr.
+ */
+struct ICU4XGraphemeClusterBreakIteratorUtf16Deleter {
+ void operator()(capi::ICU4XGraphemeClusterBreakIteratorUtf16* l) const noexcept {
+ capi::ICU4XGraphemeClusterBreakIteratorUtf16_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `GraphemeClusterBreakIterator`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html) for more information.
+ */
+class ICU4XGraphemeClusterBreakIteratorUtf16 {
+ public:
+
+ /**
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ * out of range of a 32-bit signed integer.
+ *
+ * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next) for more information.
+ */
+ int32_t next();
+ inline const capi::ICU4XGraphemeClusterBreakIteratorUtf16* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XGraphemeClusterBreakIteratorUtf16* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XGraphemeClusterBreakIteratorUtf16(capi::ICU4XGraphemeClusterBreakIteratorUtf16* i) : inner(i) {}
+ ICU4XGraphemeClusterBreakIteratorUtf16() = default;
+ ICU4XGraphemeClusterBreakIteratorUtf16(ICU4XGraphemeClusterBreakIteratorUtf16&&) noexcept = default;
+ ICU4XGraphemeClusterBreakIteratorUtf16& operator=(ICU4XGraphemeClusterBreakIteratorUtf16&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XGraphemeClusterBreakIteratorUtf16, ICU4XGraphemeClusterBreakIteratorUtf16Deleter> inner;
+};
+
+
+inline int32_t ICU4XGraphemeClusterBreakIteratorUtf16::next() {
+ return capi::ICU4XGraphemeClusterBreakIteratorUtf16_next(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf8.h b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf8.h
new file mode 100644
index 0000000000..331b17eac7
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf8.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XGraphemeClusterBreakIteratorUtf8_H
+#define ICU4XGraphemeClusterBreakIteratorUtf8_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGraphemeClusterBreakIteratorUtf8 ICU4XGraphemeClusterBreakIteratorUtf8;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XGraphemeClusterBreakIteratorUtf8_next(ICU4XGraphemeClusterBreakIteratorUtf8* self);
+void ICU4XGraphemeClusterBreakIteratorUtf8_destroy(ICU4XGraphemeClusterBreakIteratorUtf8* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf8.hpp b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf8.hpp
new file mode 100644
index 0000000000..6e7bdcc0bd
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterBreakIteratorUtf8.hpp
@@ -0,0 +1,51 @@
+#ifndef ICU4XGraphemeClusterBreakIteratorUtf8_HPP
+#define ICU4XGraphemeClusterBreakIteratorUtf8_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XGraphemeClusterBreakIteratorUtf8.h"
+
+
+/**
+ * A destruction policy for using ICU4XGraphemeClusterBreakIteratorUtf8 with std::unique_ptr.
+ */
+struct ICU4XGraphemeClusterBreakIteratorUtf8Deleter {
+ void operator()(capi::ICU4XGraphemeClusterBreakIteratorUtf8* l) const noexcept {
+ capi::ICU4XGraphemeClusterBreakIteratorUtf8_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `GraphemeClusterBreakIterator`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html) for more information.
+ */
+class ICU4XGraphemeClusterBreakIteratorUtf8 {
+ public:
+
+ /**
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ * out of range of a 32-bit signed integer.
+ *
+ * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next) for more information.
+ */
+ int32_t next();
+ inline const capi::ICU4XGraphemeClusterBreakIteratorUtf8* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XGraphemeClusterBreakIteratorUtf8* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XGraphemeClusterBreakIteratorUtf8(capi::ICU4XGraphemeClusterBreakIteratorUtf8* i) : inner(i) {}
+ ICU4XGraphemeClusterBreakIteratorUtf8() = default;
+ ICU4XGraphemeClusterBreakIteratorUtf8(ICU4XGraphemeClusterBreakIteratorUtf8&&) noexcept = default;
+ ICU4XGraphemeClusterBreakIteratorUtf8& operator=(ICU4XGraphemeClusterBreakIteratorUtf8&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XGraphemeClusterBreakIteratorUtf8, ICU4XGraphemeClusterBreakIteratorUtf8Deleter> inner;
+};
+
+
+inline int32_t ICU4XGraphemeClusterBreakIteratorUtf8::next() {
+ return capi::ICU4XGraphemeClusterBreakIteratorUtf8_next(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGraphemeClusterSegmenter.h b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterSegmenter.h
new file mode 100644
index 0000000000..1805090bfb
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterSegmenter.h
@@ -0,0 +1,40 @@
+#ifndef ICU4XGraphemeClusterSegmenter_H
+#define ICU4XGraphemeClusterSegmenter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGraphemeClusterSegmenter ICU4XGraphemeClusterSegmenter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.h"
+#include "ICU4XGraphemeClusterBreakIteratorUtf8.h"
+#include "ICU4XGraphemeClusterBreakIteratorUtf16.h"
+#include "ICU4XGraphemeClusterBreakIteratorLatin1.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError ICU4XGraphemeClusterSegmenter_create(const ICU4XDataProvider* provider);
+
+ICU4XGraphemeClusterBreakIteratorUtf8* ICU4XGraphemeClusterSegmenter_segment_utf8(const ICU4XGraphemeClusterSegmenter* self, const char* input_data, size_t input_len);
+
+ICU4XGraphemeClusterBreakIteratorUtf16* ICU4XGraphemeClusterSegmenter_segment_utf16(const ICU4XGraphemeClusterSegmenter* self, const uint16_t* input_data, size_t input_len);
+
+ICU4XGraphemeClusterBreakIteratorLatin1* ICU4XGraphemeClusterSegmenter_segment_latin1(const ICU4XGraphemeClusterSegmenter* self, const uint8_t* input_data, size_t input_len);
+void ICU4XGraphemeClusterSegmenter_destroy(ICU4XGraphemeClusterSegmenter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGraphemeClusterSegmenter.hpp b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterSegmenter.hpp
new file mode 100644
index 0000000000..76941847e1
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGraphemeClusterSegmenter.hpp
@@ -0,0 +1,106 @@
+#ifndef ICU4XGraphemeClusterSegmenter_HPP
+#define ICU4XGraphemeClusterSegmenter_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XGraphemeClusterSegmenter.h"
+
+class ICU4XDataProvider;
+class ICU4XGraphemeClusterSegmenter;
+#include "ICU4XError.hpp"
+class ICU4XGraphemeClusterBreakIteratorUtf8;
+class ICU4XGraphemeClusterBreakIteratorUtf16;
+class ICU4XGraphemeClusterBreakIteratorLatin1;
+
+/**
+ * A destruction policy for using ICU4XGraphemeClusterSegmenter with std::unique_ptr.
+ */
+struct ICU4XGraphemeClusterSegmenterDeleter {
+ void operator()(capi::ICU4XGraphemeClusterSegmenter* l) const noexcept {
+ capi::ICU4XGraphemeClusterSegmenter_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X grapheme-cluster-break segmenter, capable of finding grapheme cluster breakpoints
+ * in strings.
+ *
+ * See the [Rust documentation for `GraphemeClusterSegmenter`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html) for more information.
+ */
+class ICU4XGraphemeClusterSegmenter {
+ public:
+
+ /**
+ * Construct an [`ICU4XGraphemeClusterSegmenter`].
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XGraphemeClusterSegmenter, ICU4XError> create(const ICU4XDataProvider& provider);
+
+ /**
+ * Segments a (potentially ill-formed) UTF-8 string.
+ *
+ * See the [Rust documentation for `segment_utf8`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_utf8) for more information.
+ *
+ * Lifetimes: `this`, `input` must live at least as long as the output.
+ */
+ ICU4XGraphemeClusterBreakIteratorUtf8 segment_utf8(const std::string_view input) const;
+
+ /**
+ * Segments a UTF-16 string.
+ *
+ * See the [Rust documentation for `segment_utf16`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_utf16) for more information.
+ *
+ * Lifetimes: `this`, `input` must live at least as long as the output.
+ */
+ ICU4XGraphemeClusterBreakIteratorUtf16 segment_utf16(const diplomat::span<const uint16_t> input) const;
+
+ /**
+ * Segments a Latin-1 string.
+ *
+ * See the [Rust documentation for `segment_latin1`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_latin1) for more information.
+ *
+ * Lifetimes: `this`, `input` must live at least as long as the output.
+ */
+ ICU4XGraphemeClusterBreakIteratorLatin1 segment_latin1(const diplomat::span<const uint8_t> input) const;
+ inline const capi::ICU4XGraphemeClusterSegmenter* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XGraphemeClusterSegmenter* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XGraphemeClusterSegmenter(capi::ICU4XGraphemeClusterSegmenter* i) : inner(i) {}
+ ICU4XGraphemeClusterSegmenter() = default;
+ ICU4XGraphemeClusterSegmenter(ICU4XGraphemeClusterSegmenter&&) noexcept = default;
+ ICU4XGraphemeClusterSegmenter& operator=(ICU4XGraphemeClusterSegmenter&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XGraphemeClusterSegmenter, ICU4XGraphemeClusterSegmenterDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XGraphemeClusterBreakIteratorUtf8.hpp"
+#include "ICU4XGraphemeClusterBreakIteratorUtf16.hpp"
+#include "ICU4XGraphemeClusterBreakIteratorLatin1.hpp"
+
+inline diplomat::result<ICU4XGraphemeClusterSegmenter, ICU4XError> ICU4XGraphemeClusterSegmenter::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XGraphemeClusterSegmenter_create(provider.AsFFI());
+ diplomat::result<ICU4XGraphemeClusterSegmenter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XGraphemeClusterSegmenter>(ICU4XGraphemeClusterSegmenter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XGraphemeClusterBreakIteratorUtf8 ICU4XGraphemeClusterSegmenter::segment_utf8(const std::string_view input) const {
+ return ICU4XGraphemeClusterBreakIteratorUtf8(capi::ICU4XGraphemeClusterSegmenter_segment_utf8(this->inner.get(), input.data(), input.size()));
+}
+inline ICU4XGraphemeClusterBreakIteratorUtf16 ICU4XGraphemeClusterSegmenter::segment_utf16(const diplomat::span<const uint16_t> input) const {
+ return ICU4XGraphemeClusterBreakIteratorUtf16(capi::ICU4XGraphemeClusterSegmenter_segment_utf16(this->inner.get(), input.data(), input.size()));
+}
+inline ICU4XGraphemeClusterBreakIteratorLatin1 ICU4XGraphemeClusterSegmenter::segment_latin1(const diplomat::span<const uint8_t> input) const {
+ return ICU4XGraphemeClusterBreakIteratorLatin1(capi::ICU4XGraphemeClusterSegmenter_segment_latin1(this->inner.get(), input.data(), input.size()));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGregorianDateFormatter.h b/intl/icu_capi/cpp/include/ICU4XGregorianDateFormatter.h
new file mode 100644
index 0000000000..cf3ad9e9f4
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGregorianDateFormatter.h
@@ -0,0 +1,40 @@
+#ifndef ICU4XGregorianDateFormatter_H
+#define ICU4XGregorianDateFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGregorianDateFormatter ICU4XGregorianDateFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XDateLength.h"
+#include "diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError.h"
+#include "ICU4XIsoDate.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XIsoDateTime.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError ICU4XGregorianDateFormatter_create_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength length);
+
+diplomat_result_void_ICU4XError ICU4XGregorianDateFormatter_format_iso_date(const ICU4XGregorianDateFormatter* self, const ICU4XIsoDate* value, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XGregorianDateFormatter_format_iso_datetime(const ICU4XGregorianDateFormatter* self, const ICU4XIsoDateTime* value, DiplomatWriteable* write);
+void ICU4XGregorianDateFormatter_destroy(ICU4XGregorianDateFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGregorianDateFormatter.hpp b/intl/icu_capi/cpp/include/ICU4XGregorianDateFormatter.hpp
new file mode 100644
index 0000000000..01b8c95015
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGregorianDateFormatter.hpp
@@ -0,0 +1,145 @@
+#ifndef ICU4XGregorianDateFormatter_HPP
+#define ICU4XGregorianDateFormatter_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XGregorianDateFormatter.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+#include "ICU4XDateLength.hpp"
+class ICU4XGregorianDateFormatter;
+#include "ICU4XError.hpp"
+class ICU4XIsoDate;
+class ICU4XIsoDateTime;
+
+/**
+ * A destruction policy for using ICU4XGregorianDateFormatter with std::unique_ptr.
+ */
+struct ICU4XGregorianDateFormatterDeleter {
+ void operator()(capi::ICU4XGregorianDateFormatter* l) const noexcept {
+ capi::ICU4XGregorianDateFormatter_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X TypedDateFormatter object capable of formatting a [`ICU4XIsoDateTime`] as a string,
+ * using the Gregorian Calendar.
+ *
+ * See the [Rust documentation for `TypedDateFormatter`](https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html) for more information.
+ */
+class ICU4XGregorianDateFormatter {
+ public:
+
+ /**
+ * Creates a new [`ICU4XGregorianDateFormatter`] from locale data.
+ *
+ * See the [Rust documentation for `try_new_with_length`](https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.try_new_with_length) for more information.
+ */
+ static diplomat::result<ICU4XGregorianDateFormatter, ICU4XError> create_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength length);
+
+ /**
+ * Formats a [`ICU4XIsoDate`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_date_to_writeable(const ICU4XIsoDate& value, W& write) const;
+
+ /**
+ * Formats a [`ICU4XIsoDate`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_iso_date(const ICU4XIsoDate& value) const;
+
+ /**
+ * Formats a [`ICU4XIsoDateTime`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_datetime_to_writeable(const ICU4XIsoDateTime& value, W& write) const;
+
+ /**
+ * Formats a [`ICU4XIsoDateTime`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_iso_datetime(const ICU4XIsoDateTime& value) const;
+ inline const capi::ICU4XGregorianDateFormatter* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XGregorianDateFormatter* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XGregorianDateFormatter(capi::ICU4XGregorianDateFormatter* i) : inner(i) {}
+ ICU4XGregorianDateFormatter() = default;
+ ICU4XGregorianDateFormatter(ICU4XGregorianDateFormatter&&) noexcept = default;
+ ICU4XGregorianDateFormatter& operator=(ICU4XGregorianDateFormatter&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XGregorianDateFormatter, ICU4XGregorianDateFormatterDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+#include "ICU4XIsoDate.hpp"
+#include "ICU4XIsoDateTime.hpp"
+
+inline diplomat::result<ICU4XGregorianDateFormatter, ICU4XError> ICU4XGregorianDateFormatter::create_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength length) {
+ auto diplomat_result_raw_out_value = capi::ICU4XGregorianDateFormatter_create_with_length(provider.AsFFI(), locale.AsFFI(), static_cast<capi::ICU4XDateLength>(length));
+ diplomat::result<ICU4XGregorianDateFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XGregorianDateFormatter>(ICU4XGregorianDateFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XGregorianDateFormatter::format_iso_date_to_writeable(const ICU4XIsoDate& value, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XGregorianDateFormatter_format_iso_date(this->inner.get(), value.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XGregorianDateFormatter::format_iso_date(const ICU4XIsoDate& value) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XGregorianDateFormatter_format_iso_date(this->inner.get(), value.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XGregorianDateFormatter::format_iso_datetime_to_writeable(const ICU4XIsoDateTime& value, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XGregorianDateFormatter_format_iso_datetime(this->inner.get(), value.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XGregorianDateFormatter::format_iso_datetime(const ICU4XIsoDateTime& value) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XGregorianDateFormatter_format_iso_datetime(this->inner.get(), value.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGregorianDateTimeFormatter.h b/intl/icu_capi/cpp/include/ICU4XGregorianDateTimeFormatter.h
new file mode 100644
index 0000000000..0b56ddc393
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGregorianDateTimeFormatter.h
@@ -0,0 +1,38 @@
+#ifndef ICU4XGregorianDateTimeFormatter_H
+#define ICU4XGregorianDateTimeFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGregorianDateTimeFormatter ICU4XGregorianDateTimeFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XDateLength.h"
+#include "ICU4XTimeLength.h"
+#include "diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError.h"
+#include "ICU4XIsoDateTime.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError ICU4XGregorianDateTimeFormatter_create_with_lengths(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length);
+
+diplomat_result_void_ICU4XError ICU4XGregorianDateTimeFormatter_format_iso_datetime(const ICU4XGregorianDateTimeFormatter* self, const ICU4XIsoDateTime* value, DiplomatWriteable* write);
+void ICU4XGregorianDateTimeFormatter_destroy(ICU4XGregorianDateTimeFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGregorianDateTimeFormatter.hpp b/intl/icu_capi/cpp/include/ICU4XGregorianDateTimeFormatter.hpp
new file mode 100644
index 0000000000..ce0fbc6704
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGregorianDateTimeFormatter.hpp
@@ -0,0 +1,107 @@
+#ifndef ICU4XGregorianDateTimeFormatter_HPP
+#define ICU4XGregorianDateTimeFormatter_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XGregorianDateTimeFormatter.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+#include "ICU4XDateLength.hpp"
+#include "ICU4XTimeLength.hpp"
+class ICU4XGregorianDateTimeFormatter;
+#include "ICU4XError.hpp"
+class ICU4XIsoDateTime;
+
+/**
+ * A destruction policy for using ICU4XGregorianDateTimeFormatter with std::unique_ptr.
+ */
+struct ICU4XGregorianDateTimeFormatterDeleter {
+ void operator()(capi::ICU4XGregorianDateTimeFormatter* l) const noexcept {
+ capi::ICU4XGregorianDateTimeFormatter_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X TypedDateTimeFormatter object capable of formatting a [`ICU4XIsoDateTime`] as a string,
+ * using the Gregorian Calendar.
+ *
+ * See the [Rust documentation for `TypedDateTimeFormatter`](https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html) for more information.
+ */
+class ICU4XGregorianDateTimeFormatter {
+ public:
+
+ /**
+ * Creates a new [`ICU4XGregorianDateFormatter`] from locale data.
+ *
+ * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html#method.try_new) for more information.
+ */
+ static diplomat::result<ICU4XGregorianDateTimeFormatter, ICU4XError> create_with_lengths(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length);
+
+ /**
+ * Formats a [`ICU4XIsoDateTime`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_datetime_to_writeable(const ICU4XIsoDateTime& value, W& write) const;
+
+ /**
+ * Formats a [`ICU4XIsoDateTime`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_iso_datetime(const ICU4XIsoDateTime& value) const;
+ inline const capi::ICU4XGregorianDateTimeFormatter* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XGregorianDateTimeFormatter* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XGregorianDateTimeFormatter(capi::ICU4XGregorianDateTimeFormatter* i) : inner(i) {}
+ ICU4XGregorianDateTimeFormatter() = default;
+ ICU4XGregorianDateTimeFormatter(ICU4XGregorianDateTimeFormatter&&) noexcept = default;
+ ICU4XGregorianDateTimeFormatter& operator=(ICU4XGregorianDateTimeFormatter&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XGregorianDateTimeFormatter, ICU4XGregorianDateTimeFormatterDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+#include "ICU4XIsoDateTime.hpp"
+
+inline diplomat::result<ICU4XGregorianDateTimeFormatter, ICU4XError> ICU4XGregorianDateTimeFormatter::create_with_lengths(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length) {
+ auto diplomat_result_raw_out_value = capi::ICU4XGregorianDateTimeFormatter_create_with_lengths(provider.AsFFI(), locale.AsFFI(), static_cast<capi::ICU4XDateLength>(date_length), static_cast<capi::ICU4XTimeLength>(time_length));
+ diplomat::result<ICU4XGregorianDateTimeFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XGregorianDateTimeFormatter>(ICU4XGregorianDateTimeFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XGregorianDateTimeFormatter::format_iso_datetime_to_writeable(const ICU4XIsoDateTime& value, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XGregorianDateTimeFormatter_format_iso_datetime(this->inner.get(), value.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XGregorianDateTimeFormatter::format_iso_datetime(const ICU4XIsoDateTime& value) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XGregorianDateTimeFormatter_format_iso_datetime(this->inner.get(), value.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGregorianZonedDateTimeFormatter.h b/intl/icu_capi/cpp/include/ICU4XGregorianZonedDateTimeFormatter.h
new file mode 100644
index 0000000000..4be60c2b0b
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGregorianZonedDateTimeFormatter.h
@@ -0,0 +1,42 @@
+#ifndef ICU4XGregorianZonedDateTimeFormatter_H
+#define ICU4XGregorianZonedDateTimeFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XGregorianZonedDateTimeFormatter ICU4XGregorianZonedDateTimeFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XDateLength.h"
+#include "ICU4XTimeLength.h"
+#include "diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError.h"
+#include "ICU4XIsoTimeZoneOptions.h"
+#include "ICU4XIsoDateTime.h"
+#include "ICU4XCustomTimeZone.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError ICU4XGregorianZonedDateTimeFormatter_create_with_lengths(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length);
+
+diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError ICU4XGregorianZonedDateTimeFormatter_create_with_lengths_and_iso_8601_time_zone_fallback(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length, ICU4XIsoTimeZoneOptions zone_options);
+
+diplomat_result_void_ICU4XError ICU4XGregorianZonedDateTimeFormatter_format_iso_datetime_with_custom_time_zone(const ICU4XGregorianZonedDateTimeFormatter* self, const ICU4XIsoDateTime* datetime, const ICU4XCustomTimeZone* time_zone, DiplomatWriteable* write);
+void ICU4XGregorianZonedDateTimeFormatter_destroy(ICU4XGregorianZonedDateTimeFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XGregorianZonedDateTimeFormatter.hpp b/intl/icu_capi/cpp/include/ICU4XGregorianZonedDateTimeFormatter.hpp
new file mode 100644
index 0000000000..9f86f4bfda
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XGregorianZonedDateTimeFormatter.hpp
@@ -0,0 +1,134 @@
+#ifndef ICU4XGregorianZonedDateTimeFormatter_HPP
+#define ICU4XGregorianZonedDateTimeFormatter_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XGregorianZonedDateTimeFormatter.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+#include "ICU4XDateLength.hpp"
+#include "ICU4XTimeLength.hpp"
+class ICU4XGregorianZonedDateTimeFormatter;
+#include "ICU4XError.hpp"
+struct ICU4XIsoTimeZoneOptions;
+class ICU4XIsoDateTime;
+class ICU4XCustomTimeZone;
+
+/**
+ * A destruction policy for using ICU4XGregorianZonedDateTimeFormatter with std::unique_ptr.
+ */
+struct ICU4XGregorianZonedDateTimeFormatterDeleter {
+ void operator()(capi::ICU4XGregorianZonedDateTimeFormatter* l) const noexcept {
+ capi::ICU4XGregorianZonedDateTimeFormatter_destroy(l);
+ }
+};
+
+/**
+ * An object capable of formatting a date time with time zone to a string.
+ *
+ * See the [Rust documentation for `TypedZonedDateTimeFormatter`](https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html) for more information.
+ */
+class ICU4XGregorianZonedDateTimeFormatter {
+ public:
+
+ /**
+ * Creates a new [`ICU4XGregorianZonedDateTimeFormatter`] from locale data.
+ *
+ * This function has `date_length` and `time_length` arguments and uses default options
+ * for the time zone.
+ *
+ * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.try_new) for more information.
+ */
+ static diplomat::result<ICU4XGregorianZonedDateTimeFormatter, ICU4XError> create_with_lengths(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length);
+
+ /**
+ * Creates a new [`ICU4XGregorianZonedDateTimeFormatter`] from locale data.
+ *
+ * This function has `date_length` and `time_length` arguments and uses an ISO-8601 style
+ * fallback for the time zone with the given configurations.
+ *
+ * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.try_new) for more information.
+ */
+ static diplomat::result<ICU4XGregorianZonedDateTimeFormatter, ICU4XError> create_with_lengths_and_iso_8601_time_zone_fallback(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length, ICU4XIsoTimeZoneOptions zone_options);
+
+ /**
+ * Formats a [`ICU4XIsoDateTime`] and [`ICU4XCustomTimeZone`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_datetime_with_custom_time_zone_to_writeable(const ICU4XIsoDateTime& datetime, const ICU4XCustomTimeZone& time_zone, W& write) const;
+
+ /**
+ * Formats a [`ICU4XIsoDateTime`] and [`ICU4XCustomTimeZone`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_iso_datetime_with_custom_time_zone(const ICU4XIsoDateTime& datetime, const ICU4XCustomTimeZone& time_zone) const;
+ inline const capi::ICU4XGregorianZonedDateTimeFormatter* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XGregorianZonedDateTimeFormatter* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XGregorianZonedDateTimeFormatter(capi::ICU4XGregorianZonedDateTimeFormatter* i) : inner(i) {}
+ ICU4XGregorianZonedDateTimeFormatter() = default;
+ ICU4XGregorianZonedDateTimeFormatter(ICU4XGregorianZonedDateTimeFormatter&&) noexcept = default;
+ ICU4XGregorianZonedDateTimeFormatter& operator=(ICU4XGregorianZonedDateTimeFormatter&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XGregorianZonedDateTimeFormatter, ICU4XGregorianZonedDateTimeFormatterDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+#include "ICU4XIsoTimeZoneOptions.hpp"
+#include "ICU4XIsoDateTime.hpp"
+#include "ICU4XCustomTimeZone.hpp"
+
+inline diplomat::result<ICU4XGregorianZonedDateTimeFormatter, ICU4XError> ICU4XGregorianZonedDateTimeFormatter::create_with_lengths(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length) {
+ auto diplomat_result_raw_out_value = capi::ICU4XGregorianZonedDateTimeFormatter_create_with_lengths(provider.AsFFI(), locale.AsFFI(), static_cast<capi::ICU4XDateLength>(date_length), static_cast<capi::ICU4XTimeLength>(time_length));
+ diplomat::result<ICU4XGregorianZonedDateTimeFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XGregorianZonedDateTimeFormatter>(ICU4XGregorianZonedDateTimeFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XGregorianZonedDateTimeFormatter, ICU4XError> ICU4XGregorianZonedDateTimeFormatter::create_with_lengths_and_iso_8601_time_zone_fallback(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length, ICU4XIsoTimeZoneOptions zone_options) {
+ ICU4XIsoTimeZoneOptions diplomat_wrapped_struct_zone_options = zone_options;
+ auto diplomat_result_raw_out_value = capi::ICU4XGregorianZonedDateTimeFormatter_create_with_lengths_and_iso_8601_time_zone_fallback(provider.AsFFI(), locale.AsFFI(), static_cast<capi::ICU4XDateLength>(date_length), static_cast<capi::ICU4XTimeLength>(time_length), capi::ICU4XIsoTimeZoneOptions{ .format = static_cast<capi::ICU4XIsoTimeZoneFormat>(diplomat_wrapped_struct_zone_options.format), .minutes = static_cast<capi::ICU4XIsoTimeZoneMinuteDisplay>(diplomat_wrapped_struct_zone_options.minutes), .seconds = static_cast<capi::ICU4XIsoTimeZoneSecondDisplay>(diplomat_wrapped_struct_zone_options.seconds) });
+ diplomat::result<ICU4XGregorianZonedDateTimeFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XGregorianZonedDateTimeFormatter>(ICU4XGregorianZonedDateTimeFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XGregorianZonedDateTimeFormatter::format_iso_datetime_with_custom_time_zone_to_writeable(const ICU4XIsoDateTime& datetime, const ICU4XCustomTimeZone& time_zone, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XGregorianZonedDateTimeFormatter_format_iso_datetime_with_custom_time_zone(this->inner.get(), datetime.AsFFI(), time_zone.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XGregorianZonedDateTimeFormatter::format_iso_datetime_with_custom_time_zone(const ICU4XIsoDateTime& datetime, const ICU4XCustomTimeZone& time_zone) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XGregorianZonedDateTimeFormatter_format_iso_datetime_with_custom_time_zone(this->inner.get(), datetime.AsFFI(), time_zone.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIanaToBcp47Mapper.h b/intl/icu_capi/cpp/include/ICU4XIanaToBcp47Mapper.h
new file mode 100644
index 0000000000..e06433b6d0
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIanaToBcp47Mapper.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XIanaToBcp47Mapper_H
+#define ICU4XIanaToBcp47Mapper_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XIanaToBcp47Mapper ICU4XIanaToBcp47Mapper;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError ICU4XIanaToBcp47Mapper_create(const ICU4XDataProvider* provider);
+void ICU4XIanaToBcp47Mapper_destroy(ICU4XIanaToBcp47Mapper* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIanaToBcp47Mapper.hpp b/intl/icu_capi/cpp/include/ICU4XIanaToBcp47Mapper.hpp
new file mode 100644
index 0000000000..69b4d691fd
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIanaToBcp47Mapper.hpp
@@ -0,0 +1,65 @@
+#ifndef ICU4XIanaToBcp47Mapper_HPP
+#define ICU4XIanaToBcp47Mapper_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XIanaToBcp47Mapper.h"
+
+class ICU4XDataProvider;
+class ICU4XIanaToBcp47Mapper;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XIanaToBcp47Mapper with std::unique_ptr.
+ */
+struct ICU4XIanaToBcp47MapperDeleter {
+ void operator()(capi::ICU4XIanaToBcp47Mapper* l) const noexcept {
+ capi::ICU4XIanaToBcp47Mapper_destroy(l);
+ }
+};
+
+/**
+ * An object capable of mapping from an IANA time zone ID to a BCP-47 ID.
+ *
+ * This can be used via `try_set_iana_time_zone_id()` on [`ICU4XCustomTimeZone`].
+ *
+ * [`ICU4XCustomTimeZone`]: crate::timezone::ffi::ICU4XCustomTimeZone
+ *
+ * See the [Rust documentation for `IanaToBcp47Mapper`](https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47Mapper.html) for more information.
+ */
+class ICU4XIanaToBcp47Mapper {
+ public:
+
+ /**
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47Mapper.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XIanaToBcp47Mapper, ICU4XError> create(const ICU4XDataProvider& provider);
+ inline const capi::ICU4XIanaToBcp47Mapper* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XIanaToBcp47Mapper* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XIanaToBcp47Mapper(capi::ICU4XIanaToBcp47Mapper* i) : inner(i) {}
+ ICU4XIanaToBcp47Mapper() = default;
+ ICU4XIanaToBcp47Mapper(ICU4XIanaToBcp47Mapper&&) noexcept = default;
+ ICU4XIanaToBcp47Mapper& operator=(ICU4XIanaToBcp47Mapper&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XIanaToBcp47Mapper, ICU4XIanaToBcp47MapperDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+
+inline diplomat::result<ICU4XIanaToBcp47Mapper, ICU4XError> ICU4XIanaToBcp47Mapper::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XIanaToBcp47Mapper_create(provider.AsFFI());
+ diplomat::result<ICU4XIanaToBcp47Mapper, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XIanaToBcp47Mapper>(ICU4XIanaToBcp47Mapper(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIsoDate.h b/intl/icu_capi/cpp/include/ICU4XIsoDate.h
new file mode 100644
index 0000000000..d7a018244a
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIsoDate.h
@@ -0,0 +1,61 @@
+#ifndef ICU4XIsoDate_H
+#define ICU4XIsoDate_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XIsoDate ICU4XIsoDate;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XIsoDate_ICU4XError.h"
+#include "ICU4XCalendar.h"
+#include "ICU4XDate.h"
+#include "ICU4XIsoWeekday.h"
+#include "ICU4XWeekCalculator.h"
+#include "diplomat_result_ICU4XWeekOf_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XIsoDate_ICU4XError ICU4XIsoDate_create(int32_t year, uint8_t month, uint8_t day);
+
+ICU4XIsoDate* ICU4XIsoDate_create_for_unix_epoch();
+
+ICU4XDate* ICU4XIsoDate_to_calendar(const ICU4XIsoDate* self, const ICU4XCalendar* calendar);
+
+ICU4XDate* ICU4XIsoDate_to_any(const ICU4XIsoDate* self);
+
+uint32_t ICU4XIsoDate_day_of_month(const ICU4XIsoDate* self);
+
+ICU4XIsoWeekday ICU4XIsoDate_day_of_week(const ICU4XIsoDate* self);
+
+uint32_t ICU4XIsoDate_week_of_month(const ICU4XIsoDate* self, ICU4XIsoWeekday first_weekday);
+
+diplomat_result_ICU4XWeekOf_ICU4XError ICU4XIsoDate_week_of_year(const ICU4XIsoDate* self, const ICU4XWeekCalculator* calculator);
+
+uint32_t ICU4XIsoDate_month(const ICU4XIsoDate* self);
+
+int32_t ICU4XIsoDate_year(const ICU4XIsoDate* self);
+
+bool ICU4XIsoDate_is_in_leap_year(const ICU4XIsoDate* self);
+
+uint8_t ICU4XIsoDate_months_in_year(const ICU4XIsoDate* self);
+
+uint8_t ICU4XIsoDate_days_in_month(const ICU4XIsoDate* self);
+
+uint16_t ICU4XIsoDate_days_in_year(const ICU4XIsoDate* self);
+void ICU4XIsoDate_destroy(ICU4XIsoDate* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIsoDate.hpp b/intl/icu_capi/cpp/include/ICU4XIsoDate.hpp
new file mode 100644
index 0000000000..ba91918f6d
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIsoDate.hpp
@@ -0,0 +1,209 @@
+#ifndef ICU4XIsoDate_HPP
+#define ICU4XIsoDate_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XIsoDate.h"
+
+class ICU4XIsoDate;
+#include "ICU4XError.hpp"
+class ICU4XCalendar;
+class ICU4XDate;
+#include "ICU4XIsoWeekday.hpp"
+class ICU4XWeekCalculator;
+struct ICU4XWeekOf;
+
+/**
+ * A destruction policy for using ICU4XIsoDate with std::unique_ptr.
+ */
+struct ICU4XIsoDateDeleter {
+ void operator()(capi::ICU4XIsoDate* l) const noexcept {
+ capi::ICU4XIsoDate_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X Date object capable of containing a ISO-8601 date
+ *
+ * See the [Rust documentation for `Date`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html) for more information.
+ */
+class ICU4XIsoDate {
+ public:
+
+ /**
+ * Creates a new [`ICU4XIsoDate`] from the specified date and time.
+ *
+ * See the [Rust documentation for `try_new_iso_date`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_iso_date) for more information.
+ */
+ static diplomat::result<ICU4XIsoDate, ICU4XError> create(int32_t year, uint8_t month, uint8_t day);
+
+ /**
+ * Creates a new [`ICU4XIsoDate`] representing January 1, 1970.
+ *
+ * See the [Rust documentation for `unix_epoch`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.unix_epoch) for more information.
+ */
+ static ICU4XIsoDate create_for_unix_epoch();
+
+ /**
+ * Convert this date to one in a different calendar
+ *
+ * See the [Rust documentation for `to_calendar`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_calendar) for more information.
+ */
+ ICU4XDate to_calendar(const ICU4XCalendar& calendar) const;
+
+ /**
+ * See the [Rust documentation for `to_any`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_any) for more information.
+ */
+ ICU4XDate to_any() const;
+
+ /**
+ * Returns the 1-indexed day in the month for this date
+ *
+ * See the [Rust documentation for `day_of_month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month) for more information.
+ */
+ uint32_t day_of_month() const;
+
+ /**
+ * Returns the day in the week for this day
+ *
+ * See the [Rust documentation for `day_of_week`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week) for more information.
+ */
+ ICU4XIsoWeekday day_of_week() const;
+
+ /**
+ * Returns the week number in this month, 1-indexed, based on what
+ * is considered the first day of the week (often a locale preference).
+ *
+ * `first_weekday` can be obtained via `first_weekday()` on [`ICU4XWeekCalculator`]
+ *
+ * See the [Rust documentation for `week_of_month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month) for more information.
+ */
+ uint32_t week_of_month(ICU4XIsoWeekday first_weekday) const;
+
+ /**
+ * Returns the week number in this year, using week data
+ *
+ * See the [Rust documentation for `week_of_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year) for more information.
+ */
+ diplomat::result<ICU4XWeekOf, ICU4XError> week_of_year(const ICU4XWeekCalculator& calculator) const;
+
+ /**
+ * Returns 1-indexed number of the month of this date in its year
+ *
+ * See the [Rust documentation for `month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month) for more information.
+ */
+ uint32_t month() const;
+
+ /**
+ * Returns the year number for this date
+ *
+ * See the [Rust documentation for `year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year) for more information.
+ */
+ int32_t year() const;
+
+ /**
+ * Returns if the year is a leap year for this date
+ *
+ * See the [Rust documentation for `is_in_leap_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.is_in_leap_year) for more information.
+ */
+ bool is_in_leap_year() const;
+
+ /**
+ * Returns the number of months in the year represented by this date
+ *
+ * See the [Rust documentation for `months_in_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year) for more information.
+ */
+ uint8_t months_in_year() const;
+
+ /**
+ * Returns the number of days in the month represented by this date
+ *
+ * See the [Rust documentation for `days_in_month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month) for more information.
+ */
+ uint8_t days_in_month() const;
+
+ /**
+ * Returns the number of days in the year represented by this date
+ *
+ * See the [Rust documentation for `days_in_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year) for more information.
+ */
+ uint16_t days_in_year() const;
+ inline const capi::ICU4XIsoDate* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XIsoDate* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XIsoDate(capi::ICU4XIsoDate* i) : inner(i) {}
+ ICU4XIsoDate() = default;
+ ICU4XIsoDate(ICU4XIsoDate&&) noexcept = default;
+ ICU4XIsoDate& operator=(ICU4XIsoDate&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XIsoDate, ICU4XIsoDateDeleter> inner;
+};
+
+#include "ICU4XCalendar.hpp"
+#include "ICU4XDate.hpp"
+#include "ICU4XWeekCalculator.hpp"
+#include "ICU4XWeekOf.hpp"
+
+inline diplomat::result<ICU4XIsoDate, ICU4XError> ICU4XIsoDate::create(int32_t year, uint8_t month, uint8_t day) {
+ auto diplomat_result_raw_out_value = capi::ICU4XIsoDate_create(year, month, day);
+ diplomat::result<ICU4XIsoDate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XIsoDate>(ICU4XIsoDate(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XIsoDate ICU4XIsoDate::create_for_unix_epoch() {
+ return ICU4XIsoDate(capi::ICU4XIsoDate_create_for_unix_epoch());
+}
+inline ICU4XDate ICU4XIsoDate::to_calendar(const ICU4XCalendar& calendar) const {
+ return ICU4XDate(capi::ICU4XIsoDate_to_calendar(this->inner.get(), calendar.AsFFI()));
+}
+inline ICU4XDate ICU4XIsoDate::to_any() const {
+ return ICU4XDate(capi::ICU4XIsoDate_to_any(this->inner.get()));
+}
+inline uint32_t ICU4XIsoDate::day_of_month() const {
+ return capi::ICU4XIsoDate_day_of_month(this->inner.get());
+}
+inline ICU4XIsoWeekday ICU4XIsoDate::day_of_week() const {
+ return static_cast<ICU4XIsoWeekday>(capi::ICU4XIsoDate_day_of_week(this->inner.get()));
+}
+inline uint32_t ICU4XIsoDate::week_of_month(ICU4XIsoWeekday first_weekday) const {
+ return capi::ICU4XIsoDate_week_of_month(this->inner.get(), static_cast<capi::ICU4XIsoWeekday>(first_weekday));
+}
+inline diplomat::result<ICU4XWeekOf, ICU4XError> ICU4XIsoDate::week_of_year(const ICU4XWeekCalculator& calculator) const {
+ auto diplomat_result_raw_out_value = capi::ICU4XIsoDate_week_of_year(this->inner.get(), calculator.AsFFI());
+ diplomat::result<ICU4XWeekOf, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ capi::ICU4XWeekOf diplomat_raw_struct_out_value = diplomat_result_raw_out_value.ok;
+ diplomat_result_out_value = diplomat::Ok<ICU4XWeekOf>(ICU4XWeekOf{ .week = std::move(diplomat_raw_struct_out_value.week), .unit = std::move(static_cast<ICU4XWeekRelativeUnit>(diplomat_raw_struct_out_value.unit)) });
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline uint32_t ICU4XIsoDate::month() const {
+ return capi::ICU4XIsoDate_month(this->inner.get());
+}
+inline int32_t ICU4XIsoDate::year() const {
+ return capi::ICU4XIsoDate_year(this->inner.get());
+}
+inline bool ICU4XIsoDate::is_in_leap_year() const {
+ return capi::ICU4XIsoDate_is_in_leap_year(this->inner.get());
+}
+inline uint8_t ICU4XIsoDate::months_in_year() const {
+ return capi::ICU4XIsoDate_months_in_year(this->inner.get());
+}
+inline uint8_t ICU4XIsoDate::days_in_month() const {
+ return capi::ICU4XIsoDate_days_in_month(this->inner.get());
+}
+inline uint16_t ICU4XIsoDate::days_in_year() const {
+ return capi::ICU4XIsoDate_days_in_year(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIsoDateTime.h b/intl/icu_capi/cpp/include/ICU4XIsoDateTime.h
new file mode 100644
index 0000000000..404cbfedc8
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIsoDateTime.h
@@ -0,0 +1,79 @@
+#ifndef ICU4XIsoDateTime_H
+#define ICU4XIsoDateTime_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XIsoDateTime ICU4XIsoDateTime;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XIsoDateTime_ICU4XError.h"
+#include "ICU4XIsoDate.h"
+#include "ICU4XTime.h"
+#include "ICU4XDateTime.h"
+#include "ICU4XCalendar.h"
+#include "ICU4XIsoWeekday.h"
+#include "ICU4XWeekCalculator.h"
+#include "diplomat_result_ICU4XWeekOf_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XIsoDateTime_ICU4XError ICU4XIsoDateTime_create(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond);
+
+ICU4XIsoDateTime* ICU4XIsoDateTime_crate_from_date_and_time(const ICU4XIsoDate* date, const ICU4XTime* time);
+
+ICU4XIsoDateTime* ICU4XIsoDateTime_create_from_minutes_since_local_unix_epoch(int32_t minutes);
+
+ICU4XIsoDate* ICU4XIsoDateTime_date(const ICU4XIsoDateTime* self);
+
+ICU4XTime* ICU4XIsoDateTime_time(const ICU4XIsoDateTime* self);
+
+ICU4XDateTime* ICU4XIsoDateTime_to_any(const ICU4XIsoDateTime* self);
+
+int32_t ICU4XIsoDateTime_minutes_since_local_unix_epoch(const ICU4XIsoDateTime* self);
+
+ICU4XDateTime* ICU4XIsoDateTime_to_calendar(const ICU4XIsoDateTime* self, const ICU4XCalendar* calendar);
+
+uint8_t ICU4XIsoDateTime_hour(const ICU4XIsoDateTime* self);
+
+uint8_t ICU4XIsoDateTime_minute(const ICU4XIsoDateTime* self);
+
+uint8_t ICU4XIsoDateTime_second(const ICU4XIsoDateTime* self);
+
+uint32_t ICU4XIsoDateTime_nanosecond(const ICU4XIsoDateTime* self);
+
+uint32_t ICU4XIsoDateTime_day_of_month(const ICU4XIsoDateTime* self);
+
+ICU4XIsoWeekday ICU4XIsoDateTime_day_of_week(const ICU4XIsoDateTime* self);
+
+uint32_t ICU4XIsoDateTime_week_of_month(const ICU4XIsoDateTime* self, ICU4XIsoWeekday first_weekday);
+
+diplomat_result_ICU4XWeekOf_ICU4XError ICU4XIsoDateTime_week_of_year(const ICU4XIsoDateTime* self, const ICU4XWeekCalculator* calculator);
+
+uint32_t ICU4XIsoDateTime_month(const ICU4XIsoDateTime* self);
+
+int32_t ICU4XIsoDateTime_year(const ICU4XIsoDateTime* self);
+
+bool ICU4XIsoDateTime_is_in_leap_year(const ICU4XIsoDateTime* self);
+
+uint8_t ICU4XIsoDateTime_months_in_year(const ICU4XIsoDateTime* self);
+
+uint8_t ICU4XIsoDateTime_days_in_month(const ICU4XIsoDateTime* self);
+
+uint16_t ICU4XIsoDateTime_days_in_year(const ICU4XIsoDateTime* self);
+void ICU4XIsoDateTime_destroy(ICU4XIsoDateTime* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIsoDateTime.hpp b/intl/icu_capi/cpp/include/ICU4XIsoDateTime.hpp
new file mode 100644
index 0000000000..62d45a8747
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIsoDateTime.hpp
@@ -0,0 +1,296 @@
+#ifndef ICU4XIsoDateTime_HPP
+#define ICU4XIsoDateTime_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XIsoDateTime.h"
+
+class ICU4XIsoDateTime;
+#include "ICU4XError.hpp"
+class ICU4XIsoDate;
+class ICU4XTime;
+class ICU4XDateTime;
+class ICU4XCalendar;
+#include "ICU4XIsoWeekday.hpp"
+class ICU4XWeekCalculator;
+struct ICU4XWeekOf;
+
+/**
+ * A destruction policy for using ICU4XIsoDateTime with std::unique_ptr.
+ */
+struct ICU4XIsoDateTimeDeleter {
+ void operator()(capi::ICU4XIsoDateTime* l) const noexcept {
+ capi::ICU4XIsoDateTime_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X DateTime object capable of containing a ISO-8601 date and time.
+ *
+ * See the [Rust documentation for `DateTime`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html) for more information.
+ */
+class ICU4XIsoDateTime {
+ public:
+
+ /**
+ * Creates a new [`ICU4XIsoDateTime`] from the specified date and time.
+ *
+ * See the [Rust documentation for `try_new_iso_datetime`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_iso_datetime) for more information.
+ */
+ static diplomat::result<ICU4XIsoDateTime, ICU4XError> create(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond);
+
+ /**
+ * Creates a new [`ICU4XIsoDateTime`] from an [`ICU4XIsoDate`] and [`ICU4XTime`] object
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.new) for more information.
+ */
+ static ICU4XIsoDateTime crate_from_date_and_time(const ICU4XIsoDate& date, const ICU4XTime& time);
+
+ /**
+ * Construct from the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)
+ *
+ * See the [Rust documentation for `from_minutes_since_local_unix_epoch`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.from_minutes_since_local_unix_epoch) for more information.
+ */
+ static ICU4XIsoDateTime create_from_minutes_since_local_unix_epoch(int32_t minutes);
+
+ /**
+ * Gets the date contained in this object
+ *
+ * See the [Rust documentation for `date`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.date) for more information.
+ */
+ ICU4XIsoDate date() const;
+
+ /**
+ * Gets the time contained in this object
+ *
+ * See the [Rust documentation for `time`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.time) for more information.
+ */
+ ICU4XTime time() const;
+
+ /**
+ * Converts this to an [`ICU4XDateTime`] capable of being mixed with dates of
+ * other calendars
+ *
+ * See the [Rust documentation for `to_any`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_any) for more information.
+ */
+ ICU4XDateTime to_any() const;
+
+ /**
+ * Gets the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)
+ *
+ * See the [Rust documentation for `minutes_since_local_unix_epoch`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.minutes_since_local_unix_epoch) for more information.
+ */
+ int32_t minutes_since_local_unix_epoch() const;
+
+ /**
+ * Convert this datetime to one in a different calendar
+ *
+ * See the [Rust documentation for `to_calendar`](https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_calendar) for more information.
+ */
+ ICU4XDateTime to_calendar(const ICU4XCalendar& calendar) const;
+
+ /**
+ * Returns the hour in this time
+ *
+ * See the [Rust documentation for `hour`](https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour) for more information.
+ */
+ uint8_t hour() const;
+
+ /**
+ * Returns the minute in this time
+ *
+ * See the [Rust documentation for `minute`](https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute) for more information.
+ */
+ uint8_t minute() const;
+
+ /**
+ * Returns the second in this time
+ *
+ * See the [Rust documentation for `second`](https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second) for more information.
+ */
+ uint8_t second() const;
+
+ /**
+ * Returns the nanosecond in this time
+ *
+ * See the [Rust documentation for `nanosecond`](https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond) for more information.
+ */
+ uint32_t nanosecond() const;
+
+ /**
+ * Returns the 1-indexed day in the month for this date
+ *
+ * See the [Rust documentation for `day_of_month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month) for more information.
+ */
+ uint32_t day_of_month() const;
+
+ /**
+ * Returns the day in the week for this day
+ *
+ * See the [Rust documentation for `day_of_week`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week) for more information.
+ */
+ ICU4XIsoWeekday day_of_week() const;
+
+ /**
+ * Returns the week number in this month, 1-indexed, based on what
+ * is considered the first day of the week (often a locale preference).
+ *
+ * `first_weekday` can be obtained via `first_weekday()` on [`ICU4XWeekCalculator`]
+ *
+ * See the [Rust documentation for `week_of_month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month) for more information.
+ */
+ uint32_t week_of_month(ICU4XIsoWeekday first_weekday) const;
+
+ /**
+ * Returns the week number in this year, using week data
+ *
+ * See the [Rust documentation for `week_of_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year) for more information.
+ */
+ diplomat::result<ICU4XWeekOf, ICU4XError> week_of_year(const ICU4XWeekCalculator& calculator) const;
+
+ /**
+ * Returns 1-indexed number of the month of this date in its year
+ *
+ * See the [Rust documentation for `month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month) for more information.
+ */
+ uint32_t month() const;
+
+ /**
+ * Returns the year number for this date
+ *
+ * See the [Rust documentation for `year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year) for more information.
+ */
+ int32_t year() const;
+
+ /**
+ * Returns whether this date is in a leap year
+ *
+ * See the [Rust documentation for `is_in_leap_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.is_in_leap_year) for more information.
+ */
+ bool is_in_leap_year() const;
+
+ /**
+ * Returns the number of months in the year represented by this date
+ *
+ * See the [Rust documentation for `months_in_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year) for more information.
+ */
+ uint8_t months_in_year() const;
+
+ /**
+ * Returns the number of days in the month represented by this date
+ *
+ * See the [Rust documentation for `days_in_month`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month) for more information.
+ */
+ uint8_t days_in_month() const;
+
+ /**
+ * Returns the number of days in the year represented by this date
+ *
+ * See the [Rust documentation for `days_in_year`](https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year) for more information.
+ */
+ uint16_t days_in_year() const;
+ inline const capi::ICU4XIsoDateTime* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XIsoDateTime* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XIsoDateTime(capi::ICU4XIsoDateTime* i) : inner(i) {}
+ ICU4XIsoDateTime() = default;
+ ICU4XIsoDateTime(ICU4XIsoDateTime&&) noexcept = default;
+ ICU4XIsoDateTime& operator=(ICU4XIsoDateTime&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XIsoDateTime, ICU4XIsoDateTimeDeleter> inner;
+};
+
+#include "ICU4XIsoDate.hpp"
+#include "ICU4XTime.hpp"
+#include "ICU4XDateTime.hpp"
+#include "ICU4XCalendar.hpp"
+#include "ICU4XWeekCalculator.hpp"
+#include "ICU4XWeekOf.hpp"
+
+inline diplomat::result<ICU4XIsoDateTime, ICU4XError> ICU4XIsoDateTime::create(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond) {
+ auto diplomat_result_raw_out_value = capi::ICU4XIsoDateTime_create(year, month, day, hour, minute, second, nanosecond);
+ diplomat::result<ICU4XIsoDateTime, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XIsoDateTime>(ICU4XIsoDateTime(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XIsoDateTime ICU4XIsoDateTime::crate_from_date_and_time(const ICU4XIsoDate& date, const ICU4XTime& time) {
+ return ICU4XIsoDateTime(capi::ICU4XIsoDateTime_crate_from_date_and_time(date.AsFFI(), time.AsFFI()));
+}
+inline ICU4XIsoDateTime ICU4XIsoDateTime::create_from_minutes_since_local_unix_epoch(int32_t minutes) {
+ return ICU4XIsoDateTime(capi::ICU4XIsoDateTime_create_from_minutes_since_local_unix_epoch(minutes));
+}
+inline ICU4XIsoDate ICU4XIsoDateTime::date() const {
+ return ICU4XIsoDate(capi::ICU4XIsoDateTime_date(this->inner.get()));
+}
+inline ICU4XTime ICU4XIsoDateTime::time() const {
+ return ICU4XTime(capi::ICU4XIsoDateTime_time(this->inner.get()));
+}
+inline ICU4XDateTime ICU4XIsoDateTime::to_any() const {
+ return ICU4XDateTime(capi::ICU4XIsoDateTime_to_any(this->inner.get()));
+}
+inline int32_t ICU4XIsoDateTime::minutes_since_local_unix_epoch() const {
+ return capi::ICU4XIsoDateTime_minutes_since_local_unix_epoch(this->inner.get());
+}
+inline ICU4XDateTime ICU4XIsoDateTime::to_calendar(const ICU4XCalendar& calendar) const {
+ return ICU4XDateTime(capi::ICU4XIsoDateTime_to_calendar(this->inner.get(), calendar.AsFFI()));
+}
+inline uint8_t ICU4XIsoDateTime::hour() const {
+ return capi::ICU4XIsoDateTime_hour(this->inner.get());
+}
+inline uint8_t ICU4XIsoDateTime::minute() const {
+ return capi::ICU4XIsoDateTime_minute(this->inner.get());
+}
+inline uint8_t ICU4XIsoDateTime::second() const {
+ return capi::ICU4XIsoDateTime_second(this->inner.get());
+}
+inline uint32_t ICU4XIsoDateTime::nanosecond() const {
+ return capi::ICU4XIsoDateTime_nanosecond(this->inner.get());
+}
+inline uint32_t ICU4XIsoDateTime::day_of_month() const {
+ return capi::ICU4XIsoDateTime_day_of_month(this->inner.get());
+}
+inline ICU4XIsoWeekday ICU4XIsoDateTime::day_of_week() const {
+ return static_cast<ICU4XIsoWeekday>(capi::ICU4XIsoDateTime_day_of_week(this->inner.get()));
+}
+inline uint32_t ICU4XIsoDateTime::week_of_month(ICU4XIsoWeekday first_weekday) const {
+ return capi::ICU4XIsoDateTime_week_of_month(this->inner.get(), static_cast<capi::ICU4XIsoWeekday>(first_weekday));
+}
+inline diplomat::result<ICU4XWeekOf, ICU4XError> ICU4XIsoDateTime::week_of_year(const ICU4XWeekCalculator& calculator) const {
+ auto diplomat_result_raw_out_value = capi::ICU4XIsoDateTime_week_of_year(this->inner.get(), calculator.AsFFI());
+ diplomat::result<ICU4XWeekOf, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ capi::ICU4XWeekOf diplomat_raw_struct_out_value = diplomat_result_raw_out_value.ok;
+ diplomat_result_out_value = diplomat::Ok<ICU4XWeekOf>(ICU4XWeekOf{ .week = std::move(diplomat_raw_struct_out_value.week), .unit = std::move(static_cast<ICU4XWeekRelativeUnit>(diplomat_raw_struct_out_value.unit)) });
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline uint32_t ICU4XIsoDateTime::month() const {
+ return capi::ICU4XIsoDateTime_month(this->inner.get());
+}
+inline int32_t ICU4XIsoDateTime::year() const {
+ return capi::ICU4XIsoDateTime_year(this->inner.get());
+}
+inline bool ICU4XIsoDateTime::is_in_leap_year() const {
+ return capi::ICU4XIsoDateTime_is_in_leap_year(this->inner.get());
+}
+inline uint8_t ICU4XIsoDateTime::months_in_year() const {
+ return capi::ICU4XIsoDateTime_months_in_year(this->inner.get());
+}
+inline uint8_t ICU4XIsoDateTime::days_in_month() const {
+ return capi::ICU4XIsoDateTime_days_in_month(this->inner.get());
+}
+inline uint16_t ICU4XIsoDateTime::days_in_year() const {
+ return capi::ICU4XIsoDateTime_days_in_year(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneFormat.h b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneFormat.h
new file mode 100644
index 0000000000..e48a1142f2
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneFormat.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XIsoTimeZoneFormat_H
+#define ICU4XIsoTimeZoneFormat_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XIsoTimeZoneFormat {
+ ICU4XIsoTimeZoneFormat_Basic = 0,
+ ICU4XIsoTimeZoneFormat_Extended = 1,
+ ICU4XIsoTimeZoneFormat_UtcBasic = 2,
+ ICU4XIsoTimeZoneFormat_UtcExtended = 3,
+} ICU4XIsoTimeZoneFormat;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XIsoTimeZoneFormat_destroy(ICU4XIsoTimeZoneFormat* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneFormat.hpp b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneFormat.hpp
new file mode 100644
index 0000000000..7ede2d2ca8
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneFormat.hpp
@@ -0,0 +1,26 @@
+#ifndef ICU4XIsoTimeZoneFormat_HPP
+#define ICU4XIsoTimeZoneFormat_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XIsoTimeZoneFormat.h"
+
+
+
+/**
+ * See the [Rust documentation for `IsoFormat`](https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoFormat.html) for more information.
+ */
+enum struct ICU4XIsoTimeZoneFormat {
+ Basic = 0,
+ Extended = 1,
+ UtcBasic = 2,
+ UtcExtended = 3,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneMinuteDisplay.h b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneMinuteDisplay.h
new file mode 100644
index 0000000000..edeee97019
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneMinuteDisplay.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XIsoTimeZoneMinuteDisplay_H
+#define ICU4XIsoTimeZoneMinuteDisplay_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XIsoTimeZoneMinuteDisplay {
+ ICU4XIsoTimeZoneMinuteDisplay_Required = 0,
+ ICU4XIsoTimeZoneMinuteDisplay_Optional = 1,
+} ICU4XIsoTimeZoneMinuteDisplay;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XIsoTimeZoneMinuteDisplay_destroy(ICU4XIsoTimeZoneMinuteDisplay* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneMinuteDisplay.hpp b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneMinuteDisplay.hpp
new file mode 100644
index 0000000000..6b3e653b1d
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneMinuteDisplay.hpp
@@ -0,0 +1,24 @@
+#ifndef ICU4XIsoTimeZoneMinuteDisplay_HPP
+#define ICU4XIsoTimeZoneMinuteDisplay_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XIsoTimeZoneMinuteDisplay.h"
+
+
+
+/**
+ * See the [Rust documentation for `IsoMinutes`](https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoMinutes.html) for more information.
+ */
+enum struct ICU4XIsoTimeZoneMinuteDisplay {
+ Required = 0,
+ Optional = 1,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneOptions.h b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneOptions.h
new file mode 100644
index 0000000000..7ba051c3e6
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneOptions.h
@@ -0,0 +1,38 @@
+#ifndef ICU4XIsoTimeZoneOptions_H
+#define ICU4XIsoTimeZoneOptions_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XIsoTimeZoneFormat.h"
+#include "ICU4XIsoTimeZoneMinuteDisplay.h"
+#include "ICU4XIsoTimeZoneSecondDisplay.h"
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XIsoTimeZoneOptions {
+ ICU4XIsoTimeZoneFormat format;
+ ICU4XIsoTimeZoneMinuteDisplay minutes;
+ ICU4XIsoTimeZoneSecondDisplay seconds;
+} ICU4XIsoTimeZoneOptions;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XIsoTimeZoneFormat.h"
+#include "ICU4XIsoTimeZoneMinuteDisplay.h"
+#include "ICU4XIsoTimeZoneSecondDisplay.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XIsoTimeZoneOptions_destroy(ICU4XIsoTimeZoneOptions* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneOptions.hpp b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneOptions.hpp
new file mode 100644
index 0000000000..5082683329
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneOptions.hpp
@@ -0,0 +1,26 @@
+#ifndef ICU4XIsoTimeZoneOptions_HPP
+#define ICU4XIsoTimeZoneOptions_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XIsoTimeZoneOptions.h"
+
+#include "ICU4XIsoTimeZoneFormat.hpp"
+#include "ICU4XIsoTimeZoneMinuteDisplay.hpp"
+#include "ICU4XIsoTimeZoneSecondDisplay.hpp"
+
+struct ICU4XIsoTimeZoneOptions {
+ public:
+ ICU4XIsoTimeZoneFormat format;
+ ICU4XIsoTimeZoneMinuteDisplay minutes;
+ ICU4XIsoTimeZoneSecondDisplay seconds;
+};
+
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneSecondDisplay.h b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneSecondDisplay.h
new file mode 100644
index 0000000000..487a248f95
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneSecondDisplay.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XIsoTimeZoneSecondDisplay_H
+#define ICU4XIsoTimeZoneSecondDisplay_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XIsoTimeZoneSecondDisplay {
+ ICU4XIsoTimeZoneSecondDisplay_Optional = 0,
+ ICU4XIsoTimeZoneSecondDisplay_Never = 1,
+} ICU4XIsoTimeZoneSecondDisplay;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XIsoTimeZoneSecondDisplay_destroy(ICU4XIsoTimeZoneSecondDisplay* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneSecondDisplay.hpp b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneSecondDisplay.hpp
new file mode 100644
index 0000000000..23a0a3a85e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIsoTimeZoneSecondDisplay.hpp
@@ -0,0 +1,24 @@
+#ifndef ICU4XIsoTimeZoneSecondDisplay_HPP
+#define ICU4XIsoTimeZoneSecondDisplay_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XIsoTimeZoneSecondDisplay.h"
+
+
+
+/**
+ * See the [Rust documentation for `IsoSeconds`](https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoSeconds.html) for more information.
+ */
+enum struct ICU4XIsoTimeZoneSecondDisplay {
+ Optional = 0,
+ Never = 1,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIsoWeekday.h b/intl/icu_capi/cpp/include/ICU4XIsoWeekday.h
new file mode 100644
index 0000000000..a23d0a3b9e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIsoWeekday.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XIsoWeekday_H
+#define ICU4XIsoWeekday_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XIsoWeekday {
+ ICU4XIsoWeekday_Monday = 1,
+ ICU4XIsoWeekday_Tuesday = 2,
+ ICU4XIsoWeekday_Wednesday = 3,
+ ICU4XIsoWeekday_Thursday = 4,
+ ICU4XIsoWeekday_Friday = 5,
+ ICU4XIsoWeekday_Saturday = 6,
+ ICU4XIsoWeekday_Sunday = 7,
+} ICU4XIsoWeekday;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XIsoWeekday_destroy(ICU4XIsoWeekday* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XIsoWeekday.hpp b/intl/icu_capi/cpp/include/ICU4XIsoWeekday.hpp
new file mode 100644
index 0000000000..ec33e4a80e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XIsoWeekday.hpp
@@ -0,0 +1,25 @@
+#ifndef ICU4XIsoWeekday_HPP
+#define ICU4XIsoWeekday_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XIsoWeekday.h"
+
+
+enum struct ICU4XIsoWeekday {
+ Monday = 1,
+ Tuesday = 2,
+ Wednesday = 3,
+ Thursday = 4,
+ Friday = 5,
+ Saturday = 6,
+ Sunday = 7,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLanguageDisplay.h b/intl/icu_capi/cpp/include/ICU4XLanguageDisplay.h
new file mode 100644
index 0000000000..0b921351fe
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLanguageDisplay.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XLanguageDisplay_H
+#define ICU4XLanguageDisplay_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XLanguageDisplay {
+ ICU4XLanguageDisplay_Dialect = 0,
+ ICU4XLanguageDisplay_Standard = 1,
+} ICU4XLanguageDisplay;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLanguageDisplay_destroy(ICU4XLanguageDisplay* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLanguageDisplay.hpp b/intl/icu_capi/cpp/include/ICU4XLanguageDisplay.hpp
new file mode 100644
index 0000000000..6914e4671e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLanguageDisplay.hpp
@@ -0,0 +1,24 @@
+#ifndef ICU4XLanguageDisplay_HPP
+#define ICU4XLanguageDisplay_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLanguageDisplay.h"
+
+
+
+/**
+ * See the [Rust documentation for `LanguageDisplay`](https://docs.rs/icu/latest/icu/displaynames/options/enum.LanguageDisplay.html) for more information.
+ */
+enum struct ICU4XLanguageDisplay {
+ Dialect = 0,
+ Standard = 1,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLeadingAdjustment.h b/intl/icu_capi/cpp/include/ICU4XLeadingAdjustment.h
new file mode 100644
index 0000000000..91647188ed
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLeadingAdjustment.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XLeadingAdjustment_H
+#define ICU4XLeadingAdjustment_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XLeadingAdjustment {
+ ICU4XLeadingAdjustment_Auto = 0,
+ ICU4XLeadingAdjustment_None = 1,
+ ICU4XLeadingAdjustment_ToCased = 2,
+} ICU4XLeadingAdjustment;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLeadingAdjustment_destroy(ICU4XLeadingAdjustment* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLeadingAdjustment.hpp b/intl/icu_capi/cpp/include/ICU4XLeadingAdjustment.hpp
new file mode 100644
index 0000000000..17ba8dc33a
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLeadingAdjustment.hpp
@@ -0,0 +1,25 @@
+#ifndef ICU4XLeadingAdjustment_HPP
+#define ICU4XLeadingAdjustment_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLeadingAdjustment.h"
+
+
+
+/**
+ * See the [Rust documentation for `LeadingAdjustment`](https://docs.rs/icu/latest/icu/casemap/titlecase/enum.LeadingAdjustment.html) for more information.
+ */
+enum struct ICU4XLeadingAdjustment {
+ Auto = 0,
+ None = 1,
+ ToCased = 2,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.h b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.h
new file mode 100644
index 0000000000..c1a4c39131
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XLineBreakIteratorLatin1_H
+#define ICU4XLineBreakIteratorLatin1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLineBreakIteratorLatin1 ICU4XLineBreakIteratorLatin1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XLineBreakIteratorLatin1_next(ICU4XLineBreakIteratorLatin1* self);
+void ICU4XLineBreakIteratorLatin1_destroy(ICU4XLineBreakIteratorLatin1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp
new file mode 100644
index 0000000000..566ed7f49b
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp
@@ -0,0 +1,53 @@
+#ifndef ICU4XLineBreakIteratorLatin1_HPP
+#define ICU4XLineBreakIteratorLatin1_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLineBreakIteratorLatin1.h"
+
+
+/**
+ * A destruction policy for using ICU4XLineBreakIteratorLatin1 with std::unique_ptr.
+ */
+struct ICU4XLineBreakIteratorLatin1Deleter {
+ void operator()(capi::ICU4XLineBreakIteratorLatin1* l) const noexcept {
+ capi::ICU4XLineBreakIteratorLatin1_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `LineBreakIterator`](https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorLatin1.html)
+ */
+class ICU4XLineBreakIteratorLatin1 {
+ public:
+
+ /**
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ * out of range of a 32-bit signed integer.
+ *
+ * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next) for more information.
+ */
+ int32_t next();
+ inline const capi::ICU4XLineBreakIteratorLatin1* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XLineBreakIteratorLatin1* AsFFIMut() { return this->inner.get(); }
+ inline explicit ICU4XLineBreakIteratorLatin1(capi::ICU4XLineBreakIteratorLatin1* i) : inner(i) {}
+ ICU4XLineBreakIteratorLatin1() = default;
+ ICU4XLineBreakIteratorLatin1(ICU4XLineBreakIteratorLatin1&&) noexcept = default;
+ ICU4XLineBreakIteratorLatin1& operator=(ICU4XLineBreakIteratorLatin1&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XLineBreakIteratorLatin1, ICU4XLineBreakIteratorLatin1Deleter> inner;
+};
+
+
+inline int32_t ICU4XLineBreakIteratorLatin1::next() {
+ return capi::ICU4XLineBreakIteratorLatin1_next(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.h b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.h
new file mode 100644
index 0000000000..78ae12c7e4
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XLineBreakIteratorUtf16_H
+#define ICU4XLineBreakIteratorUtf16_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLineBreakIteratorUtf16 ICU4XLineBreakIteratorUtf16;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XLineBreakIteratorUtf16_next(ICU4XLineBreakIteratorUtf16* self);
+void ICU4XLineBreakIteratorUtf16_destroy(ICU4XLineBreakIteratorUtf16* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp
new file mode 100644
index 0000000000..656b806bee
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp
@@ -0,0 +1,53 @@
+#ifndef ICU4XLineBreakIteratorUtf16_HPP
+#define ICU4XLineBreakIteratorUtf16_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLineBreakIteratorUtf16.h"
+
+
+/**
+ * A destruction policy for using ICU4XLineBreakIteratorUtf16 with std::unique_ptr.
+ */
+struct ICU4XLineBreakIteratorUtf16Deleter {
+ void operator()(capi::ICU4XLineBreakIteratorUtf16* l) const noexcept {
+ capi::ICU4XLineBreakIteratorUtf16_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `LineBreakIterator`](https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorUtf16.html)
+ */
+class ICU4XLineBreakIteratorUtf16 {
+ public:
+
+ /**
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ * out of range of a 32-bit signed integer.
+ *
+ * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next) for more information.
+ */
+ int32_t next();
+ inline const capi::ICU4XLineBreakIteratorUtf16* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XLineBreakIteratorUtf16* AsFFIMut() { return this->inner.get(); }
+ inline explicit ICU4XLineBreakIteratorUtf16(capi::ICU4XLineBreakIteratorUtf16* i) : inner(i) {}
+ ICU4XLineBreakIteratorUtf16() = default;
+ ICU4XLineBreakIteratorUtf16(ICU4XLineBreakIteratorUtf16&&) noexcept = default;
+ ICU4XLineBreakIteratorUtf16& operator=(ICU4XLineBreakIteratorUtf16&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XLineBreakIteratorUtf16, ICU4XLineBreakIteratorUtf16Deleter> inner;
+};
+
+
+inline int32_t ICU4XLineBreakIteratorUtf16::next() {
+ return capi::ICU4XLineBreakIteratorUtf16_next(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf8.h b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf8.h
new file mode 100644
index 0000000000..3a08c5ad23
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf8.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XLineBreakIteratorUtf8_H
+#define ICU4XLineBreakIteratorUtf8_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLineBreakIteratorUtf8 ICU4XLineBreakIteratorUtf8;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XLineBreakIteratorUtf8_next(ICU4XLineBreakIteratorUtf8* self);
+void ICU4XLineBreakIteratorUtf8_destroy(ICU4XLineBreakIteratorUtf8* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf8.hpp b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf8.hpp
new file mode 100644
index 0000000000..e24e4a706a
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf8.hpp
@@ -0,0 +1,53 @@
+#ifndef ICU4XLineBreakIteratorUtf8_HPP
+#define ICU4XLineBreakIteratorUtf8_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLineBreakIteratorUtf8.h"
+
+
+/**
+ * A destruction policy for using ICU4XLineBreakIteratorUtf8 with std::unique_ptr.
+ */
+struct ICU4XLineBreakIteratorUtf8Deleter {
+ void operator()(capi::ICU4XLineBreakIteratorUtf8* l) const noexcept {
+ capi::ICU4XLineBreakIteratorUtf8_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `LineBreakIterator`](https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorPotentiallyIllFormedUtf8.html)
+ */
+class ICU4XLineBreakIteratorUtf8 {
+ public:
+
+ /**
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ * out of range of a 32-bit signed integer.
+ *
+ * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next) for more information.
+ */
+ int32_t next();
+ inline const capi::ICU4XLineBreakIteratorUtf8* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XLineBreakIteratorUtf8* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XLineBreakIteratorUtf8(capi::ICU4XLineBreakIteratorUtf8* i) : inner(i) {}
+ ICU4XLineBreakIteratorUtf8() = default;
+ ICU4XLineBreakIteratorUtf8(ICU4XLineBreakIteratorUtf8&&) noexcept = default;
+ ICU4XLineBreakIteratorUtf8& operator=(ICU4XLineBreakIteratorUtf8&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XLineBreakIteratorUtf8, ICU4XLineBreakIteratorUtf8Deleter> inner;
+};
+
+
+inline int32_t ICU4XLineBreakIteratorUtf8::next() {
+ return capi::ICU4XLineBreakIteratorUtf8_next(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakOptionsV1.h b/intl/icu_capi/cpp/include/ICU4XLineBreakOptionsV1.h
new file mode 100644
index 0000000000..5fbf4b5814
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakOptionsV1.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XLineBreakOptionsV1_H
+#define ICU4XLineBreakOptionsV1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XLineBreakStrictness.h"
+#include "ICU4XLineBreakWordOption.h"
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLineBreakOptionsV1 {
+ ICU4XLineBreakStrictness strictness;
+ ICU4XLineBreakWordOption word_option;
+ bool ja_zh;
+} ICU4XLineBreakOptionsV1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XLineBreakStrictness.h"
+#include "ICU4XLineBreakWordOption.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLineBreakOptionsV1_destroy(ICU4XLineBreakOptionsV1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakOptionsV1.hpp b/intl/icu_capi/cpp/include/ICU4XLineBreakOptionsV1.hpp
new file mode 100644
index 0000000000..1a60164db4
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakOptionsV1.hpp
@@ -0,0 +1,29 @@
+#ifndef ICU4XLineBreakOptionsV1_HPP
+#define ICU4XLineBreakOptionsV1_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLineBreakOptionsV1.h"
+
+#include "ICU4XLineBreakStrictness.hpp"
+#include "ICU4XLineBreakWordOption.hpp"
+
+
+/**
+ * See the [Rust documentation for `LineBreakOptions`](https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakOptions.html) for more information.
+ */
+struct ICU4XLineBreakOptionsV1 {
+ public:
+ ICU4XLineBreakStrictness strictness;
+ ICU4XLineBreakWordOption word_option;
+ bool ja_zh;
+};
+
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakStrictness.h b/intl/icu_capi/cpp/include/ICU4XLineBreakStrictness.h
new file mode 100644
index 0000000000..e3534b7ec7
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakStrictness.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XLineBreakStrictness_H
+#define ICU4XLineBreakStrictness_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XLineBreakStrictness {
+ ICU4XLineBreakStrictness_Loose = 0,
+ ICU4XLineBreakStrictness_Normal = 1,
+ ICU4XLineBreakStrictness_Strict = 2,
+ ICU4XLineBreakStrictness_Anywhere = 3,
+} ICU4XLineBreakStrictness;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLineBreakStrictness_destroy(ICU4XLineBreakStrictness* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakStrictness.hpp b/intl/icu_capi/cpp/include/ICU4XLineBreakStrictness.hpp
new file mode 100644
index 0000000000..d4eac0f43e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakStrictness.hpp
@@ -0,0 +1,26 @@
+#ifndef ICU4XLineBreakStrictness_HPP
+#define ICU4XLineBreakStrictness_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLineBreakStrictness.h"
+
+
+
+/**
+ * See the [Rust documentation for `LineBreakStrictness`](https://docs.rs/icu/latest/icu/segmenter/enum.LineBreakStrictness.html) for more information.
+ */
+enum struct ICU4XLineBreakStrictness {
+ Loose = 0,
+ Normal = 1,
+ Strict = 2,
+ Anywhere = 3,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakWordOption.h b/intl/icu_capi/cpp/include/ICU4XLineBreakWordOption.h
new file mode 100644
index 0000000000..02a6ca6f2d
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakWordOption.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XLineBreakWordOption_H
+#define ICU4XLineBreakWordOption_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XLineBreakWordOption {
+ ICU4XLineBreakWordOption_Normal = 0,
+ ICU4XLineBreakWordOption_BreakAll = 1,
+ ICU4XLineBreakWordOption_KeepAll = 2,
+} ICU4XLineBreakWordOption;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLineBreakWordOption_destroy(ICU4XLineBreakWordOption* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakWordOption.hpp b/intl/icu_capi/cpp/include/ICU4XLineBreakWordOption.hpp
new file mode 100644
index 0000000000..094a938d11
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakWordOption.hpp
@@ -0,0 +1,25 @@
+#ifndef ICU4XLineBreakWordOption_HPP
+#define ICU4XLineBreakWordOption_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLineBreakWordOption.h"
+
+
+
+/**
+ * See the [Rust documentation for `LineBreakWordOption`](https://docs.rs/icu/latest/icu/segmenter/enum.LineBreakWordOption.html) for more information.
+ */
+enum struct ICU4XLineBreakWordOption {
+ Normal = 0,
+ BreakAll = 1,
+ KeepAll = 2,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLineSegmenter.h b/intl/icu_capi/cpp/include/ICU4XLineSegmenter.h
new file mode 100644
index 0000000000..f734ec78f8
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLineSegmenter.h
@@ -0,0 +1,51 @@
+#ifndef ICU4XLineSegmenter_H
+#define ICU4XLineSegmenter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLineSegmenter ICU4XLineSegmenter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XLineSegmenter_ICU4XError.h"
+#include "ICU4XLineBreakOptionsV1.h"
+#include "ICU4XLineBreakIteratorUtf8.h"
+#include "ICU4XLineBreakIteratorUtf16.h"
+#include "ICU4XLineBreakIteratorLatin1.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_auto(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_lstm(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_dictionary(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_auto_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options);
+
+diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_lstm_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options);
+
+diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_dictionary_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options);
+
+ICU4XLineBreakIteratorUtf8* ICU4XLineSegmenter_segment_utf8(const ICU4XLineSegmenter* self, const char* input_data, size_t input_len);
+
+ICU4XLineBreakIteratorUtf16* ICU4XLineSegmenter_segment_utf16(const ICU4XLineSegmenter* self, const uint16_t* input_data, size_t input_len);
+
+ICU4XLineBreakIteratorLatin1* ICU4XLineSegmenter_segment_latin1(const ICU4XLineSegmenter* self, const uint8_t* input_data, size_t input_len);
+void ICU4XLineSegmenter_destroy(ICU4XLineSegmenter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLineSegmenter.hpp b/intl/icu_capi/cpp/include/ICU4XLineSegmenter.hpp
new file mode 100644
index 0000000000..7d94f79e8d
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLineSegmenter.hpp
@@ -0,0 +1,201 @@
+#ifndef ICU4XLineSegmenter_HPP
+#define ICU4XLineSegmenter_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLineSegmenter.h"
+
+class ICU4XDataProvider;
+class ICU4XLineSegmenter;
+#include "ICU4XError.hpp"
+struct ICU4XLineBreakOptionsV1;
+class ICU4XLineBreakIteratorUtf8;
+class ICU4XLineBreakIteratorUtf16;
+class ICU4XLineBreakIteratorLatin1;
+
+/**
+ * A destruction policy for using ICU4XLineSegmenter with std::unique_ptr.
+ */
+struct ICU4XLineSegmenterDeleter {
+ void operator()(capi::ICU4XLineSegmenter* l) const noexcept {
+ capi::ICU4XLineSegmenter_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X line-break segmenter, capable of finding breakpoints in strings.
+ *
+ * See the [Rust documentation for `LineSegmenter`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html) for more information.
+ */
+class ICU4XLineSegmenter {
+ public:
+
+ /**
+ * Construct a [`ICU4XLineSegmenter`] with default options. It automatically loads the best
+ * available payload data for Burmese, Khmer, Lao, and Thai.
+ *
+ * See the [Rust documentation for `new_auto`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto) for more information.
+ */
+ static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_auto(const ICU4XDataProvider& provider);
+
+ /**
+ * Construct a [`ICU4XLineSegmenter`] with default options and LSTM payload data for
+ * Burmese, Khmer, Lao, and Thai.
+ *
+ * See the [Rust documentation for `new_lstm`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm) for more information.
+ */
+ static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_lstm(const ICU4XDataProvider& provider);
+
+ /**
+ * Construct a [`ICU4XLineSegmenter`] with default options and dictionary payload data for
+ * Burmese, Khmer, Lao, and Thai..
+ *
+ * See the [Rust documentation for `new_dictionary`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary) for more information.
+ */
+ static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_dictionary(const ICU4XDataProvider& provider);
+
+ /**
+ * Construct a [`ICU4XLineSegmenter`] with custom options. It automatically loads the best
+ * available payload data for Burmese, Khmer, Lao, and Thai.
+ *
+ * See the [Rust documentation for `new_auto_with_options`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto_with_options) for more information.
+ */
+ static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_auto_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options);
+
+ /**
+ * Construct a [`ICU4XLineSegmenter`] with custom options and LSTM payload data for
+ * Burmese, Khmer, Lao, and Thai.
+ *
+ * See the [Rust documentation for `new_lstm_with_options`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm_with_options) for more information.
+ */
+ static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_lstm_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options);
+
+ /**
+ * Construct a [`ICU4XLineSegmenter`] with custom options and dictionary payload data for
+ * Burmese, Khmer, Lao, and Thai.
+ *
+ * See the [Rust documentation for `new_dictionary_with_options`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary_with_options) for more information.
+ */
+ static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_dictionary_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options);
+
+ /**
+ * Segments a (potentially ill-formed) UTF-8 string.
+ *
+ * See the [Rust documentation for `segment_utf8`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_utf8) for more information.
+ *
+ * Lifetimes: `this`, `input` must live at least as long as the output.
+ */
+ ICU4XLineBreakIteratorUtf8 segment_utf8(const std::string_view input) const;
+
+ /**
+ * Segments a UTF-16 string.
+ *
+ * See the [Rust documentation for `segment_utf16`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_utf16) for more information.
+ *
+ * Lifetimes: `this`, `input` must live at least as long as the output.
+ */
+ ICU4XLineBreakIteratorUtf16 segment_utf16(const diplomat::span<const uint16_t> input) const;
+
+ /**
+ * Segments a Latin-1 string.
+ *
+ * See the [Rust documentation for `segment_latin1`](https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_latin1) for more information.
+ *
+ * Lifetimes: `this`, `input` must live at least as long as the output.
+ */
+ ICU4XLineBreakIteratorLatin1 segment_latin1(const diplomat::span<const uint8_t> input) const;
+ inline const capi::ICU4XLineSegmenter* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XLineSegmenter* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XLineSegmenter(capi::ICU4XLineSegmenter* i) : inner(i) {}
+ ICU4XLineSegmenter() = default;
+ ICU4XLineSegmenter(ICU4XLineSegmenter&&) noexcept = default;
+ ICU4XLineSegmenter& operator=(ICU4XLineSegmenter&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XLineSegmenter, ICU4XLineSegmenterDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLineBreakOptionsV1.hpp"
+#include "ICU4XLineBreakIteratorUtf8.hpp"
+#include "ICU4XLineBreakIteratorUtf16.hpp"
+#include "ICU4XLineBreakIteratorLatin1.hpp"
+
+inline diplomat::result<ICU4XLineSegmenter, ICU4XError> ICU4XLineSegmenter::create_auto(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XLineSegmenter_create_auto(provider.AsFFI());
+ diplomat::result<ICU4XLineSegmenter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLineSegmenter>(ICU4XLineSegmenter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XLineSegmenter, ICU4XError> ICU4XLineSegmenter::create_lstm(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XLineSegmenter_create_lstm(provider.AsFFI());
+ diplomat::result<ICU4XLineSegmenter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLineSegmenter>(ICU4XLineSegmenter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XLineSegmenter, ICU4XError> ICU4XLineSegmenter::create_dictionary(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XLineSegmenter_create_dictionary(provider.AsFFI());
+ diplomat::result<ICU4XLineSegmenter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLineSegmenter>(ICU4XLineSegmenter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XLineSegmenter, ICU4XError> ICU4XLineSegmenter::create_auto_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options) {
+ ICU4XLineBreakOptionsV1 diplomat_wrapped_struct_options = options;
+ auto diplomat_result_raw_out_value = capi::ICU4XLineSegmenter_create_auto_with_options_v1(provider.AsFFI(), capi::ICU4XLineBreakOptionsV1{ .strictness = static_cast<capi::ICU4XLineBreakStrictness>(diplomat_wrapped_struct_options.strictness), .word_option = static_cast<capi::ICU4XLineBreakWordOption>(diplomat_wrapped_struct_options.word_option), .ja_zh = diplomat_wrapped_struct_options.ja_zh });
+ diplomat::result<ICU4XLineSegmenter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLineSegmenter>(ICU4XLineSegmenter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XLineSegmenter, ICU4XError> ICU4XLineSegmenter::create_lstm_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options) {
+ ICU4XLineBreakOptionsV1 diplomat_wrapped_struct_options = options;
+ auto diplomat_result_raw_out_value = capi::ICU4XLineSegmenter_create_lstm_with_options_v1(provider.AsFFI(), capi::ICU4XLineBreakOptionsV1{ .strictness = static_cast<capi::ICU4XLineBreakStrictness>(diplomat_wrapped_struct_options.strictness), .word_option = static_cast<capi::ICU4XLineBreakWordOption>(diplomat_wrapped_struct_options.word_option), .ja_zh = diplomat_wrapped_struct_options.ja_zh });
+ diplomat::result<ICU4XLineSegmenter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLineSegmenter>(ICU4XLineSegmenter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XLineSegmenter, ICU4XError> ICU4XLineSegmenter::create_dictionary_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options) {
+ ICU4XLineBreakOptionsV1 diplomat_wrapped_struct_options = options;
+ auto diplomat_result_raw_out_value = capi::ICU4XLineSegmenter_create_dictionary_with_options_v1(provider.AsFFI(), capi::ICU4XLineBreakOptionsV1{ .strictness = static_cast<capi::ICU4XLineBreakStrictness>(diplomat_wrapped_struct_options.strictness), .word_option = static_cast<capi::ICU4XLineBreakWordOption>(diplomat_wrapped_struct_options.word_option), .ja_zh = diplomat_wrapped_struct_options.ja_zh });
+ diplomat::result<ICU4XLineSegmenter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLineSegmenter>(ICU4XLineSegmenter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XLineBreakIteratorUtf8 ICU4XLineSegmenter::segment_utf8(const std::string_view input) const {
+ return ICU4XLineBreakIteratorUtf8(capi::ICU4XLineSegmenter_segment_utf8(this->inner.get(), input.data(), input.size()));
+}
+inline ICU4XLineBreakIteratorUtf16 ICU4XLineSegmenter::segment_utf16(const diplomat::span<const uint16_t> input) const {
+ return ICU4XLineBreakIteratorUtf16(capi::ICU4XLineSegmenter_segment_utf16(this->inner.get(), input.data(), input.size()));
+}
+inline ICU4XLineBreakIteratorLatin1 ICU4XLineSegmenter::segment_latin1(const diplomat::span<const uint8_t> input) const {
+ return ICU4XLineBreakIteratorLatin1(capi::ICU4XLineSegmenter_segment_latin1(this->inner.get(), input.data(), input.size()));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XList.h b/intl/icu_capi/cpp/include/ICU4XList.h
new file mode 100644
index 0000000000..6549561c37
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XList.h
@@ -0,0 +1,35 @@
+#ifndef ICU4XList_H
+#define ICU4XList_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XList ICU4XList;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+ICU4XList* ICU4XList_create();
+
+ICU4XList* ICU4XList_create_with_capacity(size_t capacity);
+
+void ICU4XList_push(ICU4XList* self, const char* val_data, size_t val_len);
+
+size_t ICU4XList_len(const ICU4XList* self);
+void ICU4XList_destroy(ICU4XList* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XList.hpp b/intl/icu_capi/cpp/include/ICU4XList.hpp
new file mode 100644
index 0000000000..e2212c021a
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XList.hpp
@@ -0,0 +1,77 @@
+#ifndef ICU4XList_HPP
+#define ICU4XList_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XList.h"
+
+class ICU4XList;
+
+/**
+ * A destruction policy for using ICU4XList with std::unique_ptr.
+ */
+struct ICU4XListDeleter {
+ void operator()(capi::ICU4XList* l) const noexcept {
+ capi::ICU4XList_destroy(l);
+ }
+};
+
+/**
+ * A list of strings
+ */
+class ICU4XList {
+ public:
+
+ /**
+ * Create a new list of strings
+ */
+ static ICU4XList create();
+
+ /**
+ * Create a new list of strings with preallocated space to hold
+ * at least `capacity` elements
+ */
+ static ICU4XList create_with_capacity(size_t capacity);
+
+ /**
+ * Push a string to the list
+ *
+ * For C++ users, potentially invalid UTF8 will be handled via
+ * REPLACEMENT CHARACTERs
+ */
+ void push(const std::string_view val);
+
+ /**
+ * The number of elements in this list
+ */
+ size_t len() const;
+ inline const capi::ICU4XList* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XList* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XList(capi::ICU4XList* i) : inner(i) {}
+ ICU4XList() = default;
+ ICU4XList(ICU4XList&&) noexcept = default;
+ ICU4XList& operator=(ICU4XList&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XList, ICU4XListDeleter> inner;
+};
+
+
+inline ICU4XList ICU4XList::create() {
+ return ICU4XList(capi::ICU4XList_create());
+}
+inline ICU4XList ICU4XList::create_with_capacity(size_t capacity) {
+ return ICU4XList(capi::ICU4XList_create_with_capacity(capacity));
+}
+inline void ICU4XList::push(const std::string_view val) {
+ capi::ICU4XList_push(this->inner.get(), val.data(), val.size());
+}
+inline size_t ICU4XList::len() const {
+ return capi::ICU4XList_len(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XListFormatter.h b/intl/icu_capi/cpp/include/ICU4XListFormatter.h
new file mode 100644
index 0000000000..ee358dc254
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XListFormatter.h
@@ -0,0 +1,41 @@
+#ifndef ICU4XListFormatter_H
+#define ICU4XListFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XListFormatter ICU4XListFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XListLength.h"
+#include "diplomat_result_box_ICU4XListFormatter_ICU4XError.h"
+#include "ICU4XList.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XListFormatter_ICU4XError ICU4XListFormatter_create_and_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length);
+
+diplomat_result_box_ICU4XListFormatter_ICU4XError ICU4XListFormatter_create_or_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length);
+
+diplomat_result_box_ICU4XListFormatter_ICU4XError ICU4XListFormatter_create_unit_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length);
+
+diplomat_result_void_ICU4XError ICU4XListFormatter_format(const ICU4XListFormatter* self, const ICU4XList* list, DiplomatWriteable* write);
+void ICU4XListFormatter_destroy(ICU4XListFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XListFormatter.hpp b/intl/icu_capi/cpp/include/ICU4XListFormatter.hpp
new file mode 100644
index 0000000000..73be39bcf7
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XListFormatter.hpp
@@ -0,0 +1,133 @@
+#ifndef ICU4XListFormatter_HPP
+#define ICU4XListFormatter_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XListFormatter.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+#include "ICU4XListLength.hpp"
+class ICU4XListFormatter;
+#include "ICU4XError.hpp"
+class ICU4XList;
+
+/**
+ * A destruction policy for using ICU4XListFormatter with std::unique_ptr.
+ */
+struct ICU4XListFormatterDeleter {
+ void operator()(capi::ICU4XListFormatter* l) const noexcept {
+ capi::ICU4XListFormatter_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `ListFormatter`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html) for more information.
+ */
+class ICU4XListFormatter {
+ public:
+
+ /**
+ * Construct a new ICU4XListFormatter instance for And patterns
+ *
+ * See the [Rust documentation for `try_new_and_with_length`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_and_with_length) for more information.
+ */
+ static diplomat::result<ICU4XListFormatter, ICU4XError> create_and_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length);
+
+ /**
+ * Construct a new ICU4XListFormatter instance for And patterns
+ *
+ * See the [Rust documentation for `try_new_or_with_length`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_or_with_length) for more information.
+ */
+ static diplomat::result<ICU4XListFormatter, ICU4XError> create_or_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length);
+
+ /**
+ * Construct a new ICU4XListFormatter instance for And patterns
+ *
+ * See the [Rust documentation for `try_new_unit_with_length`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_unit_with_length) for more information.
+ */
+ static diplomat::result<ICU4XListFormatter, ICU4XError> create_unit_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length);
+
+ /**
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_to_writeable(const ICU4XList& list, W& write) const;
+
+ /**
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format(const ICU4XList& list) const;
+ inline const capi::ICU4XListFormatter* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XListFormatter* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XListFormatter(capi::ICU4XListFormatter* i) : inner(i) {}
+ ICU4XListFormatter() = default;
+ ICU4XListFormatter(ICU4XListFormatter&&) noexcept = default;
+ ICU4XListFormatter& operator=(ICU4XListFormatter&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XListFormatter, ICU4XListFormatterDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+#include "ICU4XList.hpp"
+
+inline diplomat::result<ICU4XListFormatter, ICU4XError> ICU4XListFormatter::create_and_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length) {
+ auto diplomat_result_raw_out_value = capi::ICU4XListFormatter_create_and_with_length(provider.AsFFI(), locale.AsFFI(), static_cast<capi::ICU4XListLength>(length));
+ diplomat::result<ICU4XListFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XListFormatter>(ICU4XListFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XListFormatter, ICU4XError> ICU4XListFormatter::create_or_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length) {
+ auto diplomat_result_raw_out_value = capi::ICU4XListFormatter_create_or_with_length(provider.AsFFI(), locale.AsFFI(), static_cast<capi::ICU4XListLength>(length));
+ diplomat::result<ICU4XListFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XListFormatter>(ICU4XListFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XListFormatter, ICU4XError> ICU4XListFormatter::create_unit_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XListLength length) {
+ auto diplomat_result_raw_out_value = capi::ICU4XListFormatter_create_unit_with_length(provider.AsFFI(), locale.AsFFI(), static_cast<capi::ICU4XListLength>(length));
+ diplomat::result<ICU4XListFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XListFormatter>(ICU4XListFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XListFormatter::format_to_writeable(const ICU4XList& list, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XListFormatter_format(this->inner.get(), list.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XListFormatter::format(const ICU4XList& list) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XListFormatter_format(this->inner.get(), list.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XListLength.h b/intl/icu_capi/cpp/include/ICU4XListLength.h
new file mode 100644
index 0000000000..7092f6d9df
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XListLength.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XListLength_H
+#define ICU4XListLength_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XListLength {
+ ICU4XListLength_Wide = 0,
+ ICU4XListLength_Short = 1,
+ ICU4XListLength_Narrow = 2,
+} ICU4XListLength;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XListLength_destroy(ICU4XListLength* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XListLength.hpp b/intl/icu_capi/cpp/include/ICU4XListLength.hpp
new file mode 100644
index 0000000000..a9bd4372d0
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XListLength.hpp
@@ -0,0 +1,25 @@
+#ifndef ICU4XListLength_HPP
+#define ICU4XListLength_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XListLength.h"
+
+
+
+/**
+ * See the [Rust documentation for `ListLength`](https://docs.rs/icu/latest/icu/list/enum.ListLength.html) for more information.
+ */
+enum struct ICU4XListLength {
+ Wide = 0,
+ Short = 1,
+ Narrow = 2,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocale.h b/intl/icu_capi/cpp/include/ICU4XLocale.h
new file mode 100644
index 0000000000..dea8d196b5
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocale.h
@@ -0,0 +1,64 @@
+#ifndef ICU4XLocale_H
+#define ICU4XLocale_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocale ICU4XLocale;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XLocale_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XOrdering.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XLocale_ICU4XError ICU4XLocale_create_from_string(const char* name_data, size_t name_len);
+
+ICU4XLocale* ICU4XLocale_create_und();
+
+ICU4XLocale* ICU4XLocale_clone(const ICU4XLocale* self);
+
+diplomat_result_void_ICU4XError ICU4XLocale_basename(const ICU4XLocale* self, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XLocale_get_unicode_extension(const ICU4XLocale* self, const char* bytes_data, size_t bytes_len, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XLocale_language(const ICU4XLocale* self, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XLocale_set_language(ICU4XLocale* self, const char* bytes_data, size_t bytes_len);
+
+diplomat_result_void_ICU4XError ICU4XLocale_region(const ICU4XLocale* self, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XLocale_set_region(ICU4XLocale* self, const char* bytes_data, size_t bytes_len);
+
+diplomat_result_void_ICU4XError ICU4XLocale_script(const ICU4XLocale* self, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XLocale_set_script(ICU4XLocale* self, const char* bytes_data, size_t bytes_len);
+
+diplomat_result_void_ICU4XError ICU4XLocale_canonicalize(const char* bytes_data, size_t bytes_len, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XLocale_to_string(const ICU4XLocale* self, DiplomatWriteable* write);
+
+bool ICU4XLocale_normalizing_eq(const ICU4XLocale* self, const char* other_data, size_t other_len);
+
+ICU4XOrdering ICU4XLocale_strict_cmp(const ICU4XLocale* self, const char* other_data, size_t other_len);
+
+ICU4XLocale* ICU4XLocale_create_en();
+
+ICU4XLocale* ICU4XLocale_create_bn();
+void ICU4XLocale_destroy(ICU4XLocale* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocale.hpp b/intl/icu_capi/cpp/include/ICU4XLocale.hpp
new file mode 100644
index 0000000000..578f6e1df3
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocale.hpp
@@ -0,0 +1,438 @@
+#ifndef ICU4XLocale_HPP
+#define ICU4XLocale_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLocale.h"
+
+class ICU4XLocale;
+#include "ICU4XError.hpp"
+#include "ICU4XOrdering.hpp"
+
+/**
+ * A destruction policy for using ICU4XLocale with std::unique_ptr.
+ */
+struct ICU4XLocaleDeleter {
+ void operator()(capi::ICU4XLocale* l) const noexcept {
+ capi::ICU4XLocale_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X Locale, capable of representing strings like `"en-US"`.
+ *
+ * See the [Rust documentation for `Locale`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html) for more information.
+ */
+class ICU4XLocale {
+ public:
+
+ /**
+ * Construct an [`ICU4XLocale`] from an locale identifier.
+ *
+ * This will run the complete locale parsing algorithm. If code size and
+ * performance are critical and the locale is of a known shape (such as
+ * `aa-BB`) use `create_und`, `set_language`, `set_script`, and `set_region`.
+ *
+ * See the [Rust documentation for `try_from_bytes`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes) for more information.
+ */
+ static diplomat::result<ICU4XLocale, ICU4XError> create_from_string(const std::string_view name);
+
+ /**
+ * Construct a default undefined [`ICU4XLocale`] "und".
+ *
+ * See the [Rust documentation for `UND`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#associatedconstant.UND) for more information.
+ */
+ static ICU4XLocale create_und();
+
+ /**
+ * Clones the [`ICU4XLocale`].
+ *
+ * See the [Rust documentation for `Locale`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html) for more information.
+ */
+ ICU4XLocale clone() const;
+
+ /**
+ * Write a string representation of the `LanguageIdentifier` part of
+ * [`ICU4XLocale`] to `write`.
+ *
+ * See the [Rust documentation for `id`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> basename_to_writeable(W& write) const;
+
+ /**
+ * Write a string representation of the `LanguageIdentifier` part of
+ * [`ICU4XLocale`] to `write`.
+ *
+ * See the [Rust documentation for `id`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> basename() const;
+
+ /**
+ * Write a string representation of the unicode extension to `write`
+ *
+ * See the [Rust documentation for `extensions`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.extensions) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> get_unicode_extension_to_writeable(const std::string_view bytes, W& write) const;
+
+ /**
+ * Write a string representation of the unicode extension to `write`
+ *
+ * See the [Rust documentation for `extensions`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.extensions) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> get_unicode_extension(const std::string_view bytes) const;
+
+ /**
+ * Write a string representation of [`ICU4XLocale`] language to `write`
+ *
+ * See the [Rust documentation for `id`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> language_to_writeable(W& write) const;
+
+ /**
+ * Write a string representation of [`ICU4XLocale`] language to `write`
+ *
+ * See the [Rust documentation for `id`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> language() const;
+
+ /**
+ * Set the language part of the [`ICU4XLocale`].
+ *
+ * See the [Rust documentation for `try_from_bytes`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes) for more information.
+ */
+ diplomat::result<std::monostate, ICU4XError> set_language(const std::string_view bytes);
+
+ /**
+ * Write a string representation of [`ICU4XLocale`] region to `write`
+ *
+ * See the [Rust documentation for `id`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> region_to_writeable(W& write) const;
+
+ /**
+ * Write a string representation of [`ICU4XLocale`] region to `write`
+ *
+ * See the [Rust documentation for `id`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> region() const;
+
+ /**
+ * Set the region part of the [`ICU4XLocale`].
+ *
+ * See the [Rust documentation for `try_from_bytes`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes) for more information.
+ */
+ diplomat::result<std::monostate, ICU4XError> set_region(const std::string_view bytes);
+
+ /**
+ * Write a string representation of [`ICU4XLocale`] script to `write`
+ *
+ * See the [Rust documentation for `id`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> script_to_writeable(W& write) const;
+
+ /**
+ * Write a string representation of [`ICU4XLocale`] script to `write`
+ *
+ * See the [Rust documentation for `id`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> script() const;
+
+ /**
+ * Set the script part of the [`ICU4XLocale`]. Pass an empty string to remove the script.
+ *
+ * See the [Rust documentation for `try_from_bytes`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes) for more information.
+ */
+ diplomat::result<std::monostate, ICU4XError> set_script(const std::string_view bytes);
+
+ /**
+ * Best effort locale canonicalizer that doesn't need any data
+ *
+ * Use ICU4XLocaleCanonicalizer for better control and functionality
+ *
+ * See the [Rust documentation for `canonicalize`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.canonicalize) for more information.
+ */
+ template<typename W> static diplomat::result<std::monostate, ICU4XError> canonicalize_to_writeable(const std::string_view bytes, W& write);
+
+ /**
+ * Best effort locale canonicalizer that doesn't need any data
+ *
+ * Use ICU4XLocaleCanonicalizer for better control and functionality
+ *
+ * See the [Rust documentation for `canonicalize`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.canonicalize) for more information.
+ */
+ static diplomat::result<std::string, ICU4XError> canonicalize(const std::string_view bytes);
+
+ /**
+ * Write a string representation of [`ICU4XLocale`] to `write`
+ *
+ * See the [Rust documentation for `write_to`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.write_to) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> to_string_to_writeable(W& write) const;
+
+ /**
+ * Write a string representation of [`ICU4XLocale`] to `write`
+ *
+ * See the [Rust documentation for `write_to`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.write_to) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> to_string() const;
+
+ /**
+ * See the [Rust documentation for `normalizing_eq`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.normalizing_eq) for more information.
+ */
+ bool normalizing_eq(const std::string_view other) const;
+
+ /**
+ * See the [Rust documentation for `strict_cmp`](https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.strict_cmp) for more information.
+ */
+ ICU4XOrdering strict_cmp(const std::string_view other) const;
+
+ /**
+ * Deprecated
+ *
+ * Use `create_from_string("en").
+ */
+ static ICU4XLocale create_en();
+
+ /**
+ * Deprecated
+ *
+ * Use `create_from_string("bn").
+ */
+ static ICU4XLocale create_bn();
+ inline const capi::ICU4XLocale* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XLocale* AsFFIMut() { return this->inner.get(); }
+ inline explicit ICU4XLocale(capi::ICU4XLocale* i) : inner(i) {}
+ ICU4XLocale() = default;
+ ICU4XLocale(ICU4XLocale&&) noexcept = default;
+ ICU4XLocale& operator=(ICU4XLocale&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XLocale, ICU4XLocaleDeleter> inner;
+};
+
+
+inline diplomat::result<ICU4XLocale, ICU4XError> ICU4XLocale::create_from_string(const std::string_view name) {
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_create_from_string(name.data(), name.size());
+ diplomat::result<ICU4XLocale, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLocale>(ICU4XLocale(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XLocale ICU4XLocale::create_und() {
+ return ICU4XLocale(capi::ICU4XLocale_create_und());
+}
+inline ICU4XLocale ICU4XLocale::clone() const {
+ return ICU4XLocale(capi::ICU4XLocale_clone(this->inner.get()));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XLocale::basename_to_writeable(W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_basename(this->inner.get(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XLocale::basename() const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_basename(this->inner.get(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XLocale::get_unicode_extension_to_writeable(const std::string_view bytes, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_get_unicode_extension(this->inner.get(), bytes.data(), bytes.size(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XLocale::get_unicode_extension(const std::string_view bytes) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_get_unicode_extension(this->inner.get(), bytes.data(), bytes.size(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XLocale::language_to_writeable(W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_language(this->inner.get(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XLocale::language() const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_language(this->inner.get(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XLocale::set_language(const std::string_view bytes) {
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_set_language(this->inner.get(), bytes.data(), bytes.size());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XLocale::region_to_writeable(W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_region(this->inner.get(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XLocale::region() const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_region(this->inner.get(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XLocale::set_region(const std::string_view bytes) {
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_set_region(this->inner.get(), bytes.data(), bytes.size());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XLocale::script_to_writeable(W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_script(this->inner.get(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XLocale::script() const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_script(this->inner.get(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XLocale::set_script(const std::string_view bytes) {
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_set_script(this->inner.get(), bytes.data(), bytes.size());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XLocale::canonicalize_to_writeable(const std::string_view bytes, W& write) {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_canonicalize(bytes.data(), bytes.size(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XLocale::canonicalize(const std::string_view bytes) {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_canonicalize(bytes.data(), bytes.size(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XLocale::to_string_to_writeable(W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_to_string(this->inner.get(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XLocale::to_string() const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocale_to_string(this->inner.get(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+inline bool ICU4XLocale::normalizing_eq(const std::string_view other) const {
+ return capi::ICU4XLocale_normalizing_eq(this->inner.get(), other.data(), other.size());
+}
+inline ICU4XOrdering ICU4XLocale::strict_cmp(const std::string_view other) const {
+ return static_cast<ICU4XOrdering>(capi::ICU4XLocale_strict_cmp(this->inner.get(), other.data(), other.size()));
+}
+inline ICU4XLocale ICU4XLocale::create_en() {
+ return ICU4XLocale(capi::ICU4XLocale_create_en());
+}
+inline ICU4XLocale ICU4XLocale::create_bn() {
+ return ICU4XLocale(capi::ICU4XLocale_create_bn());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleCanonicalizer.h b/intl/icu_capi/cpp/include/ICU4XLocaleCanonicalizer.h
new file mode 100644
index 0000000000..8b48ad8bb6
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleCanonicalizer.h
@@ -0,0 +1,37 @@
+#ifndef ICU4XLocaleCanonicalizer_H
+#define ICU4XLocaleCanonicalizer_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleCanonicalizer ICU4XLocaleCanonicalizer;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError.h"
+#include "ICU4XLocale.h"
+#include "ICU4XTransformResult.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError ICU4XLocaleCanonicalizer_create(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError ICU4XLocaleCanonicalizer_create_extended(const ICU4XDataProvider* provider);
+
+ICU4XTransformResult ICU4XLocaleCanonicalizer_canonicalize(const ICU4XLocaleCanonicalizer* self, ICU4XLocale* locale);
+void ICU4XLocaleCanonicalizer_destroy(ICU4XLocaleCanonicalizer* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleCanonicalizer.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleCanonicalizer.hpp
new file mode 100644
index 0000000000..76116cbf50
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleCanonicalizer.hpp
@@ -0,0 +1,93 @@
+#ifndef ICU4XLocaleCanonicalizer_HPP
+#define ICU4XLocaleCanonicalizer_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLocaleCanonicalizer.h"
+
+class ICU4XDataProvider;
+class ICU4XLocaleCanonicalizer;
+#include "ICU4XError.hpp"
+class ICU4XLocale;
+#include "ICU4XTransformResult.hpp"
+
+/**
+ * A destruction policy for using ICU4XLocaleCanonicalizer with std::unique_ptr.
+ */
+struct ICU4XLocaleCanonicalizerDeleter {
+ void operator()(capi::ICU4XLocaleCanonicalizer* l) const noexcept {
+ capi::ICU4XLocaleCanonicalizer_destroy(l);
+ }
+};
+
+/**
+ * A locale canonicalizer.
+ *
+ * See the [Rust documentation for `LocaleCanonicalizer`](https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html) for more information.
+ */
+class ICU4XLocaleCanonicalizer {
+ public:
+
+ /**
+ * Create a new [`ICU4XLocaleCanonicalizer`].
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XLocaleCanonicalizer, ICU4XError> create(const ICU4XDataProvider& provider);
+
+ /**
+ * Create a new [`ICU4XLocaleCanonicalizer`] with extended data.
+ *
+ * See the [Rust documentation for `new_with_expander`](https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.new_with_expander) for more information.
+ */
+ static diplomat::result<ICU4XLocaleCanonicalizer, ICU4XError> create_extended(const ICU4XDataProvider& provider);
+
+ /**
+ * FFI version of `LocaleCanonicalizer::canonicalize()`.
+ *
+ * See the [Rust documentation for `canonicalize`](https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.canonicalize) for more information.
+ */
+ ICU4XTransformResult canonicalize(ICU4XLocale& locale) const;
+ inline const capi::ICU4XLocaleCanonicalizer* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XLocaleCanonicalizer* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XLocaleCanonicalizer(capi::ICU4XLocaleCanonicalizer* i) : inner(i) {}
+ ICU4XLocaleCanonicalizer() = default;
+ ICU4XLocaleCanonicalizer(ICU4XLocaleCanonicalizer&&) noexcept = default;
+ ICU4XLocaleCanonicalizer& operator=(ICU4XLocaleCanonicalizer&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XLocaleCanonicalizer, ICU4XLocaleCanonicalizerDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+
+inline diplomat::result<ICU4XLocaleCanonicalizer, ICU4XError> ICU4XLocaleCanonicalizer::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XLocaleCanonicalizer_create(provider.AsFFI());
+ diplomat::result<ICU4XLocaleCanonicalizer, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLocaleCanonicalizer>(ICU4XLocaleCanonicalizer(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XLocaleCanonicalizer, ICU4XError> ICU4XLocaleCanonicalizer::create_extended(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XLocaleCanonicalizer_create_extended(provider.AsFFI());
+ diplomat::result<ICU4XLocaleCanonicalizer, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLocaleCanonicalizer>(ICU4XLocaleCanonicalizer(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XTransformResult ICU4XLocaleCanonicalizer::canonicalize(ICU4XLocale& locale) const {
+ return static_cast<ICU4XTransformResult>(capi::ICU4XLocaleCanonicalizer_canonicalize(this->inner.get(), locale.AsFFIMut()));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleDirection.h b/intl/icu_capi/cpp/include/ICU4XLocaleDirection.h
new file mode 100644
index 0000000000..688f04c98c
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleDirection.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XLocaleDirection_H
+#define ICU4XLocaleDirection_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XLocaleDirection {
+ ICU4XLocaleDirection_LeftToRight = 0,
+ ICU4XLocaleDirection_RightToLeft = 1,
+ ICU4XLocaleDirection_Unknown = 2,
+} ICU4XLocaleDirection;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLocaleDirection_destroy(ICU4XLocaleDirection* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleDirection.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleDirection.hpp
new file mode 100644
index 0000000000..25c04e5ff8
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleDirection.hpp
@@ -0,0 +1,25 @@
+#ifndef ICU4XLocaleDirection_HPP
+#define ICU4XLocaleDirection_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLocaleDirection.h"
+
+
+
+/**
+ * See the [Rust documentation for `Direction`](https://docs.rs/icu/latest/icu/locid_transform/enum.Direction.html) for more information.
+ */
+enum struct ICU4XLocaleDirection {
+ LeftToRight = 0,
+ RightToLeft = 1,
+ Unknown = 2,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleDirectionality.h b/intl/icu_capi/cpp/include/ICU4XLocaleDirectionality.h
new file mode 100644
index 0000000000..9271b078c7
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleDirectionality.h
@@ -0,0 +1,42 @@
+#ifndef ICU4XLocaleDirectionality_H
+#define ICU4XLocaleDirectionality_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleDirectionality ICU4XLocaleDirectionality;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.h"
+#include "ICU4XLocaleExpander.h"
+#include "ICU4XLocale.h"
+#include "ICU4XLocaleDirection.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError ICU4XLocaleDirectionality_create(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError ICU4XLocaleDirectionality_create_with_expander(const ICU4XDataProvider* provider, const ICU4XLocaleExpander* expander);
+
+ICU4XLocaleDirection ICU4XLocaleDirectionality_get(const ICU4XLocaleDirectionality* self, const ICU4XLocale* locale);
+
+bool ICU4XLocaleDirectionality_is_left_to_right(const ICU4XLocaleDirectionality* self, const ICU4XLocale* locale);
+
+bool ICU4XLocaleDirectionality_is_right_to_left(const ICU4XLocaleDirectionality* self, const ICU4XLocale* locale);
+void ICU4XLocaleDirectionality_destroy(ICU4XLocaleDirectionality* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleDirectionality.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleDirectionality.hpp
new file mode 100644
index 0000000000..5bc295d172
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleDirectionality.hpp
@@ -0,0 +1,107 @@
+#ifndef ICU4XLocaleDirectionality_HPP
+#define ICU4XLocaleDirectionality_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLocaleDirectionality.h"
+
+class ICU4XDataProvider;
+class ICU4XLocaleDirectionality;
+#include "ICU4XError.hpp"
+class ICU4XLocaleExpander;
+class ICU4XLocale;
+#include "ICU4XLocaleDirection.hpp"
+
+/**
+ * A destruction policy for using ICU4XLocaleDirectionality with std::unique_ptr.
+ */
+struct ICU4XLocaleDirectionalityDeleter {
+ void operator()(capi::ICU4XLocaleDirectionality* l) const noexcept {
+ capi::ICU4XLocaleDirectionality_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `LocaleDirectionality`](https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html) for more information.
+ */
+class ICU4XLocaleDirectionality {
+ public:
+
+ /**
+ * Construct a new ICU4XLocaleDirectionality instance
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XLocaleDirectionality, ICU4XError> create(const ICU4XDataProvider& provider);
+
+ /**
+ * Construct a new ICU4XLocaleDirectionality instance with a custom expander
+ *
+ * See the [Rust documentation for `new_with_expander`](https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.new_with_expander) for more information.
+ */
+ static diplomat::result<ICU4XLocaleDirectionality, ICU4XError> create_with_expander(const ICU4XDataProvider& provider, const ICU4XLocaleExpander& expander);
+
+ /**
+ * See the [Rust documentation for `get`](https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.get) for more information.
+ */
+ ICU4XLocaleDirection get(const ICU4XLocale& locale) const;
+
+ /**
+ * See the [Rust documentation for `is_left_to_right`](https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.is_left_to_right) for more information.
+ */
+ bool is_left_to_right(const ICU4XLocale& locale) const;
+
+ /**
+ * See the [Rust documentation for `is_right_to_left`](https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.is_right_to_left) for more information.
+ */
+ bool is_right_to_left(const ICU4XLocale& locale) const;
+ inline const capi::ICU4XLocaleDirectionality* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XLocaleDirectionality* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XLocaleDirectionality(capi::ICU4XLocaleDirectionality* i) : inner(i) {}
+ ICU4XLocaleDirectionality() = default;
+ ICU4XLocaleDirectionality(ICU4XLocaleDirectionality&&) noexcept = default;
+ ICU4XLocaleDirectionality& operator=(ICU4XLocaleDirectionality&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XLocaleDirectionality, ICU4XLocaleDirectionalityDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocaleExpander.hpp"
+#include "ICU4XLocale.hpp"
+
+inline diplomat::result<ICU4XLocaleDirectionality, ICU4XError> ICU4XLocaleDirectionality::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XLocaleDirectionality_create(provider.AsFFI());
+ diplomat::result<ICU4XLocaleDirectionality, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLocaleDirectionality>(ICU4XLocaleDirectionality(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XLocaleDirectionality, ICU4XError> ICU4XLocaleDirectionality::create_with_expander(const ICU4XDataProvider& provider, const ICU4XLocaleExpander& expander) {
+ auto diplomat_result_raw_out_value = capi::ICU4XLocaleDirectionality_create_with_expander(provider.AsFFI(), expander.AsFFI());
+ diplomat::result<ICU4XLocaleDirectionality, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLocaleDirectionality>(ICU4XLocaleDirectionality(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XLocaleDirection ICU4XLocaleDirectionality::get(const ICU4XLocale& locale) const {
+ return static_cast<ICU4XLocaleDirection>(capi::ICU4XLocaleDirectionality_get(this->inner.get(), locale.AsFFI()));
+}
+inline bool ICU4XLocaleDirectionality::is_left_to_right(const ICU4XLocale& locale) const {
+ return capi::ICU4XLocaleDirectionality_is_left_to_right(this->inner.get(), locale.AsFFI());
+}
+inline bool ICU4XLocaleDirectionality::is_right_to_left(const ICU4XLocale& locale) const {
+ return capi::ICU4XLocaleDirectionality_is_right_to_left(this->inner.get(), locale.AsFFI());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleDisplayNamesFormatter.h b/intl/icu_capi/cpp/include/ICU4XLocaleDisplayNamesFormatter.h
new file mode 100644
index 0000000000..bfed8ec411
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleDisplayNamesFormatter.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XLocaleDisplayNamesFormatter_H
+#define ICU4XLocaleDisplayNamesFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleDisplayNamesFormatter ICU4XLocaleDisplayNamesFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XDisplayNamesOptionsV1.h"
+#include "diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError ICU4XLocaleDisplayNamesFormatter_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDisplayNamesOptionsV1 options);
+
+diplomat_result_void_ICU4XError ICU4XLocaleDisplayNamesFormatter_of(const ICU4XLocaleDisplayNamesFormatter* self, const ICU4XLocale* locale, DiplomatWriteable* write);
+void ICU4XLocaleDisplayNamesFormatter_destroy(ICU4XLocaleDisplayNamesFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleDisplayNamesFormatter.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleDisplayNamesFormatter.hpp
new file mode 100644
index 0000000000..06eac9a3ab
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleDisplayNamesFormatter.hpp
@@ -0,0 +1,103 @@
+#ifndef ICU4XLocaleDisplayNamesFormatter_HPP
+#define ICU4XLocaleDisplayNamesFormatter_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLocaleDisplayNamesFormatter.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+struct ICU4XDisplayNamesOptionsV1;
+class ICU4XLocaleDisplayNamesFormatter;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XLocaleDisplayNamesFormatter with std::unique_ptr.
+ */
+struct ICU4XLocaleDisplayNamesFormatterDeleter {
+ void operator()(capi::ICU4XLocaleDisplayNamesFormatter* l) const noexcept {
+ capi::ICU4XLocaleDisplayNamesFormatter_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `LocaleDisplayNamesFormatter`](https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html) for more information.
+ */
+class ICU4XLocaleDisplayNamesFormatter {
+ public:
+
+ /**
+ * Creates a new `LocaleDisplayNamesFormatter` from locale data and an options bag.
+ *
+ * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.try_new) for more information.
+ */
+ static diplomat::result<ICU4XLocaleDisplayNamesFormatter, ICU4XError> create(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDisplayNamesOptionsV1 options);
+
+ /**
+ * Returns the locale-specific display name of a locale.
+ *
+ * See the [Rust documentation for `of`](https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.of) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> of_to_writeable(const ICU4XLocale& locale, W& write) const;
+
+ /**
+ * Returns the locale-specific display name of a locale.
+ *
+ * See the [Rust documentation for `of`](https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.of) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> of(const ICU4XLocale& locale) const;
+ inline const capi::ICU4XLocaleDisplayNamesFormatter* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XLocaleDisplayNamesFormatter* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XLocaleDisplayNamesFormatter(capi::ICU4XLocaleDisplayNamesFormatter* i) : inner(i) {}
+ ICU4XLocaleDisplayNamesFormatter() = default;
+ ICU4XLocaleDisplayNamesFormatter(ICU4XLocaleDisplayNamesFormatter&&) noexcept = default;
+ ICU4XLocaleDisplayNamesFormatter& operator=(ICU4XLocaleDisplayNamesFormatter&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XLocaleDisplayNamesFormatter, ICU4XLocaleDisplayNamesFormatterDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+#include "ICU4XDisplayNamesOptionsV1.hpp"
+
+inline diplomat::result<ICU4XLocaleDisplayNamesFormatter, ICU4XError> ICU4XLocaleDisplayNamesFormatter::create(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDisplayNamesOptionsV1 options) {
+ ICU4XDisplayNamesOptionsV1 diplomat_wrapped_struct_options = options;
+ auto diplomat_result_raw_out_value = capi::ICU4XLocaleDisplayNamesFormatter_create(provider.AsFFI(), locale.AsFFI(), capi::ICU4XDisplayNamesOptionsV1{ .style = static_cast<capi::ICU4XDisplayNamesStyle>(diplomat_wrapped_struct_options.style), .fallback = static_cast<capi::ICU4XDisplayNamesFallback>(diplomat_wrapped_struct_options.fallback), .language_display = static_cast<capi::ICU4XLanguageDisplay>(diplomat_wrapped_struct_options.language_display) });
+ diplomat::result<ICU4XLocaleDisplayNamesFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLocaleDisplayNamesFormatter>(ICU4XLocaleDisplayNamesFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XLocaleDisplayNamesFormatter::of_to_writeable(const ICU4XLocale& locale, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocaleDisplayNamesFormatter_of(this->inner.get(), locale.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XLocaleDisplayNamesFormatter::of(const ICU4XLocale& locale) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XLocaleDisplayNamesFormatter_of(this->inner.get(), locale.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleExpander.h b/intl/icu_capi/cpp/include/ICU4XLocaleExpander.h
new file mode 100644
index 0000000000..a7de7be16b
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleExpander.h
@@ -0,0 +1,39 @@
+#ifndef ICU4XLocaleExpander_H
+#define ICU4XLocaleExpander_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleExpander ICU4XLocaleExpander;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XLocaleExpander_ICU4XError.h"
+#include "ICU4XLocale.h"
+#include "ICU4XTransformResult.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XLocaleExpander_ICU4XError ICU4XLocaleExpander_create(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XLocaleExpander_ICU4XError ICU4XLocaleExpander_create_extended(const ICU4XDataProvider* provider);
+
+ICU4XTransformResult ICU4XLocaleExpander_maximize(const ICU4XLocaleExpander* self, ICU4XLocale* locale);
+
+ICU4XTransformResult ICU4XLocaleExpander_minimize(const ICU4XLocaleExpander* self, ICU4XLocale* locale);
+void ICU4XLocaleExpander_destroy(ICU4XLocaleExpander* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleExpander.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleExpander.hpp
new file mode 100644
index 0000000000..d63cf92b82
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleExpander.hpp
@@ -0,0 +1,103 @@
+#ifndef ICU4XLocaleExpander_HPP
+#define ICU4XLocaleExpander_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLocaleExpander.h"
+
+class ICU4XDataProvider;
+class ICU4XLocaleExpander;
+#include "ICU4XError.hpp"
+class ICU4XLocale;
+#include "ICU4XTransformResult.hpp"
+
+/**
+ * A destruction policy for using ICU4XLocaleExpander with std::unique_ptr.
+ */
+struct ICU4XLocaleExpanderDeleter {
+ void operator()(capi::ICU4XLocaleExpander* l) const noexcept {
+ capi::ICU4XLocaleExpander_destroy(l);
+ }
+};
+
+/**
+ * A locale expander.
+ *
+ * See the [Rust documentation for `LocaleExpander`](https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html) for more information.
+ */
+class ICU4XLocaleExpander {
+ public:
+
+ /**
+ * Create a new [`ICU4XLocaleExpander`].
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XLocaleExpander, ICU4XError> create(const ICU4XDataProvider& provider);
+
+ /**
+ * Create a new [`ICU4XLocaleExpander`] with extended data.
+ *
+ * See the [Rust documentation for `new_extended`](https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.new_extended) for more information.
+ */
+ static diplomat::result<ICU4XLocaleExpander, ICU4XError> create_extended(const ICU4XDataProvider& provider);
+
+ /**
+ * FFI version of `LocaleExpander::maximize()`.
+ *
+ * See the [Rust documentation for `maximize`](https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.maximize) for more information.
+ */
+ ICU4XTransformResult maximize(ICU4XLocale& locale) const;
+
+ /**
+ * FFI version of `LocaleExpander::minimize()`.
+ *
+ * See the [Rust documentation for `minimize`](https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.minimize) for more information.
+ */
+ ICU4XTransformResult minimize(ICU4XLocale& locale) const;
+ inline const capi::ICU4XLocaleExpander* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XLocaleExpander* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XLocaleExpander(capi::ICU4XLocaleExpander* i) : inner(i) {}
+ ICU4XLocaleExpander() = default;
+ ICU4XLocaleExpander(ICU4XLocaleExpander&&) noexcept = default;
+ ICU4XLocaleExpander& operator=(ICU4XLocaleExpander&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XLocaleExpander, ICU4XLocaleExpanderDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+
+inline diplomat::result<ICU4XLocaleExpander, ICU4XError> ICU4XLocaleExpander::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XLocaleExpander_create(provider.AsFFI());
+ diplomat::result<ICU4XLocaleExpander, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLocaleExpander>(ICU4XLocaleExpander(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XLocaleExpander, ICU4XError> ICU4XLocaleExpander::create_extended(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XLocaleExpander_create_extended(provider.AsFFI());
+ diplomat::result<ICU4XLocaleExpander, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLocaleExpander>(ICU4XLocaleExpander(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XTransformResult ICU4XLocaleExpander::maximize(ICU4XLocale& locale) const {
+ return static_cast<ICU4XTransformResult>(capi::ICU4XLocaleExpander_maximize(this->inner.get(), locale.AsFFIMut()));
+}
+inline ICU4XTransformResult ICU4XLocaleExpander::minimize(ICU4XLocale& locale) const {
+ return static_cast<ICU4XTransformResult>(capi::ICU4XLocaleExpander_minimize(this->inner.get(), locale.AsFFIMut()));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackConfig.h b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackConfig.h
new file mode 100644
index 0000000000..b40d115418
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackConfig.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XLocaleFallbackConfig_H
+#define ICU4XLocaleFallbackConfig_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XLocaleFallbackPriority.h"
+#include "ICU4XLocaleFallbackSupplement.h"
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleFallbackConfig {
+ ICU4XLocaleFallbackPriority priority;
+ DiplomatStringView extension_key;
+ ICU4XLocaleFallbackSupplement fallback_supplement;
+} ICU4XLocaleFallbackConfig;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XLocaleFallbackPriority.h"
+#include "ICU4XLocaleFallbackSupplement.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLocaleFallbackConfig_destroy(ICU4XLocaleFallbackConfig* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackConfig.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackConfig.hpp
new file mode 100644
index 0000000000..8c177d718a
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackConfig.hpp
@@ -0,0 +1,43 @@
+#ifndef ICU4XLocaleFallbackConfig_HPP
+#define ICU4XLocaleFallbackConfig_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLocaleFallbackConfig.h"
+
+#include "ICU4XLocaleFallbackPriority.hpp"
+#include "ICU4XLocaleFallbackSupplement.hpp"
+
+
+/**
+ * Collection of configurations for the ICU4X fallback algorithm.
+ *
+ * See the [Rust documentation for `LocaleFallbackConfig`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackConfig.html) for more information.
+ */
+struct ICU4XLocaleFallbackConfig {
+ public:
+
+ /**
+ * Choice of priority mode.
+ */
+ ICU4XLocaleFallbackPriority priority;
+
+ /**
+ * An empty string is considered `None`.
+ */
+ std::string_view extension_key;
+
+ /**
+ * Fallback supplement data key to customize fallback rules.
+ */
+ ICU4XLocaleFallbackSupplement fallback_supplement;
+};
+
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.h b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.h
new file mode 100644
index 0000000000..e2dd7a1a3b
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XLocaleFallbackIterator_H
+#define ICU4XLocaleFallbackIterator_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleFallbackIterator ICU4XLocaleFallbackIterator;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XLocale.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+ICU4XLocale* ICU4XLocaleFallbackIterator_get(const ICU4XLocaleFallbackIterator* self);
+
+void ICU4XLocaleFallbackIterator_step(ICU4XLocaleFallbackIterator* self);
+void ICU4XLocaleFallbackIterator_destroy(ICU4XLocaleFallbackIterator* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp
new file mode 100644
index 0000000000..93c47eb01e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp
@@ -0,0 +1,64 @@
+#ifndef ICU4XLocaleFallbackIterator_HPP
+#define ICU4XLocaleFallbackIterator_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLocaleFallbackIterator.h"
+
+class ICU4XLocale;
+
+/**
+ * A destruction policy for using ICU4XLocaleFallbackIterator with std::unique_ptr.
+ */
+struct ICU4XLocaleFallbackIteratorDeleter {
+ void operator()(capi::ICU4XLocaleFallbackIterator* l) const noexcept {
+ capi::ICU4XLocaleFallbackIterator_destroy(l);
+ }
+};
+
+/**
+ * An iterator over the locale under fallback.
+ *
+ * See the [Rust documentation for `LocaleFallbackIterator`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html) for more information.
+ */
+class ICU4XLocaleFallbackIterator {
+ public:
+
+ /**
+ * Gets a snapshot of the current state of the locale.
+ *
+ * See the [Rust documentation for `get`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html#method.get) for more information.
+ */
+ ICU4XLocale get() const;
+
+ /**
+ * Performs one step of the fallback algorithm, mutating the locale.
+ *
+ * See the [Rust documentation for `step`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html#method.step) for more information.
+ */
+ void step();
+ inline const capi::ICU4XLocaleFallbackIterator* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XLocaleFallbackIterator* AsFFIMut() { return this->inner.get(); }
+ inline explicit ICU4XLocaleFallbackIterator(capi::ICU4XLocaleFallbackIterator* i) : inner(i) {}
+ ICU4XLocaleFallbackIterator() = default;
+ ICU4XLocaleFallbackIterator(ICU4XLocaleFallbackIterator&&) noexcept = default;
+ ICU4XLocaleFallbackIterator& operator=(ICU4XLocaleFallbackIterator&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XLocaleFallbackIterator, ICU4XLocaleFallbackIteratorDeleter> inner;
+};
+
+#include "ICU4XLocale.hpp"
+
+inline ICU4XLocale ICU4XLocaleFallbackIterator::get() const {
+ return ICU4XLocale(capi::ICU4XLocaleFallbackIterator_get(this->inner.get()));
+}
+inline void ICU4XLocaleFallbackIterator::step() {
+ capi::ICU4XLocaleFallbackIterator_step(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackPriority.h b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackPriority.h
new file mode 100644
index 0000000000..e4ab748065
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackPriority.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XLocaleFallbackPriority_H
+#define ICU4XLocaleFallbackPriority_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XLocaleFallbackPriority {
+ ICU4XLocaleFallbackPriority_Language = 0,
+ ICU4XLocaleFallbackPriority_Region = 1,
+ ICU4XLocaleFallbackPriority_Collation = 2,
+} ICU4XLocaleFallbackPriority;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLocaleFallbackPriority_destroy(ICU4XLocaleFallbackPriority* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackPriority.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackPriority.hpp
new file mode 100644
index 0000000000..19d52ae7a3
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackPriority.hpp
@@ -0,0 +1,27 @@
+#ifndef ICU4XLocaleFallbackPriority_HPP
+#define ICU4XLocaleFallbackPriority_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLocaleFallbackPriority.h"
+
+
+
+/**
+ * Priority mode for the ICU4X fallback algorithm.
+ *
+ * See the [Rust documentation for `LocaleFallbackPriority`](https://docs.rs/icu/latest/icu/locid_transform/fallback/enum.LocaleFallbackPriority.html) for more information.
+ */
+enum struct ICU4XLocaleFallbackPriority {
+ Language = 0,
+ Region = 1,
+ Collation = 2,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackSupplement.h b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackSupplement.h
new file mode 100644
index 0000000000..952483c724
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackSupplement.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XLocaleFallbackSupplement_H
+#define ICU4XLocaleFallbackSupplement_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XLocaleFallbackSupplement {
+ ICU4XLocaleFallbackSupplement_None = 0,
+ ICU4XLocaleFallbackSupplement_Collation = 1,
+} ICU4XLocaleFallbackSupplement;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XLocaleFallbackSupplement_destroy(ICU4XLocaleFallbackSupplement* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackSupplement.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackSupplement.hpp
new file mode 100644
index 0000000000..a357bb4929
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackSupplement.hpp
@@ -0,0 +1,26 @@
+#ifndef ICU4XLocaleFallbackSupplement_HPP
+#define ICU4XLocaleFallbackSupplement_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLocaleFallbackSupplement.h"
+
+
+
+/**
+ * What additional data is required to load when performing fallback.
+ *
+ * See the [Rust documentation for `LocaleFallbackSupplement`](https://docs.rs/icu/latest/icu/locid_transform/fallback/enum.LocaleFallbackSupplement.html) for more information.
+ */
+enum struct ICU4XLocaleFallbackSupplement {
+ None = 0,
+ Collation = 1,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.h b/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.h
new file mode 100644
index 0000000000..24efb0602f
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.h
@@ -0,0 +1,37 @@
+#ifndef ICU4XLocaleFallbacker_H
+#define ICU4XLocaleFallbacker_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleFallbacker ICU4XLocaleFallbacker;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.h"
+#include "ICU4XLocaleFallbackConfig.h"
+#include "diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError ICU4XLocaleFallbacker_create(const ICU4XDataProvider* provider);
+
+ICU4XLocaleFallbacker* ICU4XLocaleFallbacker_create_without_data();
+
+diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError ICU4XLocaleFallbacker_for_config(const ICU4XLocaleFallbacker* self, ICU4XLocaleFallbackConfig config);
+void ICU4XLocaleFallbacker_destroy(ICU4XLocaleFallbacker* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp
new file mode 100644
index 0000000000..707ddce386
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp
@@ -0,0 +1,97 @@
+#ifndef ICU4XLocaleFallbacker_HPP
+#define ICU4XLocaleFallbacker_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLocaleFallbacker.h"
+
+class ICU4XDataProvider;
+class ICU4XLocaleFallbacker;
+#include "ICU4XError.hpp"
+struct ICU4XLocaleFallbackConfig;
+class ICU4XLocaleFallbackerWithConfig;
+
+/**
+ * A destruction policy for using ICU4XLocaleFallbacker with std::unique_ptr.
+ */
+struct ICU4XLocaleFallbackerDeleter {
+ void operator()(capi::ICU4XLocaleFallbacker* l) const noexcept {
+ capi::ICU4XLocaleFallbacker_destroy(l);
+ }
+};
+
+/**
+ * An object that runs the ICU4X locale fallback algorithm.
+ *
+ * See the [Rust documentation for `LocaleFallbacker`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html) for more information.
+ */
+class ICU4XLocaleFallbacker {
+ public:
+
+ /**
+ * Creates a new `ICU4XLocaleFallbacker` from a data provider.
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XLocaleFallbacker, ICU4XError> create(const ICU4XDataProvider& provider);
+
+ /**
+ * Creates a new `ICU4XLocaleFallbacker` without data for limited functionality.
+ *
+ * See the [Rust documentation for `new_without_data`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.new_without_data) for more information.
+ */
+ static ICU4XLocaleFallbacker create_without_data();
+
+ /**
+ * Associates this `ICU4XLocaleFallbacker` with configuration options.
+ *
+ * See the [Rust documentation for `for_config`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.for_config) for more information.
+ *
+ * Lifetimes: `this` must live at least as long as the output.
+ */
+ diplomat::result<ICU4XLocaleFallbackerWithConfig, ICU4XError> for_config(ICU4XLocaleFallbackConfig config) const;
+ inline const capi::ICU4XLocaleFallbacker* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XLocaleFallbacker* AsFFIMut() { return this->inner.get(); }
+ inline explicit ICU4XLocaleFallbacker(capi::ICU4XLocaleFallbacker* i) : inner(i) {}
+ ICU4XLocaleFallbacker() = default;
+ ICU4XLocaleFallbacker(ICU4XLocaleFallbacker&&) noexcept = default;
+ ICU4XLocaleFallbacker& operator=(ICU4XLocaleFallbacker&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XLocaleFallbacker, ICU4XLocaleFallbackerDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocaleFallbackConfig.hpp"
+#include "ICU4XLocaleFallbackerWithConfig.hpp"
+
+inline diplomat::result<ICU4XLocaleFallbacker, ICU4XError> ICU4XLocaleFallbacker::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XLocaleFallbacker_create(provider.AsFFI());
+ diplomat::result<ICU4XLocaleFallbacker, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLocaleFallbacker>(ICU4XLocaleFallbacker(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XLocaleFallbacker ICU4XLocaleFallbacker::create_without_data() {
+ return ICU4XLocaleFallbacker(capi::ICU4XLocaleFallbacker_create_without_data());
+}
+inline diplomat::result<ICU4XLocaleFallbackerWithConfig, ICU4XError> ICU4XLocaleFallbacker::for_config(ICU4XLocaleFallbackConfig config) const {
+ ICU4XLocaleFallbackConfig diplomat_wrapped_struct_config = config;
+ auto diplomat_result_raw_out_value = capi::ICU4XLocaleFallbacker_for_config(this->inner.get(), capi::ICU4XLocaleFallbackConfig{ .priority = static_cast<capi::ICU4XLocaleFallbackPriority>(diplomat_wrapped_struct_config.priority), .extension_key = { diplomat_wrapped_struct_config.extension_key.data(), diplomat_wrapped_struct_config.extension_key.size() }, .fallback_supplement = static_cast<capi::ICU4XLocaleFallbackSupplement>(diplomat_wrapped_struct_config.fallback_supplement) });
+ diplomat::result<ICU4XLocaleFallbackerWithConfig, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XLocaleFallbackerWithConfig>(ICU4XLocaleFallbackerWithConfig(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.h b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.h
new file mode 100644
index 0000000000..e8baa9563e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XLocaleFallbackerWithConfig_H
+#define ICU4XLocaleFallbackerWithConfig_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLocaleFallbackerWithConfig ICU4XLocaleFallbackerWithConfig;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XLocale.h"
+#include "ICU4XLocaleFallbackIterator.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+ICU4XLocaleFallbackIterator* ICU4XLocaleFallbackerWithConfig_fallback_for_locale(const ICU4XLocaleFallbackerWithConfig* self, const ICU4XLocale* locale);
+void ICU4XLocaleFallbackerWithConfig_destroy(ICU4XLocaleFallbackerWithConfig* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp
new file mode 100644
index 0000000000..41f23cd0b0
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp
@@ -0,0 +1,60 @@
+#ifndef ICU4XLocaleFallbackerWithConfig_HPP
+#define ICU4XLocaleFallbackerWithConfig_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLocaleFallbackerWithConfig.h"
+
+class ICU4XLocale;
+class ICU4XLocaleFallbackIterator;
+
+/**
+ * A destruction policy for using ICU4XLocaleFallbackerWithConfig with std::unique_ptr.
+ */
+struct ICU4XLocaleFallbackerWithConfigDeleter {
+ void operator()(capi::ICU4XLocaleFallbackerWithConfig* l) const noexcept {
+ capi::ICU4XLocaleFallbackerWithConfig_destroy(l);
+ }
+};
+
+/**
+ * An object that runs the ICU4X locale fallback algorithm with specific configurations.
+ *
+ * See the [Rust documentation for `LocaleFallbacker`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html) for more information.
+ *
+ * See the [Rust documentation for `LocaleFallbackerWithConfig`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackerWithConfig.html) for more information.
+ */
+class ICU4XLocaleFallbackerWithConfig {
+ public:
+
+ /**
+ * Creates an iterator from a locale with each step of fallback.
+ *
+ * See the [Rust documentation for `fallback_for`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.fallback_for) for more information.
+ *
+ * Lifetimes: `this` must live at least as long as the output.
+ */
+ ICU4XLocaleFallbackIterator fallback_for_locale(const ICU4XLocale& locale) const;
+ inline const capi::ICU4XLocaleFallbackerWithConfig* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XLocaleFallbackerWithConfig* AsFFIMut() { return this->inner.get(); }
+ inline explicit ICU4XLocaleFallbackerWithConfig(capi::ICU4XLocaleFallbackerWithConfig* i) : inner(i) {}
+ ICU4XLocaleFallbackerWithConfig() = default;
+ ICU4XLocaleFallbackerWithConfig(ICU4XLocaleFallbackerWithConfig&&) noexcept = default;
+ ICU4XLocaleFallbackerWithConfig& operator=(ICU4XLocaleFallbackerWithConfig&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XLocaleFallbackerWithConfig, ICU4XLocaleFallbackerWithConfigDeleter> inner;
+};
+
+#include "ICU4XLocale.hpp"
+#include "ICU4XLocaleFallbackIterator.hpp"
+
+inline ICU4XLocaleFallbackIterator ICU4XLocaleFallbackerWithConfig::fallback_for_locale(const ICU4XLocale& locale) const {
+ return ICU4XLocaleFallbackIterator(capi::ICU4XLocaleFallbackerWithConfig_fallback_for_locale(this->inner.get(), locale.AsFFI()));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLogger.h b/intl/icu_capi/cpp/include/ICU4XLogger.h
new file mode 100644
index 0000000000..0aa1d0b1f9
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLogger.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XLogger_H
+#define ICU4XLogger_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XLogger ICU4XLogger;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+bool ICU4XLogger_init_simple_logger();
+
+bool ICU4XLogger_init_console_logger();
+void ICU4XLogger_destroy(ICU4XLogger* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XLogger.hpp b/intl/icu_capi/cpp/include/ICU4XLogger.hpp
new file mode 100644
index 0000000000..4a15424673
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XLogger.hpp
@@ -0,0 +1,60 @@
+#ifndef ICU4XLogger_HPP
+#define ICU4XLogger_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XLogger.h"
+
+
+/**
+ * A destruction policy for using ICU4XLogger with std::unique_ptr.
+ */
+struct ICU4XLoggerDeleter {
+ void operator()(capi::ICU4XLogger* l) const noexcept {
+ capi::ICU4XLogger_destroy(l);
+ }
+};
+
+/**
+ * An object allowing control over the logging used
+ */
+class ICU4XLogger {
+ public:
+
+ /**
+ * Initialize the logger using `simple_logger`
+ *
+ * Requires the `simple_logger` Cargo feature.
+ *
+ * Returns `false` if there was already a logger set.
+ */
+ static bool init_simple_logger();
+
+ /**
+ * Deprecated: since ICU4X 1.4, this now happens automatically if the `log` feature is enabled.
+ */
+ static bool init_console_logger();
+ inline const capi::ICU4XLogger* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XLogger* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XLogger(capi::ICU4XLogger* i) : inner(i) {}
+ ICU4XLogger() = default;
+ ICU4XLogger(ICU4XLogger&&) noexcept = default;
+ ICU4XLogger& operator=(ICU4XLogger&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XLogger, ICU4XLoggerDeleter> inner;
+};
+
+
+inline bool ICU4XLogger::init_simple_logger() {
+ return capi::ICU4XLogger_init_simple_logger();
+}
+inline bool ICU4XLogger::init_console_logger() {
+ return capi::ICU4XLogger_init_console_logger();
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XMetazoneCalculator.h b/intl/icu_capi/cpp/include/ICU4XMetazoneCalculator.h
new file mode 100644
index 0000000000..9c66754e90
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XMetazoneCalculator.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XMetazoneCalculator_H
+#define ICU4XMetazoneCalculator_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XMetazoneCalculator ICU4XMetazoneCalculator;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError ICU4XMetazoneCalculator_create(const ICU4XDataProvider* provider);
+void ICU4XMetazoneCalculator_destroy(ICU4XMetazoneCalculator* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XMetazoneCalculator.hpp b/intl/icu_capi/cpp/include/ICU4XMetazoneCalculator.hpp
new file mode 100644
index 0000000000..263219d07f
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XMetazoneCalculator.hpp
@@ -0,0 +1,65 @@
+#ifndef ICU4XMetazoneCalculator_HPP
+#define ICU4XMetazoneCalculator_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XMetazoneCalculator.h"
+
+class ICU4XDataProvider;
+class ICU4XMetazoneCalculator;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XMetazoneCalculator with std::unique_ptr.
+ */
+struct ICU4XMetazoneCalculatorDeleter {
+ void operator()(capi::ICU4XMetazoneCalculator* l) const noexcept {
+ capi::ICU4XMetazoneCalculator_destroy(l);
+ }
+};
+
+/**
+ * An object capable of computing the metazone from a timezone.
+ *
+ * This can be used via `maybe_calculate_metazone()` on [`ICU4XCustomTimeZone`].
+ *
+ * [`ICU4XCustomTimeZone`]: crate::timezone::ffi::ICU4XCustomTimeZone
+ *
+ * See the [Rust documentation for `MetazoneCalculator`](https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html) for more information.
+ */
+class ICU4XMetazoneCalculator {
+ public:
+
+ /**
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XMetazoneCalculator, ICU4XError> create(const ICU4XDataProvider& provider);
+ inline const capi::ICU4XMetazoneCalculator* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XMetazoneCalculator* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XMetazoneCalculator(capi::ICU4XMetazoneCalculator* i) : inner(i) {}
+ ICU4XMetazoneCalculator() = default;
+ ICU4XMetazoneCalculator(ICU4XMetazoneCalculator&&) noexcept = default;
+ ICU4XMetazoneCalculator& operator=(ICU4XMetazoneCalculator&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XMetazoneCalculator, ICU4XMetazoneCalculatorDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+
+inline diplomat::result<ICU4XMetazoneCalculator, ICU4XError> ICU4XMetazoneCalculator::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XMetazoneCalculator_create(provider.AsFFI());
+ diplomat::result<ICU4XMetazoneCalculator, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XMetazoneCalculator>(ICU4XMetazoneCalculator(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XOrdering.h b/intl/icu_capi/cpp/include/ICU4XOrdering.h
new file mode 100644
index 0000000000..2c1885f43e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XOrdering.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XOrdering_H
+#define ICU4XOrdering_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XOrdering {
+ ICU4XOrdering_Less = -1,
+ ICU4XOrdering_Equal = 0,
+ ICU4XOrdering_Greater = 1,
+} ICU4XOrdering;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XOrdering_destroy(ICU4XOrdering* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XOrdering.hpp b/intl/icu_capi/cpp/include/ICU4XOrdering.hpp
new file mode 100644
index 0000000000..77421325d0
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XOrdering.hpp
@@ -0,0 +1,25 @@
+#ifndef ICU4XOrdering_HPP
+#define ICU4XOrdering_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XOrdering.h"
+
+
+
+/**
+ * See the [Rust documentation for `Ordering`](https://docs.rs/core/latest/core/cmp/enum.Ordering.html) for more information.
+ */
+enum struct ICU4XOrdering {
+ Less = -1,
+ Equal = 0,
+ Greater = 1,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XPluralCategories.h b/intl/icu_capi/cpp/include/ICU4XPluralCategories.h
new file mode 100644
index 0000000000..931ea2daa7
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XPluralCategories.h
@@ -0,0 +1,35 @@
+#ifndef ICU4XPluralCategories_H
+#define ICU4XPluralCategories_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XPluralCategories {
+ bool zero;
+ bool one;
+ bool two;
+ bool few;
+ bool many;
+ bool other;
+} ICU4XPluralCategories;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XPluralCategories_destroy(ICU4XPluralCategories* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XPluralCategories.hpp b/intl/icu_capi/cpp/include/ICU4XPluralCategories.hpp
new file mode 100644
index 0000000000..c8b4a767a4
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XPluralCategories.hpp
@@ -0,0 +1,30 @@
+#ifndef ICU4XPluralCategories_HPP
+#define ICU4XPluralCategories_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XPluralCategories.h"
+
+
+
+/**
+ * FFI version of `PluralRules::categories()` data.
+ */
+struct ICU4XPluralCategories {
+ public:
+ bool zero;
+ bool one;
+ bool two;
+ bool few;
+ bool many;
+ bool other;
+};
+
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XPluralCategory.h b/intl/icu_capi/cpp/include/ICU4XPluralCategory.h
new file mode 100644
index 0000000000..543681c746
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XPluralCategory.h
@@ -0,0 +1,37 @@
+#ifndef ICU4XPluralCategory_H
+#define ICU4XPluralCategory_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XPluralCategory {
+ ICU4XPluralCategory_Zero = 0,
+ ICU4XPluralCategory_One = 1,
+ ICU4XPluralCategory_Two = 2,
+ ICU4XPluralCategory_Few = 3,
+ ICU4XPluralCategory_Many = 4,
+ ICU4XPluralCategory_Other = 5,
+} ICU4XPluralCategory;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_ICU4XPluralCategory_void.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_ICU4XPluralCategory_void ICU4XPluralCategory_get_for_cldr_string(const char* s_data, size_t s_len);
+void ICU4XPluralCategory_destroy(ICU4XPluralCategory* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XPluralCategory.hpp b/intl/icu_capi/cpp/include/ICU4XPluralCategory.hpp
new file mode 100644
index 0000000000..24db42ec21
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XPluralCategory.hpp
@@ -0,0 +1,30 @@
+#ifndef ICU4XPluralCategory_HPP
+#define ICU4XPluralCategory_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XPluralCategory.h"
+
+
+
+/**
+ * FFI version of `PluralCategory`.
+ *
+ * See the [Rust documentation for `PluralCategory`](https://docs.rs/icu/latest/icu/plurals/enum.PluralCategory.html) for more information.
+ */
+enum struct ICU4XPluralCategory {
+ Zero = 0,
+ One = 1,
+ Two = 2,
+ Few = 3,
+ Many = 4,
+ Other = 5,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XPluralOperands.h b/intl/icu_capi/cpp/include/ICU4XPluralOperands.h
new file mode 100644
index 0000000000..14d997555f
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XPluralOperands.h
@@ -0,0 +1,30 @@
+#ifndef ICU4XPluralOperands_H
+#define ICU4XPluralOperands_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XPluralOperands ICU4XPluralOperands;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XPluralOperands_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XPluralOperands_ICU4XError ICU4XPluralOperands_create_from_string(const char* s_data, size_t s_len);
+void ICU4XPluralOperands_destroy(ICU4XPluralOperands* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XPluralOperands.hpp b/intl/icu_capi/cpp/include/ICU4XPluralOperands.hpp
new file mode 100644
index 0000000000..635011f14f
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XPluralOperands.hpp
@@ -0,0 +1,61 @@
+#ifndef ICU4XPluralOperands_HPP
+#define ICU4XPluralOperands_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XPluralOperands.h"
+
+class ICU4XPluralOperands;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XPluralOperands with std::unique_ptr.
+ */
+struct ICU4XPluralOperandsDeleter {
+ void operator()(capi::ICU4XPluralOperands* l) const noexcept {
+ capi::ICU4XPluralOperands_destroy(l);
+ }
+};
+
+/**
+ * FFI version of `PluralOperands`.
+ *
+ * See the [Rust documentation for `PluralOperands`](https://docs.rs/icu/latest/icu/plurals/struct.PluralOperands.html) for more information.
+ */
+class ICU4XPluralOperands {
+ public:
+
+ /**
+ * Construct for a given string representing a number
+ *
+ * See the [Rust documentation for `from_str`](https://docs.rs/icu/latest/icu/plurals/struct.PluralOperands.html#method.from_str) for more information.
+ */
+ static diplomat::result<ICU4XPluralOperands, ICU4XError> create_from_string(const std::string_view s);
+ inline const capi::ICU4XPluralOperands* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XPluralOperands* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XPluralOperands(capi::ICU4XPluralOperands* i) : inner(i) {}
+ ICU4XPluralOperands() = default;
+ ICU4XPluralOperands(ICU4XPluralOperands&&) noexcept = default;
+ ICU4XPluralOperands& operator=(ICU4XPluralOperands&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XPluralOperands, ICU4XPluralOperandsDeleter> inner;
+};
+
+
+inline diplomat::result<ICU4XPluralOperands, ICU4XError> ICU4XPluralOperands::create_from_string(const std::string_view s) {
+ auto diplomat_result_raw_out_value = capi::ICU4XPluralOperands_create_from_string(s.data(), s.size());
+ diplomat::result<ICU4XPluralOperands, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XPluralOperands>(ICU4XPluralOperands(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XPluralRules.h b/intl/icu_capi/cpp/include/ICU4XPluralRules.h
new file mode 100644
index 0000000000..0794a7ac8e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XPluralRules.h
@@ -0,0 +1,41 @@
+#ifndef ICU4XPluralRules_H
+#define ICU4XPluralRules_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XPluralRules ICU4XPluralRules;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "diplomat_result_box_ICU4XPluralRules_ICU4XError.h"
+#include "ICU4XPluralOperands.h"
+#include "ICU4XPluralCategory.h"
+#include "ICU4XPluralCategories.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XPluralRules_ICU4XError ICU4XPluralRules_create_cardinal(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_box_ICU4XPluralRules_ICU4XError ICU4XPluralRules_create_ordinal(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+ICU4XPluralCategory ICU4XPluralRules_category_for(const ICU4XPluralRules* self, const ICU4XPluralOperands* op);
+
+ICU4XPluralCategories ICU4XPluralRules_categories(const ICU4XPluralRules* self);
+void ICU4XPluralRules_destroy(ICU4XPluralRules* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XPluralRules.hpp b/intl/icu_capi/cpp/include/ICU4XPluralRules.hpp
new file mode 100644
index 0000000000..adab9ba4a1
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XPluralRules.hpp
@@ -0,0 +1,108 @@
+#ifndef ICU4XPluralRules_HPP
+#define ICU4XPluralRules_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XPluralRules.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+class ICU4XPluralRules;
+#include "ICU4XError.hpp"
+class ICU4XPluralOperands;
+#include "ICU4XPluralCategory.hpp"
+struct ICU4XPluralCategories;
+
+/**
+ * A destruction policy for using ICU4XPluralRules with std::unique_ptr.
+ */
+struct ICU4XPluralRulesDeleter {
+ void operator()(capi::ICU4XPluralRules* l) const noexcept {
+ capi::ICU4XPluralRules_destroy(l);
+ }
+};
+
+/**
+ * FFI version of `PluralRules`.
+ *
+ * See the [Rust documentation for `PluralRules`](https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html) for more information.
+ */
+class ICU4XPluralRules {
+ public:
+
+ /**
+ * Construct an [`ICU4XPluralRules`] for the given locale, for cardinal numbers
+ *
+ * See the [Rust documentation for `try_new_cardinal`](https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_cardinal) for more information.
+ */
+ static diplomat::result<ICU4XPluralRules, ICU4XError> create_cardinal(const ICU4XDataProvider& provider, const ICU4XLocale& locale);
+
+ /**
+ * Construct an [`ICU4XPluralRules`] for the given locale, for ordinal numbers
+ *
+ * See the [Rust documentation for `try_new_ordinal`](https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_ordinal) for more information.
+ */
+ static diplomat::result<ICU4XPluralRules, ICU4XError> create_ordinal(const ICU4XDataProvider& provider, const ICU4XLocale& locale);
+
+ /**
+ * Get the category for a given number represented as operands
+ *
+ * See the [Rust documentation for `category_for`](https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.category_for) for more information.
+ */
+ ICU4XPluralCategory category_for(const ICU4XPluralOperands& op) const;
+
+ /**
+ * Get all of the categories needed in the current locale
+ *
+ * See the [Rust documentation for `categories`](https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.categories) for more information.
+ */
+ ICU4XPluralCategories categories() const;
+ inline const capi::ICU4XPluralRules* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XPluralRules* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XPluralRules(capi::ICU4XPluralRules* i) : inner(i) {}
+ ICU4XPluralRules() = default;
+ ICU4XPluralRules(ICU4XPluralRules&&) noexcept = default;
+ ICU4XPluralRules& operator=(ICU4XPluralRules&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XPluralRules, ICU4XPluralRulesDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+#include "ICU4XPluralOperands.hpp"
+#include "ICU4XPluralCategories.hpp"
+
+inline diplomat::result<ICU4XPluralRules, ICU4XError> ICU4XPluralRules::create_cardinal(const ICU4XDataProvider& provider, const ICU4XLocale& locale) {
+ auto diplomat_result_raw_out_value = capi::ICU4XPluralRules_create_cardinal(provider.AsFFI(), locale.AsFFI());
+ diplomat::result<ICU4XPluralRules, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XPluralRules>(ICU4XPluralRules(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XPluralRules, ICU4XError> ICU4XPluralRules::create_ordinal(const ICU4XDataProvider& provider, const ICU4XLocale& locale) {
+ auto diplomat_result_raw_out_value = capi::ICU4XPluralRules_create_ordinal(provider.AsFFI(), locale.AsFFI());
+ diplomat::result<ICU4XPluralRules, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XPluralRules>(ICU4XPluralRules(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XPluralCategory ICU4XPluralRules::category_for(const ICU4XPluralOperands& op) const {
+ return static_cast<ICU4XPluralCategory>(capi::ICU4XPluralRules_category_for(this->inner.get(), op.AsFFI()));
+}
+inline ICU4XPluralCategories ICU4XPluralRules::categories() const {
+ capi::ICU4XPluralCategories diplomat_raw_struct_out_value = capi::ICU4XPluralRules_categories(this->inner.get());
+ return ICU4XPluralCategories{ .zero = std::move(diplomat_raw_struct_out_value.zero), .one = std::move(diplomat_raw_struct_out_value.one), .two = std::move(diplomat_raw_struct_out_value.two), .few = std::move(diplomat_raw_struct_out_value.few), .many = std::move(diplomat_raw_struct_out_value.many), .other = std::move(diplomat_raw_struct_out_value.other) };
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XPropertyValueNameToEnumMapper.h b/intl/icu_capi/cpp/include/ICU4XPropertyValueNameToEnumMapper.h
new file mode 100644
index 0000000000..54000ce338
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XPropertyValueNameToEnumMapper.h
@@ -0,0 +1,51 @@
+#ifndef ICU4XPropertyValueNameToEnumMapper_H
+#define ICU4XPropertyValueNameToEnumMapper_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XPropertyValueNameToEnumMapper ICU4XPropertyValueNameToEnumMapper;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int16_t ICU4XPropertyValueNameToEnumMapper_get_strict(const ICU4XPropertyValueNameToEnumMapper* self, const char* name_data, size_t name_len);
+
+int16_t ICU4XPropertyValueNameToEnumMapper_get_loose(const ICU4XPropertyValueNameToEnumMapper* self, const char* name_data, size_t name_len);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_general_category(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_bidi_class(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_east_asian_width(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_indic_syllabic_category(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_line_break(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_grapheme_cluster_break(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_word_break(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_sentence_break(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_script(const ICU4XDataProvider* provider);
+void ICU4XPropertyValueNameToEnumMapper_destroy(ICU4XPropertyValueNameToEnumMapper* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XPropertyValueNameToEnumMapper.hpp b/intl/icu_capi/cpp/include/ICU4XPropertyValueNameToEnumMapper.hpp
new file mode 100644
index 0000000000..b690dee096
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XPropertyValueNameToEnumMapper.hpp
@@ -0,0 +1,207 @@
+#ifndef ICU4XPropertyValueNameToEnumMapper_HPP
+#define ICU4XPropertyValueNameToEnumMapper_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XPropertyValueNameToEnumMapper.h"
+
+class ICU4XDataProvider;
+class ICU4XPropertyValueNameToEnumMapper;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XPropertyValueNameToEnumMapper with std::unique_ptr.
+ */
+struct ICU4XPropertyValueNameToEnumMapperDeleter {
+ void operator()(capi::ICU4XPropertyValueNameToEnumMapper* l) const noexcept {
+ capi::ICU4XPropertyValueNameToEnumMapper_destroy(l);
+ }
+};
+
+/**
+ * A type capable of looking up a property value from a string name.
+ *
+ * See the [Rust documentation for `PropertyValueNameToEnumMapper`](https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapper.html) for more information.
+ *
+ * See the [Rust documentation for `PropertyValueNameToEnumMapperBorrowed`](https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html) for more information.
+ */
+class ICU4XPropertyValueNameToEnumMapper {
+ public:
+
+ /**
+ * Get the property value matching the given name, using strict matching
+ *
+ * Returns -1 if the name is unknown for this property
+ *
+ * See the [Rust documentation for `get_strict`](https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html#method.get_strict) for more information.
+ */
+ int16_t get_strict(const std::string_view name) const;
+
+ /**
+ * Get the property value matching the given name, using loose matching
+ *
+ * Returns -1 if the name is unknown for this property
+ *
+ * See the [Rust documentation for `get_loose`](https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html#method.get_loose) for more information.
+ */
+ int16_t get_loose(const std::string_view name) const;
+
+ /**
+ * See the [Rust documentation for `get_name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.GeneralCategory.html#method.get_name_to_enum_mapper) for more information.
+ */
+ static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_general_category(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.BidiClass.html#method.name_to_enum_mapper) for more information.
+ */
+ static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_bidi_class(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.EastAsianWidth.html#method.name_to_enum_mapper) for more information.
+ */
+ static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_east_asian_width(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.IndicSyllabicCategory.html#method.name_to_enum_mapper) for more information.
+ */
+ static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_indic_syllabic_category(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.LineBreak.html#method.name_to_enum_mapper) for more information.
+ */
+ static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_line_break(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `get_name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.GraphemeClusterBreak.html#method.get_name_to_enum_mapper) for more information.
+ */
+ static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_grapheme_cluster_break(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.WordBreak.html#method.name_to_enum_mapper) for more information.
+ */
+ static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_word_break(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.SentenceBreak.html#method.name_to_enum_mapper) for more information.
+ */
+ static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_sentence_break(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `name_to_enum_mapper`](https://docs.rs/icu/latest/icu/properties/struct.Script.html#method.name_to_enum_mapper) for more information.
+ */
+ static diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> load_script(const ICU4XDataProvider& provider);
+ inline const capi::ICU4XPropertyValueNameToEnumMapper* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XPropertyValueNameToEnumMapper* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XPropertyValueNameToEnumMapper(capi::ICU4XPropertyValueNameToEnumMapper* i) : inner(i) {}
+ ICU4XPropertyValueNameToEnumMapper() = default;
+ ICU4XPropertyValueNameToEnumMapper(ICU4XPropertyValueNameToEnumMapper&&) noexcept = default;
+ ICU4XPropertyValueNameToEnumMapper& operator=(ICU4XPropertyValueNameToEnumMapper&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XPropertyValueNameToEnumMapper, ICU4XPropertyValueNameToEnumMapperDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+
+inline int16_t ICU4XPropertyValueNameToEnumMapper::get_strict(const std::string_view name) const {
+ return capi::ICU4XPropertyValueNameToEnumMapper_get_strict(this->inner.get(), name.data(), name.size());
+}
+inline int16_t ICU4XPropertyValueNameToEnumMapper::get_loose(const std::string_view name) const {
+ return capi::ICU4XPropertyValueNameToEnumMapper_get_loose(this->inner.get(), name.data(), name.size());
+}
+inline diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_general_category(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XPropertyValueNameToEnumMapper_load_general_category(provider.AsFFI());
+ diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XPropertyValueNameToEnumMapper>(ICU4XPropertyValueNameToEnumMapper(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_bidi_class(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XPropertyValueNameToEnumMapper_load_bidi_class(provider.AsFFI());
+ diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XPropertyValueNameToEnumMapper>(ICU4XPropertyValueNameToEnumMapper(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_east_asian_width(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XPropertyValueNameToEnumMapper_load_east_asian_width(provider.AsFFI());
+ diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XPropertyValueNameToEnumMapper>(ICU4XPropertyValueNameToEnumMapper(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_indic_syllabic_category(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XPropertyValueNameToEnumMapper_load_indic_syllabic_category(provider.AsFFI());
+ diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XPropertyValueNameToEnumMapper>(ICU4XPropertyValueNameToEnumMapper(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_line_break(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XPropertyValueNameToEnumMapper_load_line_break(provider.AsFFI());
+ diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XPropertyValueNameToEnumMapper>(ICU4XPropertyValueNameToEnumMapper(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_grapheme_cluster_break(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XPropertyValueNameToEnumMapper_load_grapheme_cluster_break(provider.AsFFI());
+ diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XPropertyValueNameToEnumMapper>(ICU4XPropertyValueNameToEnumMapper(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_word_break(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XPropertyValueNameToEnumMapper_load_word_break(provider.AsFFI());
+ diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XPropertyValueNameToEnumMapper>(ICU4XPropertyValueNameToEnumMapper(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_sentence_break(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XPropertyValueNameToEnumMapper_load_sentence_break(provider.AsFFI());
+ diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XPropertyValueNameToEnumMapper>(ICU4XPropertyValueNameToEnumMapper(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> ICU4XPropertyValueNameToEnumMapper::load_script(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XPropertyValueNameToEnumMapper_load_script(provider.AsFFI());
+ diplomat::result<ICU4XPropertyValueNameToEnumMapper, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XPropertyValueNameToEnumMapper>(ICU4XPropertyValueNameToEnumMapper(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XRegionDisplayNames.h b/intl/icu_capi/cpp/include/ICU4XRegionDisplayNames.h
new file mode 100644
index 0000000000..a78ec64865
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XRegionDisplayNames.h
@@ -0,0 +1,35 @@
+#ifndef ICU4XRegionDisplayNames_H
+#define ICU4XRegionDisplayNames_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XRegionDisplayNames ICU4XRegionDisplayNames;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError ICU4XRegionDisplayNames_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_void_ICU4XError ICU4XRegionDisplayNames_of(const ICU4XRegionDisplayNames* self, const char* region_data, size_t region_len, DiplomatWriteable* write);
+void ICU4XRegionDisplayNames_destroy(ICU4XRegionDisplayNames* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XRegionDisplayNames.hpp b/intl/icu_capi/cpp/include/ICU4XRegionDisplayNames.hpp
new file mode 100644
index 0000000000..b8ab50e0c1
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XRegionDisplayNames.hpp
@@ -0,0 +1,104 @@
+#ifndef ICU4XRegionDisplayNames_HPP
+#define ICU4XRegionDisplayNames_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XRegionDisplayNames.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+class ICU4XRegionDisplayNames;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XRegionDisplayNames with std::unique_ptr.
+ */
+struct ICU4XRegionDisplayNamesDeleter {
+ void operator()(capi::ICU4XRegionDisplayNames* l) const noexcept {
+ capi::ICU4XRegionDisplayNames_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `RegionDisplayNames`](https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html) for more information.
+ */
+class ICU4XRegionDisplayNames {
+ public:
+
+ /**
+ * Creates a new `RegionDisplayNames` from locale data and an options bag.
+ *
+ * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.try_new) for more information.
+ */
+ static diplomat::result<ICU4XRegionDisplayNames, ICU4XError> create(const ICU4XDataProvider& provider, const ICU4XLocale& locale);
+
+ /**
+ * Returns the locale specific display name of a region.
+ * Note that the funtion returns an empty string in case the display name for a given
+ * region code is not found.
+ *
+ * See the [Rust documentation for `of`](https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.of) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> of_to_writeable(const std::string_view region, W& write) const;
+
+ /**
+ * Returns the locale specific display name of a region.
+ * Note that the funtion returns an empty string in case the display name for a given
+ * region code is not found.
+ *
+ * See the [Rust documentation for `of`](https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.of) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> of(const std::string_view region) const;
+ inline const capi::ICU4XRegionDisplayNames* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XRegionDisplayNames* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XRegionDisplayNames(capi::ICU4XRegionDisplayNames* i) : inner(i) {}
+ ICU4XRegionDisplayNames() = default;
+ ICU4XRegionDisplayNames(ICU4XRegionDisplayNames&&) noexcept = default;
+ ICU4XRegionDisplayNames& operator=(ICU4XRegionDisplayNames&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XRegionDisplayNames, ICU4XRegionDisplayNamesDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+
+inline diplomat::result<ICU4XRegionDisplayNames, ICU4XError> ICU4XRegionDisplayNames::create(const ICU4XDataProvider& provider, const ICU4XLocale& locale) {
+ auto diplomat_result_raw_out_value = capi::ICU4XRegionDisplayNames_create(provider.AsFFI(), locale.AsFFI());
+ diplomat::result<ICU4XRegionDisplayNames, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XRegionDisplayNames>(ICU4XRegionDisplayNames(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XRegionDisplayNames::of_to_writeable(const std::string_view region, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XRegionDisplayNames_of(this->inner.get(), region.data(), region.size(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XRegionDisplayNames::of(const std::string_view region) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XRegionDisplayNames_of(this->inner.get(), region.data(), region.size(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XReorderedIndexMap.h b/intl/icu_capi/cpp/include/ICU4XReorderedIndexMap.h
new file mode 100644
index 0000000000..f5507a7217
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XReorderedIndexMap.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XReorderedIndexMap_H
+#define ICU4XReorderedIndexMap_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XReorderedIndexMap ICU4XReorderedIndexMap;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+DiplomatUsizeView ICU4XReorderedIndexMap_as_slice(const ICU4XReorderedIndexMap* self);
+
+size_t ICU4XReorderedIndexMap_len(const ICU4XReorderedIndexMap* self);
+
+size_t ICU4XReorderedIndexMap_get(const ICU4XReorderedIndexMap* self, size_t index);
+void ICU4XReorderedIndexMap_destroy(ICU4XReorderedIndexMap* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XReorderedIndexMap.hpp b/intl/icu_capi/cpp/include/ICU4XReorderedIndexMap.hpp
new file mode 100644
index 0000000000..1fe4270baa
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XReorderedIndexMap.hpp
@@ -0,0 +1,74 @@
+#ifndef ICU4XReorderedIndexMap_HPP
+#define ICU4XReorderedIndexMap_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XReorderedIndexMap.h"
+
+
+/**
+ * A destruction policy for using ICU4XReorderedIndexMap with std::unique_ptr.
+ */
+struct ICU4XReorderedIndexMapDeleter {
+ void operator()(capi::ICU4XReorderedIndexMap* l) const noexcept {
+ capi::ICU4XReorderedIndexMap_destroy(l);
+ }
+};
+
+/**
+ * Thin wrapper around a vector that maps visual indices to source indices
+ *
+ * `map[visualIndex] = sourceIndex`
+ *
+ * Produced by `reorder_visual()` on [`ICU4XBidi`].
+ */
+class ICU4XReorderedIndexMap {
+ public:
+
+ /**
+ * Get this as a slice/array of indices
+ *
+ * Lifetimes: `this` must live at least as long as the output.
+ */
+ const diplomat::span<const size_t> as_slice() const;
+
+ /**
+ * The length of this map
+ */
+ size_t len() const;
+
+ /**
+ * Get element at `index`. Returns 0 when out of bounds
+ * (note that 0 is also a valid in-bounds value, please use `len()`
+ * to avoid out-of-bounds)
+ */
+ size_t get(size_t index) const;
+ inline const capi::ICU4XReorderedIndexMap* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XReorderedIndexMap* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XReorderedIndexMap(capi::ICU4XReorderedIndexMap* i) : inner(i) {}
+ ICU4XReorderedIndexMap() = default;
+ ICU4XReorderedIndexMap(ICU4XReorderedIndexMap&&) noexcept = default;
+ ICU4XReorderedIndexMap& operator=(ICU4XReorderedIndexMap&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XReorderedIndexMap, ICU4XReorderedIndexMapDeleter> inner;
+};
+
+
+inline const diplomat::span<const size_t> ICU4XReorderedIndexMap::as_slice() const {
+ capi::DiplomatUsizeView diplomat_slice_raw_out_value = capi::ICU4XReorderedIndexMap_as_slice(this->inner.get());
+ diplomat::span<const size_t> slice(diplomat_slice_raw_out_value.data, diplomat_slice_raw_out_value.len);
+ return slice;
+}
+inline size_t ICU4XReorderedIndexMap::len() const {
+ return capi::ICU4XReorderedIndexMap_len(this->inner.get());
+}
+inline size_t ICU4XReorderedIndexMap::get(size_t index) const {
+ return capi::ICU4XReorderedIndexMap_get(this->inner.get(), index);
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XRoundingIncrement.h b/intl/icu_capi/cpp/include/ICU4XRoundingIncrement.h
new file mode 100644
index 0000000000..c4b0666bef
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XRoundingIncrement.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XRoundingIncrement_H
+#define ICU4XRoundingIncrement_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XRoundingIncrement {
+ ICU4XRoundingIncrement_MultiplesOf1 = 0,
+ ICU4XRoundingIncrement_MultiplesOf2 = 1,
+ ICU4XRoundingIncrement_MultiplesOf5 = 2,
+ ICU4XRoundingIncrement_MultiplesOf25 = 3,
+} ICU4XRoundingIncrement;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XRoundingIncrement_destroy(ICU4XRoundingIncrement* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XRoundingIncrement.hpp b/intl/icu_capi/cpp/include/ICU4XRoundingIncrement.hpp
new file mode 100644
index 0000000000..be93aa0401
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XRoundingIncrement.hpp
@@ -0,0 +1,28 @@
+#ifndef ICU4XRoundingIncrement_HPP
+#define ICU4XRoundingIncrement_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XRoundingIncrement.h"
+
+
+
+/**
+ * Increment used in a rounding operation.
+ *
+ * See the [Rust documentation for `RoundingIncrement`](https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.RoundingIncrement.html) for more information.
+ */
+enum struct ICU4XRoundingIncrement {
+ MultiplesOf1 = 0,
+ MultiplesOf2 = 1,
+ MultiplesOf5 = 2,
+ MultiplesOf25 = 3,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XScriptExtensionsSet.h b/intl/icu_capi/cpp/include/ICU4XScriptExtensionsSet.h
new file mode 100644
index 0000000000..b4982dc22c
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XScriptExtensionsSet.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XScriptExtensionsSet_H
+#define ICU4XScriptExtensionsSet_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XScriptExtensionsSet ICU4XScriptExtensionsSet;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_uint16_t_void.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+bool ICU4XScriptExtensionsSet_contains(const ICU4XScriptExtensionsSet* self, uint16_t script);
+
+size_t ICU4XScriptExtensionsSet_count(const ICU4XScriptExtensionsSet* self);
+
+diplomat_result_uint16_t_void ICU4XScriptExtensionsSet_script_at(const ICU4XScriptExtensionsSet* self, size_t index);
+void ICU4XScriptExtensionsSet_destroy(ICU4XScriptExtensionsSet* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XScriptExtensionsSet.hpp b/intl/icu_capi/cpp/include/ICU4XScriptExtensionsSet.hpp
new file mode 100644
index 0000000000..fb2893634d
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XScriptExtensionsSet.hpp
@@ -0,0 +1,79 @@
+#ifndef ICU4XScriptExtensionsSet_HPP
+#define ICU4XScriptExtensionsSet_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XScriptExtensionsSet.h"
+
+
+/**
+ * A destruction policy for using ICU4XScriptExtensionsSet with std::unique_ptr.
+ */
+struct ICU4XScriptExtensionsSetDeleter {
+ void operator()(capi::ICU4XScriptExtensionsSet* l) const noexcept {
+ capi::ICU4XScriptExtensionsSet_destroy(l);
+ }
+};
+
+/**
+ * An object that represents the Script_Extensions property for a single character
+ *
+ * See the [Rust documentation for `ScriptExtensionsSet`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html) for more information.
+ */
+class ICU4XScriptExtensionsSet {
+ public:
+
+ /**
+ * Check if the Script_Extensions property of the given code point covers the given script
+ *
+ * See the [Rust documentation for `contains`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.contains) for more information.
+ */
+ bool contains(uint16_t script) const;
+
+ /**
+ * Get the number of scripts contained in here
+ *
+ * See the [Rust documentation for `iter`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.iter) for more information.
+ */
+ size_t count() const;
+
+ /**
+ * Get script at index, returning an error if out of bounds
+ *
+ * See the [Rust documentation for `iter`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.iter) for more information.
+ */
+ diplomat::result<uint16_t, std::monostate> script_at(size_t index) const;
+ inline const capi::ICU4XScriptExtensionsSet* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XScriptExtensionsSet* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XScriptExtensionsSet(capi::ICU4XScriptExtensionsSet* i) : inner(i) {}
+ ICU4XScriptExtensionsSet() = default;
+ ICU4XScriptExtensionsSet(ICU4XScriptExtensionsSet&&) noexcept = default;
+ ICU4XScriptExtensionsSet& operator=(ICU4XScriptExtensionsSet&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XScriptExtensionsSet, ICU4XScriptExtensionsSetDeleter> inner;
+};
+
+
+inline bool ICU4XScriptExtensionsSet::contains(uint16_t script) const {
+ return capi::ICU4XScriptExtensionsSet_contains(this->inner.get(), script);
+}
+inline size_t ICU4XScriptExtensionsSet::count() const {
+ return capi::ICU4XScriptExtensionsSet_count(this->inner.get());
+}
+inline diplomat::result<uint16_t, std::monostate> ICU4XScriptExtensionsSet::script_at(size_t index) const {
+ auto diplomat_result_raw_out_value = capi::ICU4XScriptExtensionsSet_script_at(this->inner.get(), index);
+ diplomat::result<uint16_t, std::monostate> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<uint16_t>(diplomat_result_raw_out_value.ok);
+ } else {
+ diplomat_result_out_value = diplomat::Err(std::monostate());
+ }
+ return diplomat_result_out_value;
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XScriptWithExtensions.h b/intl/icu_capi/cpp/include/ICU4XScriptWithExtensions.h
new file mode 100644
index 0000000000..df2dd53946
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XScriptWithExtensions.h
@@ -0,0 +1,41 @@
+#ifndef ICU4XScriptWithExtensions_H
+#define ICU4XScriptWithExtensions_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XScriptWithExtensions ICU4XScriptWithExtensions;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.h"
+#include "ICU4XScriptWithExtensionsBorrowed.h"
+#include "CodePointRangeIterator.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError ICU4XScriptWithExtensions_create(const ICU4XDataProvider* provider);
+
+uint16_t ICU4XScriptWithExtensions_get_script_val(const ICU4XScriptWithExtensions* self, uint32_t code_point);
+
+bool ICU4XScriptWithExtensions_has_script(const ICU4XScriptWithExtensions* self, uint32_t code_point, uint16_t script);
+
+ICU4XScriptWithExtensionsBorrowed* ICU4XScriptWithExtensions_as_borrowed(const ICU4XScriptWithExtensions* self);
+
+CodePointRangeIterator* ICU4XScriptWithExtensions_iter_ranges_for_script(const ICU4XScriptWithExtensions* self, uint16_t script);
+void ICU4XScriptWithExtensions_destroy(ICU4XScriptWithExtensions* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XScriptWithExtensions.hpp b/intl/icu_capi/cpp/include/ICU4XScriptWithExtensions.hpp
new file mode 100644
index 0000000000..ffce554c3d
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XScriptWithExtensions.hpp
@@ -0,0 +1,109 @@
+#ifndef ICU4XScriptWithExtensions_HPP
+#define ICU4XScriptWithExtensions_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XScriptWithExtensions.h"
+
+class ICU4XDataProvider;
+class ICU4XScriptWithExtensions;
+#include "ICU4XError.hpp"
+class ICU4XScriptWithExtensionsBorrowed;
+class CodePointRangeIterator;
+
+/**
+ * A destruction policy for using ICU4XScriptWithExtensions with std::unique_ptr.
+ */
+struct ICU4XScriptWithExtensionsDeleter {
+ void operator()(capi::ICU4XScriptWithExtensions* l) const noexcept {
+ capi::ICU4XScriptWithExtensions_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X ScriptWithExtensions map object, capable of holding a map of codepoints to scriptextensions values
+ *
+ * See the [Rust documentation for `ScriptWithExtensions`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html) for more information.
+ */
+class ICU4XScriptWithExtensions {
+ public:
+
+ /**
+ * See the [Rust documentation for `script_with_extensions`](https://docs.rs/icu/latest/icu/properties/script/fn.script_with_extensions.html) for more information.
+ */
+ static diplomat::result<ICU4XScriptWithExtensions, ICU4XError> create(const ICU4XDataProvider& provider);
+
+ /**
+ * Get the Script property value for a code point
+ *
+ * See the [Rust documentation for `get_script_val`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_val) for more information.
+ */
+ uint16_t get_script_val(uint32_t code_point) const;
+
+ /**
+ * Check if the Script_Extensions property of the given code point covers the given script
+ *
+ * See the [Rust documentation for `has_script`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.has_script) for more information.
+ */
+ bool has_script(uint32_t code_point, uint16_t script) const;
+
+ /**
+ * Borrow this object for a slightly faster variant with more operations
+ *
+ * See the [Rust documentation for `as_borrowed`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html#method.as_borrowed) for more information.
+ *
+ * Lifetimes: `this` must live at least as long as the output.
+ */
+ ICU4XScriptWithExtensionsBorrowed as_borrowed() const;
+
+ /**
+ * Get a list of ranges of code points that contain this script in their Script_Extensions values
+ *
+ * See the [Rust documentation for `get_script_extensions_ranges`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_ranges) for more information.
+ *
+ * Lifetimes: `this` must live at least as long as the output.
+ */
+ CodePointRangeIterator iter_ranges_for_script(uint16_t script) const;
+ inline const capi::ICU4XScriptWithExtensions* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XScriptWithExtensions* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XScriptWithExtensions(capi::ICU4XScriptWithExtensions* i) : inner(i) {}
+ ICU4XScriptWithExtensions() = default;
+ ICU4XScriptWithExtensions(ICU4XScriptWithExtensions&&) noexcept = default;
+ ICU4XScriptWithExtensions& operator=(ICU4XScriptWithExtensions&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XScriptWithExtensions, ICU4XScriptWithExtensionsDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XScriptWithExtensionsBorrowed.hpp"
+#include "CodePointRangeIterator.hpp"
+
+inline diplomat::result<ICU4XScriptWithExtensions, ICU4XError> ICU4XScriptWithExtensions::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XScriptWithExtensions_create(provider.AsFFI());
+ diplomat::result<ICU4XScriptWithExtensions, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XScriptWithExtensions>(ICU4XScriptWithExtensions(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline uint16_t ICU4XScriptWithExtensions::get_script_val(uint32_t code_point) const {
+ return capi::ICU4XScriptWithExtensions_get_script_val(this->inner.get(), code_point);
+}
+inline bool ICU4XScriptWithExtensions::has_script(uint32_t code_point, uint16_t script) const {
+ return capi::ICU4XScriptWithExtensions_has_script(this->inner.get(), code_point, script);
+}
+inline ICU4XScriptWithExtensionsBorrowed ICU4XScriptWithExtensions::as_borrowed() const {
+ return ICU4XScriptWithExtensionsBorrowed(capi::ICU4XScriptWithExtensions_as_borrowed(this->inner.get()));
+}
+inline CodePointRangeIterator ICU4XScriptWithExtensions::iter_ranges_for_script(uint16_t script) const {
+ return CodePointRangeIterator(capi::ICU4XScriptWithExtensions_iter_ranges_for_script(this->inner.get(), script));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XScriptWithExtensionsBorrowed.h b/intl/icu_capi/cpp/include/ICU4XScriptWithExtensionsBorrowed.h
new file mode 100644
index 0000000000..82faeec178
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XScriptWithExtensionsBorrowed.h
@@ -0,0 +1,37 @@
+#ifndef ICU4XScriptWithExtensionsBorrowed_H
+#define ICU4XScriptWithExtensionsBorrowed_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XScriptWithExtensionsBorrowed ICU4XScriptWithExtensionsBorrowed;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XScriptExtensionsSet.h"
+#include "ICU4XCodePointSetData.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+uint16_t ICU4XScriptWithExtensionsBorrowed_get_script_val(const ICU4XScriptWithExtensionsBorrowed* self, uint32_t code_point);
+
+ICU4XScriptExtensionsSet* ICU4XScriptWithExtensionsBorrowed_get_script_extensions_val(const ICU4XScriptWithExtensionsBorrowed* self, uint32_t code_point);
+
+bool ICU4XScriptWithExtensionsBorrowed_has_script(const ICU4XScriptWithExtensionsBorrowed* self, uint32_t code_point, uint16_t script);
+
+ICU4XCodePointSetData* ICU4XScriptWithExtensionsBorrowed_get_script_extensions_set(const ICU4XScriptWithExtensionsBorrowed* self, uint16_t script);
+void ICU4XScriptWithExtensionsBorrowed_destroy(ICU4XScriptWithExtensionsBorrowed* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XScriptWithExtensionsBorrowed.hpp b/intl/icu_capi/cpp/include/ICU4XScriptWithExtensionsBorrowed.hpp
new file mode 100644
index 0000000000..7793146bd2
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XScriptWithExtensionsBorrowed.hpp
@@ -0,0 +1,89 @@
+#ifndef ICU4XScriptWithExtensionsBorrowed_HPP
+#define ICU4XScriptWithExtensionsBorrowed_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XScriptWithExtensionsBorrowed.h"
+
+class ICU4XScriptExtensionsSet;
+class ICU4XCodePointSetData;
+
+/**
+ * A destruction policy for using ICU4XScriptWithExtensionsBorrowed with std::unique_ptr.
+ */
+struct ICU4XScriptWithExtensionsBorrowedDeleter {
+ void operator()(capi::ICU4XScriptWithExtensionsBorrowed* l) const noexcept {
+ capi::ICU4XScriptWithExtensionsBorrowed_destroy(l);
+ }
+};
+
+/**
+ * A slightly faster ICU4XScriptWithExtensions object
+ *
+ * See the [Rust documentation for `ScriptWithExtensionsBorrowed`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html) for more information.
+ */
+class ICU4XScriptWithExtensionsBorrowed {
+ public:
+
+ /**
+ * Get the Script property value for a code point
+ *
+ * See the [Rust documentation for `get_script_val`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_val) for more information.
+ */
+ uint16_t get_script_val(uint32_t code_point) const;
+
+ /**
+ * Get the Script property value for a code point
+ *
+ * See the [Rust documentation for `get_script_extensions_val`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_val) for more information.
+ *
+ * Lifetimes: `this` must live at least as long as the output.
+ */
+ ICU4XScriptExtensionsSet get_script_extensions_val(uint32_t code_point) const;
+
+ /**
+ * Check if the Script_Extensions property of the given code point covers the given script
+ *
+ * See the [Rust documentation for `has_script`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.has_script) for more information.
+ */
+ bool has_script(uint32_t code_point, uint16_t script) const;
+
+ /**
+ * Build the CodePointSetData corresponding to a codepoints matching a particular script
+ * in their Script_Extensions
+ *
+ * See the [Rust documentation for `get_script_extensions_set`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_set) for more information.
+ */
+ ICU4XCodePointSetData get_script_extensions_set(uint16_t script) const;
+ inline const capi::ICU4XScriptWithExtensionsBorrowed* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XScriptWithExtensionsBorrowed* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XScriptWithExtensionsBorrowed(capi::ICU4XScriptWithExtensionsBorrowed* i) : inner(i) {}
+ ICU4XScriptWithExtensionsBorrowed() = default;
+ ICU4XScriptWithExtensionsBorrowed(ICU4XScriptWithExtensionsBorrowed&&) noexcept = default;
+ ICU4XScriptWithExtensionsBorrowed& operator=(ICU4XScriptWithExtensionsBorrowed&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XScriptWithExtensionsBorrowed, ICU4XScriptWithExtensionsBorrowedDeleter> inner;
+};
+
+#include "ICU4XScriptExtensionsSet.hpp"
+#include "ICU4XCodePointSetData.hpp"
+
+inline uint16_t ICU4XScriptWithExtensionsBorrowed::get_script_val(uint32_t code_point) const {
+ return capi::ICU4XScriptWithExtensionsBorrowed_get_script_val(this->inner.get(), code_point);
+}
+inline ICU4XScriptExtensionsSet ICU4XScriptWithExtensionsBorrowed::get_script_extensions_val(uint32_t code_point) const {
+ return ICU4XScriptExtensionsSet(capi::ICU4XScriptWithExtensionsBorrowed_get_script_extensions_val(this->inner.get(), code_point));
+}
+inline bool ICU4XScriptWithExtensionsBorrowed::has_script(uint32_t code_point, uint16_t script) const {
+ return capi::ICU4XScriptWithExtensionsBorrowed_has_script(this->inner.get(), code_point, script);
+}
+inline ICU4XCodePointSetData ICU4XScriptWithExtensionsBorrowed::get_script_extensions_set(uint16_t script) const {
+ return ICU4XCodePointSetData(capi::ICU4XScriptWithExtensionsBorrowed_get_script_extensions_set(this->inner.get(), script));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XSegmenterWordType.h b/intl/icu_capi/cpp/include/ICU4XSegmenterWordType.h
new file mode 100644
index 0000000000..9f4f81cf10
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XSegmenterWordType.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XSegmenterWordType_H
+#define ICU4XSegmenterWordType_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XSegmenterWordType {
+ ICU4XSegmenterWordType_None = 0,
+ ICU4XSegmenterWordType_Number = 1,
+ ICU4XSegmenterWordType_Letter = 2,
+} ICU4XSegmenterWordType;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XSegmenterWordType_destroy(ICU4XSegmenterWordType* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XSegmenterWordType.hpp b/intl/icu_capi/cpp/include/ICU4XSegmenterWordType.hpp
new file mode 100644
index 0000000000..8a61504b70
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XSegmenterWordType.hpp
@@ -0,0 +1,25 @@
+#ifndef ICU4XSegmenterWordType_HPP
+#define ICU4XSegmenterWordType_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XSegmenterWordType.h"
+
+
+
+/**
+ * See the [Rust documentation for `WordType`](https://docs.rs/icu/latest/icu/segmenter/enum.WordType.html) for more information.
+ */
+enum struct ICU4XSegmenterWordType {
+ None = 0,
+ Number = 1,
+ Letter = 2,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorLatin1.h b/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorLatin1.h
new file mode 100644
index 0000000000..6dd7b132dc
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorLatin1.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XSentenceBreakIteratorLatin1_H
+#define ICU4XSentenceBreakIteratorLatin1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XSentenceBreakIteratorLatin1 ICU4XSentenceBreakIteratorLatin1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XSentenceBreakIteratorLatin1_next(ICU4XSentenceBreakIteratorLatin1* self);
+void ICU4XSentenceBreakIteratorLatin1_destroy(ICU4XSentenceBreakIteratorLatin1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorLatin1.hpp b/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorLatin1.hpp
new file mode 100644
index 0000000000..6c2a2a372f
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorLatin1.hpp
@@ -0,0 +1,51 @@
+#ifndef ICU4XSentenceBreakIteratorLatin1_HPP
+#define ICU4XSentenceBreakIteratorLatin1_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XSentenceBreakIteratorLatin1.h"
+
+
+/**
+ * A destruction policy for using ICU4XSentenceBreakIteratorLatin1 with std::unique_ptr.
+ */
+struct ICU4XSentenceBreakIteratorLatin1Deleter {
+ void operator()(capi::ICU4XSentenceBreakIteratorLatin1* l) const noexcept {
+ capi::ICU4XSentenceBreakIteratorLatin1_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `SentenceBreakIterator`](https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html) for more information.
+ */
+class ICU4XSentenceBreakIteratorLatin1 {
+ public:
+
+ /**
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ * out of range of a 32-bit signed integer.
+ *
+ * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next) for more information.
+ */
+ int32_t next();
+ inline const capi::ICU4XSentenceBreakIteratorLatin1* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XSentenceBreakIteratorLatin1* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XSentenceBreakIteratorLatin1(capi::ICU4XSentenceBreakIteratorLatin1* i) : inner(i) {}
+ ICU4XSentenceBreakIteratorLatin1() = default;
+ ICU4XSentenceBreakIteratorLatin1(ICU4XSentenceBreakIteratorLatin1&&) noexcept = default;
+ ICU4XSentenceBreakIteratorLatin1& operator=(ICU4XSentenceBreakIteratorLatin1&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XSentenceBreakIteratorLatin1, ICU4XSentenceBreakIteratorLatin1Deleter> inner;
+};
+
+
+inline int32_t ICU4XSentenceBreakIteratorLatin1::next() {
+ return capi::ICU4XSentenceBreakIteratorLatin1_next(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf16.h b/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf16.h
new file mode 100644
index 0000000000..3ed0dc18c3
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf16.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XSentenceBreakIteratorUtf16_H
+#define ICU4XSentenceBreakIteratorUtf16_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XSentenceBreakIteratorUtf16 ICU4XSentenceBreakIteratorUtf16;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XSentenceBreakIteratorUtf16_next(ICU4XSentenceBreakIteratorUtf16* self);
+void ICU4XSentenceBreakIteratorUtf16_destroy(ICU4XSentenceBreakIteratorUtf16* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf16.hpp b/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf16.hpp
new file mode 100644
index 0000000000..6b98df79a1
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf16.hpp
@@ -0,0 +1,51 @@
+#ifndef ICU4XSentenceBreakIteratorUtf16_HPP
+#define ICU4XSentenceBreakIteratorUtf16_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XSentenceBreakIteratorUtf16.h"
+
+
+/**
+ * A destruction policy for using ICU4XSentenceBreakIteratorUtf16 with std::unique_ptr.
+ */
+struct ICU4XSentenceBreakIteratorUtf16Deleter {
+ void operator()(capi::ICU4XSentenceBreakIteratorUtf16* l) const noexcept {
+ capi::ICU4XSentenceBreakIteratorUtf16_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `SentenceBreakIterator`](https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html) for more information.
+ */
+class ICU4XSentenceBreakIteratorUtf16 {
+ public:
+
+ /**
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ * out of range of a 32-bit signed integer.
+ *
+ * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next) for more information.
+ */
+ int32_t next();
+ inline const capi::ICU4XSentenceBreakIteratorUtf16* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XSentenceBreakIteratorUtf16* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XSentenceBreakIteratorUtf16(capi::ICU4XSentenceBreakIteratorUtf16* i) : inner(i) {}
+ ICU4XSentenceBreakIteratorUtf16() = default;
+ ICU4XSentenceBreakIteratorUtf16(ICU4XSentenceBreakIteratorUtf16&&) noexcept = default;
+ ICU4XSentenceBreakIteratorUtf16& operator=(ICU4XSentenceBreakIteratorUtf16&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XSentenceBreakIteratorUtf16, ICU4XSentenceBreakIteratorUtf16Deleter> inner;
+};
+
+
+inline int32_t ICU4XSentenceBreakIteratorUtf16::next() {
+ return capi::ICU4XSentenceBreakIteratorUtf16_next(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf8.h b/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf8.h
new file mode 100644
index 0000000000..655cb67b6c
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf8.h
@@ -0,0 +1,29 @@
+#ifndef ICU4XSentenceBreakIteratorUtf8_H
+#define ICU4XSentenceBreakIteratorUtf8_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XSentenceBreakIteratorUtf8 ICU4XSentenceBreakIteratorUtf8;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XSentenceBreakIteratorUtf8_next(ICU4XSentenceBreakIteratorUtf8* self);
+void ICU4XSentenceBreakIteratorUtf8_destroy(ICU4XSentenceBreakIteratorUtf8* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf8.hpp b/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf8.hpp
new file mode 100644
index 0000000000..6f02a9e40c
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XSentenceBreakIteratorUtf8.hpp
@@ -0,0 +1,51 @@
+#ifndef ICU4XSentenceBreakIteratorUtf8_HPP
+#define ICU4XSentenceBreakIteratorUtf8_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XSentenceBreakIteratorUtf8.h"
+
+
+/**
+ * A destruction policy for using ICU4XSentenceBreakIteratorUtf8 with std::unique_ptr.
+ */
+struct ICU4XSentenceBreakIteratorUtf8Deleter {
+ void operator()(capi::ICU4XSentenceBreakIteratorUtf8* l) const noexcept {
+ capi::ICU4XSentenceBreakIteratorUtf8_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `SentenceBreakIterator`](https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html) for more information.
+ */
+class ICU4XSentenceBreakIteratorUtf8 {
+ public:
+
+ /**
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ * out of range of a 32-bit signed integer.
+ *
+ * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next) for more information.
+ */
+ int32_t next();
+ inline const capi::ICU4XSentenceBreakIteratorUtf8* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XSentenceBreakIteratorUtf8* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XSentenceBreakIteratorUtf8(capi::ICU4XSentenceBreakIteratorUtf8* i) : inner(i) {}
+ ICU4XSentenceBreakIteratorUtf8() = default;
+ ICU4XSentenceBreakIteratorUtf8(ICU4XSentenceBreakIteratorUtf8&&) noexcept = default;
+ ICU4XSentenceBreakIteratorUtf8& operator=(ICU4XSentenceBreakIteratorUtf8&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XSentenceBreakIteratorUtf8, ICU4XSentenceBreakIteratorUtf8Deleter> inner;
+};
+
+
+inline int32_t ICU4XSentenceBreakIteratorUtf8::next() {
+ return capi::ICU4XSentenceBreakIteratorUtf8_next(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XSentenceSegmenter.h b/intl/icu_capi/cpp/include/ICU4XSentenceSegmenter.h
new file mode 100644
index 0000000000..7701c9f042
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XSentenceSegmenter.h
@@ -0,0 +1,40 @@
+#ifndef ICU4XSentenceSegmenter_H
+#define ICU4XSentenceSegmenter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XSentenceSegmenter ICU4XSentenceSegmenter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.h"
+#include "ICU4XSentenceBreakIteratorUtf8.h"
+#include "ICU4XSentenceBreakIteratorUtf16.h"
+#include "ICU4XSentenceBreakIteratorLatin1.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError ICU4XSentenceSegmenter_create(const ICU4XDataProvider* provider);
+
+ICU4XSentenceBreakIteratorUtf8* ICU4XSentenceSegmenter_segment_utf8(const ICU4XSentenceSegmenter* self, const char* input_data, size_t input_len);
+
+ICU4XSentenceBreakIteratorUtf16* ICU4XSentenceSegmenter_segment_utf16(const ICU4XSentenceSegmenter* self, const uint16_t* input_data, size_t input_len);
+
+ICU4XSentenceBreakIteratorLatin1* ICU4XSentenceSegmenter_segment_latin1(const ICU4XSentenceSegmenter* self, const uint8_t* input_data, size_t input_len);
+void ICU4XSentenceSegmenter_destroy(ICU4XSentenceSegmenter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XSentenceSegmenter.hpp b/intl/icu_capi/cpp/include/ICU4XSentenceSegmenter.hpp
new file mode 100644
index 0000000000..25790199f3
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XSentenceSegmenter.hpp
@@ -0,0 +1,105 @@
+#ifndef ICU4XSentenceSegmenter_HPP
+#define ICU4XSentenceSegmenter_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XSentenceSegmenter.h"
+
+class ICU4XDataProvider;
+class ICU4XSentenceSegmenter;
+#include "ICU4XError.hpp"
+class ICU4XSentenceBreakIteratorUtf8;
+class ICU4XSentenceBreakIteratorUtf16;
+class ICU4XSentenceBreakIteratorLatin1;
+
+/**
+ * A destruction policy for using ICU4XSentenceSegmenter with std::unique_ptr.
+ */
+struct ICU4XSentenceSegmenterDeleter {
+ void operator()(capi::ICU4XSentenceSegmenter* l) const noexcept {
+ capi::ICU4XSentenceSegmenter_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X sentence-break segmenter, capable of finding sentence breakpoints in strings.
+ *
+ * See the [Rust documentation for `SentenceSegmenter`](https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html) for more information.
+ */
+class ICU4XSentenceSegmenter {
+ public:
+
+ /**
+ * Construct an [`ICU4XSentenceSegmenter`].
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XSentenceSegmenter, ICU4XError> create(const ICU4XDataProvider& provider);
+
+ /**
+ * Segments a (potentially ill-formed) UTF-8 string.
+ *
+ * See the [Rust documentation for `segment_utf8`](https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_utf8) for more information.
+ *
+ * Lifetimes: `this`, `input` must live at least as long as the output.
+ */
+ ICU4XSentenceBreakIteratorUtf8 segment_utf8(const std::string_view input) const;
+
+ /**
+ * Segments a UTF-16 string.
+ *
+ * See the [Rust documentation for `segment_utf16`](https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_utf16) for more information.
+ *
+ * Lifetimes: `this`, `input` must live at least as long as the output.
+ */
+ ICU4XSentenceBreakIteratorUtf16 segment_utf16(const diplomat::span<const uint16_t> input) const;
+
+ /**
+ * Segments a Latin-1 string.
+ *
+ * See the [Rust documentation for `segment_latin1`](https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_latin1) for more information.
+ *
+ * Lifetimes: `this`, `input` must live at least as long as the output.
+ */
+ ICU4XSentenceBreakIteratorLatin1 segment_latin1(const diplomat::span<const uint8_t> input) const;
+ inline const capi::ICU4XSentenceSegmenter* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XSentenceSegmenter* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XSentenceSegmenter(capi::ICU4XSentenceSegmenter* i) : inner(i) {}
+ ICU4XSentenceSegmenter() = default;
+ ICU4XSentenceSegmenter(ICU4XSentenceSegmenter&&) noexcept = default;
+ ICU4XSentenceSegmenter& operator=(ICU4XSentenceSegmenter&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XSentenceSegmenter, ICU4XSentenceSegmenterDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XSentenceBreakIteratorUtf8.hpp"
+#include "ICU4XSentenceBreakIteratorUtf16.hpp"
+#include "ICU4XSentenceBreakIteratorLatin1.hpp"
+
+inline diplomat::result<ICU4XSentenceSegmenter, ICU4XError> ICU4XSentenceSegmenter::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XSentenceSegmenter_create(provider.AsFFI());
+ diplomat::result<ICU4XSentenceSegmenter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XSentenceSegmenter>(ICU4XSentenceSegmenter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XSentenceBreakIteratorUtf8 ICU4XSentenceSegmenter::segment_utf8(const std::string_view input) const {
+ return ICU4XSentenceBreakIteratorUtf8(capi::ICU4XSentenceSegmenter_segment_utf8(this->inner.get(), input.data(), input.size()));
+}
+inline ICU4XSentenceBreakIteratorUtf16 ICU4XSentenceSegmenter::segment_utf16(const diplomat::span<const uint16_t> input) const {
+ return ICU4XSentenceBreakIteratorUtf16(capi::ICU4XSentenceSegmenter_segment_utf16(this->inner.get(), input.data(), input.size()));
+}
+inline ICU4XSentenceBreakIteratorLatin1 ICU4XSentenceSegmenter::segment_latin1(const diplomat::span<const uint8_t> input) const {
+ return ICU4XSentenceBreakIteratorLatin1(capi::ICU4XSentenceSegmenter_segment_latin1(this->inner.get(), input.data(), input.size()));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTime.h b/intl/icu_capi/cpp/include/ICU4XTime.h
new file mode 100644
index 0000000000..2f3a9967fa
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTime.h
@@ -0,0 +1,40 @@
+#ifndef ICU4XTime_H
+#define ICU4XTime_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XTime ICU4XTime;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "diplomat_result_box_ICU4XTime_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XTime_ICU4XError ICU4XTime_create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond);
+
+diplomat_result_box_ICU4XTime_ICU4XError ICU4XTime_create_midnight();
+
+uint8_t ICU4XTime_hour(const ICU4XTime* self);
+
+uint8_t ICU4XTime_minute(const ICU4XTime* self);
+
+uint8_t ICU4XTime_second(const ICU4XTime* self);
+
+uint32_t ICU4XTime_nanosecond(const ICU4XTime* self);
+void ICU4XTime_destroy(ICU4XTime* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTime.hpp b/intl/icu_capi/cpp/include/ICU4XTime.hpp
new file mode 100644
index 0000000000..facac6ade7
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTime.hpp
@@ -0,0 +1,118 @@
+#ifndef ICU4XTime_HPP
+#define ICU4XTime_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XTime.h"
+
+class ICU4XTime;
+#include "ICU4XError.hpp"
+
+/**
+ * A destruction policy for using ICU4XTime with std::unique_ptr.
+ */
+struct ICU4XTimeDeleter {
+ void operator()(capi::ICU4XTime* l) const noexcept {
+ capi::ICU4XTime_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond
+ *
+ * See the [Rust documentation for `Time`](https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html) for more information.
+ */
+class ICU4XTime {
+ public:
+
+ /**
+ * Creates a new [`ICU4XTime`] given field values
+ *
+ * See the [Rust documentation for `Time`](https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html) for more information.
+ */
+ static diplomat::result<ICU4XTime, ICU4XError> create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond);
+
+ /**
+ * Creates a new [`ICU4XTime`] representing midnight (00:00.000).
+ *
+ * See the [Rust documentation for `Time`](https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html) for more information.
+ */
+ static diplomat::result<ICU4XTime, ICU4XError> create_midnight();
+
+ /**
+ * Returns the hour in this time
+ *
+ * See the [Rust documentation for `hour`](https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour) for more information.
+ */
+ uint8_t hour() const;
+
+ /**
+ * Returns the minute in this time
+ *
+ * See the [Rust documentation for `minute`](https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute) for more information.
+ */
+ uint8_t minute() const;
+
+ /**
+ * Returns the second in this time
+ *
+ * See the [Rust documentation for `second`](https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second) for more information.
+ */
+ uint8_t second() const;
+
+ /**
+ * Returns the nanosecond in this time
+ *
+ * See the [Rust documentation for `nanosecond`](https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond) for more information.
+ */
+ uint32_t nanosecond() const;
+ inline const capi::ICU4XTime* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XTime* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XTime(capi::ICU4XTime* i) : inner(i) {}
+ ICU4XTime() = default;
+ ICU4XTime(ICU4XTime&&) noexcept = default;
+ ICU4XTime& operator=(ICU4XTime&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XTime, ICU4XTimeDeleter> inner;
+};
+
+
+inline diplomat::result<ICU4XTime, ICU4XError> ICU4XTime::create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond) {
+ auto diplomat_result_raw_out_value = capi::ICU4XTime_create(hour, minute, second, nanosecond);
+ diplomat::result<ICU4XTime, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XTime>(ICU4XTime(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XTime, ICU4XError> ICU4XTime::create_midnight() {
+ auto diplomat_result_raw_out_value = capi::ICU4XTime_create_midnight();
+ diplomat::result<ICU4XTime, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XTime>(ICU4XTime(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline uint8_t ICU4XTime::hour() const {
+ return capi::ICU4XTime_hour(this->inner.get());
+}
+inline uint8_t ICU4XTime::minute() const {
+ return capi::ICU4XTime_minute(this->inner.get());
+}
+inline uint8_t ICU4XTime::second() const {
+ return capi::ICU4XTime_second(this->inner.get());
+}
+inline uint32_t ICU4XTime::nanosecond() const {
+ return capi::ICU4XTime_nanosecond(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTimeFormatter.h b/intl/icu_capi/cpp/include/ICU4XTimeFormatter.h
new file mode 100644
index 0000000000..d200881399
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTimeFormatter.h
@@ -0,0 +1,43 @@
+#ifndef ICU4XTimeFormatter_H
+#define ICU4XTimeFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XTimeFormatter ICU4XTimeFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XTimeLength.h"
+#include "diplomat_result_box_ICU4XTimeFormatter_ICU4XError.h"
+#include "ICU4XTime.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XDateTime.h"
+#include "ICU4XIsoDateTime.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XTimeFormatter_ICU4XError ICU4XTimeFormatter_create_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XTimeLength length);
+
+diplomat_result_void_ICU4XError ICU4XTimeFormatter_format_time(const ICU4XTimeFormatter* self, const ICU4XTime* value, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XTimeFormatter_format_datetime(const ICU4XTimeFormatter* self, const ICU4XDateTime* value, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XTimeFormatter_format_iso_datetime(const ICU4XTimeFormatter* self, const ICU4XIsoDateTime* value, DiplomatWriteable* write);
+void ICU4XTimeFormatter_destroy(ICU4XTimeFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTimeFormatter.hpp b/intl/icu_capi/cpp/include/ICU4XTimeFormatter.hpp
new file mode 100644
index 0000000000..3800ee5d16
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTimeFormatter.hpp
@@ -0,0 +1,183 @@
+#ifndef ICU4XTimeFormatter_HPP
+#define ICU4XTimeFormatter_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XTimeFormatter.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+#include "ICU4XTimeLength.hpp"
+class ICU4XTimeFormatter;
+#include "ICU4XError.hpp"
+class ICU4XTime;
+class ICU4XDateTime;
+class ICU4XIsoDateTime;
+
+/**
+ * A destruction policy for using ICU4XTimeFormatter with std::unique_ptr.
+ */
+struct ICU4XTimeFormatterDeleter {
+ void operator()(capi::ICU4XTimeFormatter* l) const noexcept {
+ capi::ICU4XTimeFormatter_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X TimeFormatter object capable of formatting an [`ICU4XTime`] type (and others) as a string
+ *
+ * See the [Rust documentation for `TimeFormatter`](https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html) for more information.
+ */
+class ICU4XTimeFormatter {
+ public:
+
+ /**
+ * Creates a new [`ICU4XTimeFormatter`] from locale data.
+ *
+ * See the [Rust documentation for `try_new_with_length`](https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.try_new_with_length) for more information.
+ */
+ static diplomat::result<ICU4XTimeFormatter, ICU4XError> create_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XTimeLength length);
+
+ /**
+ * Formats a [`ICU4XTime`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_time_to_writeable(const ICU4XTime& value, W& write) const;
+
+ /**
+ * Formats a [`ICU4XTime`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_time(const ICU4XTime& value) const;
+
+ /**
+ * Formats a [`ICU4XDateTime`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_datetime_to_writeable(const ICU4XDateTime& value, W& write) const;
+
+ /**
+ * Formats a [`ICU4XDateTime`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_datetime(const ICU4XDateTime& value) const;
+
+ /**
+ * Formats a [`ICU4XIsoDateTime`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_datetime_to_writeable(const ICU4XIsoDateTime& value, W& write) const;
+
+ /**
+ * Formats a [`ICU4XIsoDateTime`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_iso_datetime(const ICU4XIsoDateTime& value) const;
+ inline const capi::ICU4XTimeFormatter* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XTimeFormatter* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XTimeFormatter(capi::ICU4XTimeFormatter* i) : inner(i) {}
+ ICU4XTimeFormatter() = default;
+ ICU4XTimeFormatter(ICU4XTimeFormatter&&) noexcept = default;
+ ICU4XTimeFormatter& operator=(ICU4XTimeFormatter&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XTimeFormatter, ICU4XTimeFormatterDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+#include "ICU4XTime.hpp"
+#include "ICU4XDateTime.hpp"
+#include "ICU4XIsoDateTime.hpp"
+
+inline diplomat::result<ICU4XTimeFormatter, ICU4XError> ICU4XTimeFormatter::create_with_length(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XTimeLength length) {
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeFormatter_create_with_length(provider.AsFFI(), locale.AsFFI(), static_cast<capi::ICU4XTimeLength>(length));
+ diplomat::result<ICU4XTimeFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XTimeFormatter>(ICU4XTimeFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XTimeFormatter::format_time_to_writeable(const ICU4XTime& value, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeFormatter_format_time(this->inner.get(), value.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XTimeFormatter::format_time(const ICU4XTime& value) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeFormatter_format_time(this->inner.get(), value.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XTimeFormatter::format_datetime_to_writeable(const ICU4XDateTime& value, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeFormatter_format_datetime(this->inner.get(), value.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XTimeFormatter::format_datetime(const ICU4XDateTime& value) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeFormatter_format_datetime(this->inner.get(), value.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XTimeFormatter::format_iso_datetime_to_writeable(const ICU4XIsoDateTime& value, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeFormatter_format_iso_datetime(this->inner.get(), value.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XTimeFormatter::format_iso_datetime(const ICU4XIsoDateTime& value) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeFormatter_format_iso_datetime(this->inner.get(), value.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTimeLength.h b/intl/icu_capi/cpp/include/ICU4XTimeLength.h
new file mode 100644
index 0000000000..6d98bc8ccb
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTimeLength.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XTimeLength_H
+#define ICU4XTimeLength_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XTimeLength {
+ ICU4XTimeLength_Full = 0,
+ ICU4XTimeLength_Long = 1,
+ ICU4XTimeLength_Medium = 2,
+ ICU4XTimeLength_Short = 3,
+} ICU4XTimeLength;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XTimeLength_destroy(ICU4XTimeLength* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTimeLength.hpp b/intl/icu_capi/cpp/include/ICU4XTimeLength.hpp
new file mode 100644
index 0000000000..a7035d0900
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTimeLength.hpp
@@ -0,0 +1,26 @@
+#ifndef ICU4XTimeLength_HPP
+#define ICU4XTimeLength_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XTimeLength.h"
+
+
+
+/**
+ * See the [Rust documentation for `Time`](https://docs.rs/icu/latest/icu/datetime/options/length/enum.Time.html) for more information.
+ */
+enum struct ICU4XTimeLength {
+ Full = 0,
+ Long = 1,
+ Medium = 2,
+ Short = 3,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTimeZoneFormatter.h b/intl/icu_capi/cpp/include/ICU4XTimeZoneFormatter.h
new file mode 100644
index 0000000000..5eb1299543
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTimeZoneFormatter.h
@@ -0,0 +1,53 @@
+#ifndef ICU4XTimeZoneFormatter_H
+#define ICU4XTimeZoneFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XTimeZoneFormatter ICU4XTimeZoneFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError.h"
+#include "ICU4XIsoTimeZoneOptions.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XCustomTimeZone.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError ICU4XTimeZoneFormatter_create_with_localized_gmt_fallback(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError ICU4XTimeZoneFormatter_create_with_iso_8601_fallback(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XIsoTimeZoneOptions options);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_generic_non_location_long(ICU4XTimeZoneFormatter* self, const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_generic_non_location_short(ICU4XTimeZoneFormatter* self, const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_specific_non_location_long(ICU4XTimeZoneFormatter* self, const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_specific_non_location_short(ICU4XTimeZoneFormatter* self, const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_generic_location_format(ICU4XTimeZoneFormatter* self, const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_include_localized_gmt_format(ICU4XTimeZoneFormatter* self);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_iso_8601_format(ICU4XTimeZoneFormatter* self, ICU4XIsoTimeZoneOptions options);
+
+diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_format_custom_time_zone(const ICU4XTimeZoneFormatter* self, const ICU4XCustomTimeZone* value, DiplomatWriteable* write);
+void ICU4XTimeZoneFormatter_destroy(ICU4XTimeZoneFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTimeZoneFormatter.hpp b/intl/icu_capi/cpp/include/ICU4XTimeZoneFormatter.hpp
new file mode 100644
index 0000000000..5e461ec916
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTimeZoneFormatter.hpp
@@ -0,0 +1,256 @@
+#ifndef ICU4XTimeZoneFormatter_HPP
+#define ICU4XTimeZoneFormatter_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XTimeZoneFormatter.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+class ICU4XTimeZoneFormatter;
+#include "ICU4XError.hpp"
+struct ICU4XIsoTimeZoneOptions;
+class ICU4XCustomTimeZone;
+
+/**
+ * A destruction policy for using ICU4XTimeZoneFormatter with std::unique_ptr.
+ */
+struct ICU4XTimeZoneFormatterDeleter {
+ void operator()(capi::ICU4XTimeZoneFormatter* l) const noexcept {
+ capi::ICU4XTimeZoneFormatter_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X TimeZoneFormatter object capable of formatting an [`ICU4XCustomTimeZone`] type (and others) as a string
+ *
+ * See the [Rust documentation for `TimeZoneFormatter`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html) for more information.
+ */
+class ICU4XTimeZoneFormatter {
+ public:
+
+ /**
+ * Creates a new [`ICU4XTimeZoneFormatter`] from locale data.
+ *
+ * Uses localized GMT as the fallback format.
+ *
+ * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.try_new) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/datetime/time_zone/enum.FallbackFormat.html)
+ */
+ static diplomat::result<ICU4XTimeZoneFormatter, ICU4XError> create_with_localized_gmt_fallback(const ICU4XDataProvider& provider, const ICU4XLocale& locale);
+
+ /**
+ * Creates a new [`ICU4XTimeZoneFormatter`] from locale data.
+ *
+ * Uses ISO-8601 as the fallback format.
+ *
+ * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.try_new) for more information.
+ *
+ * Additional information: [1](https://docs.rs/icu/latest/icu/datetime/time_zone/enum.FallbackFormat.html)
+ */
+ static diplomat::result<ICU4XTimeZoneFormatter, ICU4XError> create_with_iso_8601_fallback(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XIsoTimeZoneOptions options);
+
+ /**
+ * Loads generic non-location long format. Example: "Pacific Time"
+ *
+ * See the [Rust documentation for `include_generic_non_location_long`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_non_location_long) for more information.
+ */
+ diplomat::result<std::monostate, ICU4XError> load_generic_non_location_long(const ICU4XDataProvider& provider);
+
+ /**
+ * Loads generic non-location short format. Example: "PT"
+ *
+ * See the [Rust documentation for `include_generic_non_location_short`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_non_location_short) for more information.
+ */
+ diplomat::result<std::monostate, ICU4XError> load_generic_non_location_short(const ICU4XDataProvider& provider);
+
+ /**
+ * Loads specific non-location long format. Example: "Pacific Standard Time"
+ *
+ * See the [Rust documentation for `include_specific_non_location_long`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_specific_non_location_long) for more information.
+ */
+ diplomat::result<std::monostate, ICU4XError> load_specific_non_location_long(const ICU4XDataProvider& provider);
+
+ /**
+ * Loads specific non-location short format. Example: "PST"
+ *
+ * See the [Rust documentation for `include_specific_non_location_short`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_specific_non_location_short) for more information.
+ */
+ diplomat::result<std::monostate, ICU4XError> load_specific_non_location_short(const ICU4XDataProvider& provider);
+
+ /**
+ * Loads generic location format. Example: "Los Angeles Time"
+ *
+ * See the [Rust documentation for `include_generic_location_format`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_location_format) for more information.
+ */
+ diplomat::result<std::monostate, ICU4XError> load_generic_location_format(const ICU4XDataProvider& provider);
+
+ /**
+ * Loads localized GMT format. Example: "GMT-07:00"
+ *
+ * See the [Rust documentation for `include_localized_gmt_format`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_localized_gmt_format) for more information.
+ */
+ diplomat::result<std::monostate, ICU4XError> include_localized_gmt_format();
+
+ /**
+ * Loads ISO-8601 format. Example: "-07:00"
+ *
+ * See the [Rust documentation for `include_iso_8601_format`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_iso_8601_format) for more information.
+ */
+ diplomat::result<std::monostate, ICU4XError> load_iso_8601_format(ICU4XIsoTimeZoneOptions options);
+
+ /**
+ * Formats a [`ICU4XCustomTimeZone`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format) for more information.
+ *
+ * See the [Rust documentation for `format_to_string`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format_to_string) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_custom_time_zone_to_writeable(const ICU4XCustomTimeZone& value, W& write) const;
+
+ /**
+ * Formats a [`ICU4XCustomTimeZone`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format) for more information.
+ *
+ * See the [Rust documentation for `format_to_string`](https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format_to_string) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_custom_time_zone(const ICU4XCustomTimeZone& value) const;
+ inline const capi::ICU4XTimeZoneFormatter* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XTimeZoneFormatter* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XTimeZoneFormatter(capi::ICU4XTimeZoneFormatter* i) : inner(i) {}
+ ICU4XTimeZoneFormatter() = default;
+ ICU4XTimeZoneFormatter(ICU4XTimeZoneFormatter&&) noexcept = default;
+ ICU4XTimeZoneFormatter& operator=(ICU4XTimeZoneFormatter&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XTimeZoneFormatter, ICU4XTimeZoneFormatterDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+#include "ICU4XIsoTimeZoneOptions.hpp"
+#include "ICU4XCustomTimeZone.hpp"
+
+inline diplomat::result<ICU4XTimeZoneFormatter, ICU4XError> ICU4XTimeZoneFormatter::create_with_localized_gmt_fallback(const ICU4XDataProvider& provider, const ICU4XLocale& locale) {
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeZoneFormatter_create_with_localized_gmt_fallback(provider.AsFFI(), locale.AsFFI());
+ diplomat::result<ICU4XTimeZoneFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XTimeZoneFormatter>(ICU4XTimeZoneFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XTimeZoneFormatter, ICU4XError> ICU4XTimeZoneFormatter::create_with_iso_8601_fallback(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XIsoTimeZoneOptions options) {
+ ICU4XIsoTimeZoneOptions diplomat_wrapped_struct_options = options;
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeZoneFormatter_create_with_iso_8601_fallback(provider.AsFFI(), locale.AsFFI(), capi::ICU4XIsoTimeZoneOptions{ .format = static_cast<capi::ICU4XIsoTimeZoneFormat>(diplomat_wrapped_struct_options.format), .minutes = static_cast<capi::ICU4XIsoTimeZoneMinuteDisplay>(diplomat_wrapped_struct_options.minutes), .seconds = static_cast<capi::ICU4XIsoTimeZoneSecondDisplay>(diplomat_wrapped_struct_options.seconds) });
+ diplomat::result<ICU4XTimeZoneFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XTimeZoneFormatter>(ICU4XTimeZoneFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XTimeZoneFormatter::load_generic_non_location_long(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeZoneFormatter_load_generic_non_location_long(this->inner.get(), provider.AsFFI());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XTimeZoneFormatter::load_generic_non_location_short(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeZoneFormatter_load_generic_non_location_short(this->inner.get(), provider.AsFFI());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XTimeZoneFormatter::load_specific_non_location_long(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeZoneFormatter_load_specific_non_location_long(this->inner.get(), provider.AsFFI());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XTimeZoneFormatter::load_specific_non_location_short(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeZoneFormatter_load_specific_non_location_short(this->inner.get(), provider.AsFFI());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XTimeZoneFormatter::load_generic_location_format(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeZoneFormatter_load_generic_location_format(this->inner.get(), provider.AsFFI());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XTimeZoneFormatter::include_localized_gmt_format() {
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeZoneFormatter_include_localized_gmt_format(this->inner.get());
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::monostate, ICU4XError> ICU4XTimeZoneFormatter::load_iso_8601_format(ICU4XIsoTimeZoneOptions options) {
+ ICU4XIsoTimeZoneOptions diplomat_wrapped_struct_options = options;
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeZoneFormatter_load_iso_8601_format(this->inner.get(), capi::ICU4XIsoTimeZoneOptions{ .format = static_cast<capi::ICU4XIsoTimeZoneFormat>(diplomat_wrapped_struct_options.format), .minutes = static_cast<capi::ICU4XIsoTimeZoneMinuteDisplay>(diplomat_wrapped_struct_options.minutes), .seconds = static_cast<capi::ICU4XIsoTimeZoneSecondDisplay>(diplomat_wrapped_struct_options.seconds) });
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XTimeZoneFormatter::format_custom_time_zone_to_writeable(const ICU4XCustomTimeZone& value, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeZoneFormatter_format_custom_time_zone(this->inner.get(), value.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XTimeZoneFormatter::format_custom_time_zone(const ICU4XCustomTimeZone& value) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XTimeZoneFormatter_format_custom_time_zone(this->inner.get(), value.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTitlecaseMapper.h b/intl/icu_capi/cpp/include/ICU4XTitlecaseMapper.h
new file mode 100644
index 0000000000..04debefbf9
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTitlecaseMapper.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XTitlecaseMapper_H
+#define ICU4XTitlecaseMapper_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XTitlecaseMapper ICU4XTitlecaseMapper;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.h"
+#include "ICU4XLocale.h"
+#include "ICU4XTitlecaseOptionsV1.h"
+#include "diplomat_result_void_ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError ICU4XTitlecaseMapper_create(const ICU4XDataProvider* provider);
+
+diplomat_result_void_ICU4XError ICU4XTitlecaseMapper_titlecase_segment_v1(const ICU4XTitlecaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, ICU4XTitlecaseOptionsV1 options, DiplomatWriteable* write);
+void ICU4XTitlecaseMapper_destroy(ICU4XTitlecaseMapper* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTitlecaseMapper.hpp b/intl/icu_capi/cpp/include/ICU4XTitlecaseMapper.hpp
new file mode 100644
index 0000000000..c0138d94b8
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTitlecaseMapper.hpp
@@ -0,0 +1,108 @@
+#ifndef ICU4XTitlecaseMapper_HPP
+#define ICU4XTitlecaseMapper_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XTitlecaseMapper.h"
+
+class ICU4XDataProvider;
+class ICU4XTitlecaseMapper;
+#include "ICU4XError.hpp"
+class ICU4XLocale;
+struct ICU4XTitlecaseOptionsV1;
+
+/**
+ * A destruction policy for using ICU4XTitlecaseMapper with std::unique_ptr.
+ */
+struct ICU4XTitlecaseMapperDeleter {
+ void operator()(capi::ICU4XTitlecaseMapper* l) const noexcept {
+ capi::ICU4XTitlecaseMapper_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `TitlecaseMapper`](https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html) for more information.
+ */
+class ICU4XTitlecaseMapper {
+ public:
+
+ /**
+ * Construct a new `ICU4XTitlecaseMapper` instance
+ *
+ * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.new) for more information.
+ */
+ static diplomat::result<ICU4XTitlecaseMapper, ICU4XError> create(const ICU4XDataProvider& provider);
+
+ /**
+ * Returns the full titlecase mapping of the given string
+ *
+ * The `v1` refers to the version of the options struct, which may change as we add more options
+ *
+ * See the [Rust documentation for `titlecase_segment`](https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.titlecase_segment) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> titlecase_segment_v1_to_writeable(const std::string_view s, const ICU4XLocale& locale, ICU4XTitlecaseOptionsV1 options, W& write) const;
+
+ /**
+ * Returns the full titlecase mapping of the given string
+ *
+ * The `v1` refers to the version of the options struct, which may change as we add more options
+ *
+ * See the [Rust documentation for `titlecase_segment`](https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.titlecase_segment) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> titlecase_segment_v1(const std::string_view s, const ICU4XLocale& locale, ICU4XTitlecaseOptionsV1 options) const;
+ inline const capi::ICU4XTitlecaseMapper* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XTitlecaseMapper* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XTitlecaseMapper(capi::ICU4XTitlecaseMapper* i) : inner(i) {}
+ ICU4XTitlecaseMapper() = default;
+ ICU4XTitlecaseMapper(ICU4XTitlecaseMapper&&) noexcept = default;
+ ICU4XTitlecaseMapper& operator=(ICU4XTitlecaseMapper&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XTitlecaseMapper, ICU4XTitlecaseMapperDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+#include "ICU4XTitlecaseOptionsV1.hpp"
+
+inline diplomat::result<ICU4XTitlecaseMapper, ICU4XError> ICU4XTitlecaseMapper::create(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XTitlecaseMapper_create(provider.AsFFI());
+ diplomat::result<ICU4XTitlecaseMapper, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XTitlecaseMapper>(ICU4XTitlecaseMapper(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XTitlecaseMapper::titlecase_segment_v1_to_writeable(const std::string_view s, const ICU4XLocale& locale, ICU4XTitlecaseOptionsV1 options, W& write) const {
+ ICU4XTitlecaseOptionsV1 diplomat_wrapped_struct_options = options;
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XTitlecaseMapper_titlecase_segment_v1(this->inner.get(), s.data(), s.size(), locale.AsFFI(), capi::ICU4XTitlecaseOptionsV1{ .leading_adjustment = static_cast<capi::ICU4XLeadingAdjustment>(diplomat_wrapped_struct_options.leading_adjustment), .trailing_case = static_cast<capi::ICU4XTrailingCase>(diplomat_wrapped_struct_options.trailing_case) }, &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XTitlecaseMapper::titlecase_segment_v1(const std::string_view s, const ICU4XLocale& locale, ICU4XTitlecaseOptionsV1 options) const {
+ ICU4XTitlecaseOptionsV1 diplomat_wrapped_struct_options = options;
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XTitlecaseMapper_titlecase_segment_v1(this->inner.get(), s.data(), s.size(), locale.AsFFI(), capi::ICU4XTitlecaseOptionsV1{ .leading_adjustment = static_cast<capi::ICU4XLeadingAdjustment>(diplomat_wrapped_struct_options.leading_adjustment), .trailing_case = static_cast<capi::ICU4XTrailingCase>(diplomat_wrapped_struct_options.trailing_case) }, &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTitlecaseOptionsV1.h b/intl/icu_capi/cpp/include/ICU4XTitlecaseOptionsV1.h
new file mode 100644
index 0000000000..a828188560
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTitlecaseOptionsV1.h
@@ -0,0 +1,36 @@
+#ifndef ICU4XTitlecaseOptionsV1_H
+#define ICU4XTitlecaseOptionsV1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XLeadingAdjustment.h"
+#include "ICU4XTrailingCase.h"
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XTitlecaseOptionsV1 {
+ ICU4XLeadingAdjustment leading_adjustment;
+ ICU4XTrailingCase trailing_case;
+} ICU4XTitlecaseOptionsV1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XLeadingAdjustment.h"
+#include "ICU4XTrailingCase.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+ICU4XTitlecaseOptionsV1 ICU4XTitlecaseOptionsV1_default_options();
+void ICU4XTitlecaseOptionsV1_destroy(ICU4XTitlecaseOptionsV1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTitlecaseOptionsV1.hpp b/intl/icu_capi/cpp/include/ICU4XTitlecaseOptionsV1.hpp
new file mode 100644
index 0000000000..dd8816816b
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTitlecaseOptionsV1.hpp
@@ -0,0 +1,38 @@
+#ifndef ICU4XTitlecaseOptionsV1_HPP
+#define ICU4XTitlecaseOptionsV1_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XTitlecaseOptionsV1.h"
+
+#include "ICU4XLeadingAdjustment.hpp"
+#include "ICU4XTrailingCase.hpp"
+struct ICU4XTitlecaseOptionsV1;
+
+
+/**
+ * See the [Rust documentation for `TitlecaseOptions`](https://docs.rs/icu/latest/icu/casemap/titlecase/struct.TitlecaseOptions.html) for more information.
+ */
+struct ICU4XTitlecaseOptionsV1 {
+ public:
+ ICU4XLeadingAdjustment leading_adjustment;
+ ICU4XTrailingCase trailing_case;
+
+ /**
+ * See the [Rust documentation for `default`](https://docs.rs/icu/latest/icu/casemap/titlecase/struct.TitlecaseOptions.html#method.default) for more information.
+ */
+ static ICU4XTitlecaseOptionsV1 default_options();
+};
+
+
+inline ICU4XTitlecaseOptionsV1 ICU4XTitlecaseOptionsV1::default_options() {
+ capi::ICU4XTitlecaseOptionsV1 diplomat_raw_struct_out_value = capi::ICU4XTitlecaseOptionsV1_default_options();
+ return ICU4XTitlecaseOptionsV1{ .leading_adjustment = std::move(static_cast<ICU4XLeadingAdjustment>(diplomat_raw_struct_out_value.leading_adjustment)), .trailing_case = std::move(static_cast<ICU4XTrailingCase>(diplomat_raw_struct_out_value.trailing_case)) };
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTrailingCase.h b/intl/icu_capi/cpp/include/ICU4XTrailingCase.h
new file mode 100644
index 0000000000..d8957e0088
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTrailingCase.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XTrailingCase_H
+#define ICU4XTrailingCase_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XTrailingCase {
+ ICU4XTrailingCase_Lower = 0,
+ ICU4XTrailingCase_Unchanged = 1,
+} ICU4XTrailingCase;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XTrailingCase_destroy(ICU4XTrailingCase* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTrailingCase.hpp b/intl/icu_capi/cpp/include/ICU4XTrailingCase.hpp
new file mode 100644
index 0000000000..7124321156
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTrailingCase.hpp
@@ -0,0 +1,24 @@
+#ifndef ICU4XTrailingCase_HPP
+#define ICU4XTrailingCase_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XTrailingCase.h"
+
+
+
+/**
+ * See the [Rust documentation for `TrailingCase`](https://docs.rs/icu/latest/icu/casemap/titlecase/enum.TrailingCase.html) for more information.
+ */
+enum struct ICU4XTrailingCase {
+ Lower = 0,
+ Unchanged = 1,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTransformResult.h b/intl/icu_capi/cpp/include/ICU4XTransformResult.h
new file mode 100644
index 0000000000..66b268e266
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTransformResult.h
@@ -0,0 +1,31 @@
+#ifndef ICU4XTransformResult_H
+#define ICU4XTransformResult_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XTransformResult {
+ ICU4XTransformResult_Modified = 0,
+ ICU4XTransformResult_Unmodified = 1,
+} ICU4XTransformResult;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XTransformResult_destroy(ICU4XTransformResult* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XTransformResult.hpp b/intl/icu_capi/cpp/include/ICU4XTransformResult.hpp
new file mode 100644
index 0000000000..106025313b
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XTransformResult.hpp
@@ -0,0 +1,26 @@
+#ifndef ICU4XTransformResult_HPP
+#define ICU4XTransformResult_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XTransformResult.h"
+
+
+
+/**
+ * FFI version of `TransformResult`.
+ *
+ * See the [Rust documentation for `TransformResult`](https://docs.rs/icu/latest/icu/locid_transform/enum.TransformResult.html) for more information.
+ */
+enum struct ICU4XTransformResult {
+ Modified = 0,
+ Unmodified = 1,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XUnicodeSetData.h b/intl/icu_capi/cpp/include/ICU4XUnicodeSetData.h
new file mode 100644
index 0000000000..3e10e53097
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XUnicodeSetData.h
@@ -0,0 +1,48 @@
+#ifndef ICU4XUnicodeSetData_H
+#define ICU4XUnicodeSetData_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XUnicodeSetData ICU4XUnicodeSetData;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.h"
+#include "ICU4XLocale.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+bool ICU4XUnicodeSetData_contains(const ICU4XUnicodeSetData* self, const char* s_data, size_t s_len);
+
+bool ICU4XUnicodeSetData_contains_char(const ICU4XUnicodeSetData* self, char32_t cp);
+
+bool ICU4XUnicodeSetData_contains32(const ICU4XUnicodeSetData* self, uint32_t cp);
+
+diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_basic_emoji(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_main(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_auxiliary(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_punctuation(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_numbers(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_index(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+void ICU4XUnicodeSetData_destroy(ICU4XUnicodeSetData* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XUnicodeSetData.hpp b/intl/icu_capi/cpp/include/ICU4XUnicodeSetData.hpp
new file mode 100644
index 0000000000..87bef74eac
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XUnicodeSetData.hpp
@@ -0,0 +1,170 @@
+#ifndef ICU4XUnicodeSetData_HPP
+#define ICU4XUnicodeSetData_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XUnicodeSetData.h"
+
+class ICU4XDataProvider;
+class ICU4XUnicodeSetData;
+#include "ICU4XError.hpp"
+class ICU4XLocale;
+
+/**
+ * A destruction policy for using ICU4XUnicodeSetData with std::unique_ptr.
+ */
+struct ICU4XUnicodeSetDataDeleter {
+ void operator()(capi::ICU4XUnicodeSetData* l) const noexcept {
+ capi::ICU4XUnicodeSetData_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property.
+ *
+ * See the [Rust documentation for `properties`](https://docs.rs/icu/latest/icu/properties/index.html) for more information.
+ *
+ * See the [Rust documentation for `UnicodeSetData`](https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetData.html) for more information.
+ *
+ * See the [Rust documentation for `UnicodeSetDataBorrowed`](https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html) for more information.
+ */
+class ICU4XUnicodeSetData {
+ public:
+
+ /**
+ * Checks whether the string is in the set.
+ *
+ * See the [Rust documentation for `contains`](https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html#method.contains) for more information.
+ */
+ bool contains(const std::string_view s) const;
+
+ /**
+ * Checks whether the code point is in the set.
+ *
+ * See the [Rust documentation for `contains_char`](https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html#method.contains_char) for more information.
+ */
+ bool contains_char(char32_t cp) const;
+
+ /**
+ * Checks whether the code point (specified as a 32 bit integer, in UTF-32) is in the set.
+ */
+ bool contains32(uint32_t cp) const;
+
+ /**
+ * See the [Rust documentation for `basic_emoji`](https://docs.rs/icu/latest/icu/properties/sets/fn.basic_emoji.html) for more information.
+ */
+ static diplomat::result<ICU4XUnicodeSetData, ICU4XError> load_basic_emoji(const ICU4XDataProvider& provider);
+
+ /**
+ * See the [Rust documentation for `exemplars_main`](https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_main.html) for more information.
+ */
+ static diplomat::result<ICU4XUnicodeSetData, ICU4XError> load_exemplars_main(const ICU4XDataProvider& provider, const ICU4XLocale& locale);
+
+ /**
+ * See the [Rust documentation for `exemplars_auxiliary`](https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_auxiliary.html) for more information.
+ */
+ static diplomat::result<ICU4XUnicodeSetData, ICU4XError> load_exemplars_auxiliary(const ICU4XDataProvider& provider, const ICU4XLocale& locale);
+
+ /**
+ * See the [Rust documentation for `exemplars_punctuation`](https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_punctuation.html) for more information.
+ */
+ static diplomat::result<ICU4XUnicodeSetData, ICU4XError> load_exemplars_punctuation(const ICU4XDataProvider& provider, const ICU4XLocale& locale);
+
+ /**
+ * See the [Rust documentation for `exemplars_numbers`](https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_numbers.html) for more information.
+ */
+ static diplomat::result<ICU4XUnicodeSetData, ICU4XError> load_exemplars_numbers(const ICU4XDataProvider& provider, const ICU4XLocale& locale);
+
+ /**
+ * See the [Rust documentation for `exemplars_index`](https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_index.html) for more information.
+ */
+ static diplomat::result<ICU4XUnicodeSetData, ICU4XError> load_exemplars_index(const ICU4XDataProvider& provider, const ICU4XLocale& locale);
+ inline const capi::ICU4XUnicodeSetData* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XUnicodeSetData* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XUnicodeSetData(capi::ICU4XUnicodeSetData* i) : inner(i) {}
+ ICU4XUnicodeSetData() = default;
+ ICU4XUnicodeSetData(ICU4XUnicodeSetData&&) noexcept = default;
+ ICU4XUnicodeSetData& operator=(ICU4XUnicodeSetData&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XUnicodeSetData, ICU4XUnicodeSetDataDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+
+inline bool ICU4XUnicodeSetData::contains(const std::string_view s) const {
+ return capi::ICU4XUnicodeSetData_contains(this->inner.get(), s.data(), s.size());
+}
+inline bool ICU4XUnicodeSetData::contains_char(char32_t cp) const {
+ return capi::ICU4XUnicodeSetData_contains_char(this->inner.get(), cp);
+}
+inline bool ICU4XUnicodeSetData::contains32(uint32_t cp) const {
+ return capi::ICU4XUnicodeSetData_contains32(this->inner.get(), cp);
+}
+inline diplomat::result<ICU4XUnicodeSetData, ICU4XError> ICU4XUnicodeSetData::load_basic_emoji(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XUnicodeSetData_load_basic_emoji(provider.AsFFI());
+ diplomat::result<ICU4XUnicodeSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XUnicodeSetData>(ICU4XUnicodeSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XUnicodeSetData, ICU4XError> ICU4XUnicodeSetData::load_exemplars_main(const ICU4XDataProvider& provider, const ICU4XLocale& locale) {
+ auto diplomat_result_raw_out_value = capi::ICU4XUnicodeSetData_load_exemplars_main(provider.AsFFI(), locale.AsFFI());
+ diplomat::result<ICU4XUnicodeSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XUnicodeSetData>(ICU4XUnicodeSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XUnicodeSetData, ICU4XError> ICU4XUnicodeSetData::load_exemplars_auxiliary(const ICU4XDataProvider& provider, const ICU4XLocale& locale) {
+ auto diplomat_result_raw_out_value = capi::ICU4XUnicodeSetData_load_exemplars_auxiliary(provider.AsFFI(), locale.AsFFI());
+ diplomat::result<ICU4XUnicodeSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XUnicodeSetData>(ICU4XUnicodeSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XUnicodeSetData, ICU4XError> ICU4XUnicodeSetData::load_exemplars_punctuation(const ICU4XDataProvider& provider, const ICU4XLocale& locale) {
+ auto diplomat_result_raw_out_value = capi::ICU4XUnicodeSetData_load_exemplars_punctuation(provider.AsFFI(), locale.AsFFI());
+ diplomat::result<ICU4XUnicodeSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XUnicodeSetData>(ICU4XUnicodeSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XUnicodeSetData, ICU4XError> ICU4XUnicodeSetData::load_exemplars_numbers(const ICU4XDataProvider& provider, const ICU4XLocale& locale) {
+ auto diplomat_result_raw_out_value = capi::ICU4XUnicodeSetData_load_exemplars_numbers(provider.AsFFI(), locale.AsFFI());
+ diplomat::result<ICU4XUnicodeSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XUnicodeSetData>(ICU4XUnicodeSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XUnicodeSetData, ICU4XError> ICU4XUnicodeSetData::load_exemplars_index(const ICU4XDataProvider& provider, const ICU4XLocale& locale) {
+ auto diplomat_result_raw_out_value = capi::ICU4XUnicodeSetData_load_exemplars_index(provider.AsFFI(), locale.AsFFI());
+ diplomat::result<ICU4XUnicodeSetData, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XUnicodeSetData>(ICU4XUnicodeSetData(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XWeekCalculator.h b/intl/icu_capi/cpp/include/ICU4XWeekCalculator.h
new file mode 100644
index 0000000000..02a52c6e87
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XWeekCalculator.h
@@ -0,0 +1,39 @@
+#ifndef ICU4XWeekCalculator_H
+#define ICU4XWeekCalculator_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XWeekCalculator ICU4XWeekCalculator;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "diplomat_result_box_ICU4XWeekCalculator_ICU4XError.h"
+#include "ICU4XIsoWeekday.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XWeekCalculator_ICU4XError ICU4XWeekCalculator_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale);
+
+ICU4XWeekCalculator* ICU4XWeekCalculator_create_from_first_day_of_week_and_min_week_days(ICU4XIsoWeekday first_weekday, uint8_t min_week_days);
+
+ICU4XIsoWeekday ICU4XWeekCalculator_first_weekday(const ICU4XWeekCalculator* self);
+
+uint8_t ICU4XWeekCalculator_min_week_days(const ICU4XWeekCalculator* self);
+void ICU4XWeekCalculator_destroy(ICU4XWeekCalculator* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XWeekCalculator.hpp b/intl/icu_capi/cpp/include/ICU4XWeekCalculator.hpp
new file mode 100644
index 0000000000..ace3c97c4f
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XWeekCalculator.hpp
@@ -0,0 +1,95 @@
+#ifndef ICU4XWeekCalculator_HPP
+#define ICU4XWeekCalculator_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XWeekCalculator.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+class ICU4XWeekCalculator;
+#include "ICU4XError.hpp"
+#include "ICU4XIsoWeekday.hpp"
+
+/**
+ * A destruction policy for using ICU4XWeekCalculator with std::unique_ptr.
+ */
+struct ICU4XWeekCalculatorDeleter {
+ void operator()(capi::ICU4XWeekCalculator* l) const noexcept {
+ capi::ICU4XWeekCalculator_destroy(l);
+ }
+};
+
+/**
+ * A Week calculator, useful to be passed in to `week_of_year()` on Date and DateTime types
+ *
+ * See the [Rust documentation for `WeekCalculator`](https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html) for more information.
+ */
+class ICU4XWeekCalculator {
+ public:
+
+ /**
+ * Creates a new [`ICU4XWeekCalculator`] from locale data.
+ *
+ * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#method.try_new) for more information.
+ */
+ static diplomat::result<ICU4XWeekCalculator, ICU4XError> create(const ICU4XDataProvider& provider, const ICU4XLocale& locale);
+
+ /**
+ * Additional information: [1](https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.first_weekday), [2](https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.min_week_days)
+ */
+ static ICU4XWeekCalculator create_from_first_day_of_week_and_min_week_days(ICU4XIsoWeekday first_weekday, uint8_t min_week_days);
+
+ /**
+ * Returns the weekday that starts the week for this object's locale
+ *
+ * See the [Rust documentation for `first_weekday`](https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.first_weekday) for more information.
+ */
+ ICU4XIsoWeekday first_weekday() const;
+
+ /**
+ * The minimum number of days overlapping a year required for a week to be
+ * considered part of that year
+ *
+ * See the [Rust documentation for `min_week_days`](https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.min_week_days) for more information.
+ */
+ uint8_t min_week_days() const;
+ inline const capi::ICU4XWeekCalculator* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XWeekCalculator* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XWeekCalculator(capi::ICU4XWeekCalculator* i) : inner(i) {}
+ ICU4XWeekCalculator() = default;
+ ICU4XWeekCalculator(ICU4XWeekCalculator&&) noexcept = default;
+ ICU4XWeekCalculator& operator=(ICU4XWeekCalculator&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XWeekCalculator, ICU4XWeekCalculatorDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+
+inline diplomat::result<ICU4XWeekCalculator, ICU4XError> ICU4XWeekCalculator::create(const ICU4XDataProvider& provider, const ICU4XLocale& locale) {
+ auto diplomat_result_raw_out_value = capi::ICU4XWeekCalculator_create(provider.AsFFI(), locale.AsFFI());
+ diplomat::result<ICU4XWeekCalculator, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XWeekCalculator>(ICU4XWeekCalculator(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XWeekCalculator ICU4XWeekCalculator::create_from_first_day_of_week_and_min_week_days(ICU4XIsoWeekday first_weekday, uint8_t min_week_days) {
+ return ICU4XWeekCalculator(capi::ICU4XWeekCalculator_create_from_first_day_of_week_and_min_week_days(static_cast<capi::ICU4XIsoWeekday>(first_weekday), min_week_days));
+}
+inline ICU4XIsoWeekday ICU4XWeekCalculator::first_weekday() const {
+ return static_cast<ICU4XIsoWeekday>(capi::ICU4XWeekCalculator_first_weekday(this->inner.get()));
+}
+inline uint8_t ICU4XWeekCalculator::min_week_days() const {
+ return capi::ICU4XWeekCalculator_min_week_days(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XWeekOf.h b/intl/icu_capi/cpp/include/ICU4XWeekOf.h
new file mode 100644
index 0000000000..5441b943d4
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XWeekOf.h
@@ -0,0 +1,33 @@
+#ifndef ICU4XWeekOf_H
+#define ICU4XWeekOf_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XWeekRelativeUnit.h"
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XWeekOf {
+ uint16_t week;
+ ICU4XWeekRelativeUnit unit;
+} ICU4XWeekOf;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XWeekRelativeUnit.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XWeekOf_destroy(ICU4XWeekOf* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XWeekOf.hpp b/intl/icu_capi/cpp/include/ICU4XWeekOf.hpp
new file mode 100644
index 0000000000..f0badc2bfb
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XWeekOf.hpp
@@ -0,0 +1,27 @@
+#ifndef ICU4XWeekOf_HPP
+#define ICU4XWeekOf_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XWeekOf.h"
+
+#include "ICU4XWeekRelativeUnit.hpp"
+
+
+/**
+ * See the [Rust documentation for `WeekOf`](https://docs.rs/icu/latest/icu/calendar/week/struct.WeekOf.html) for more information.
+ */
+struct ICU4XWeekOf {
+ public:
+ uint16_t week;
+ ICU4XWeekRelativeUnit unit;
+};
+
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XWeekRelativeUnit.h b/intl/icu_capi/cpp/include/ICU4XWeekRelativeUnit.h
new file mode 100644
index 0000000000..ee6802dc3b
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XWeekRelativeUnit.h
@@ -0,0 +1,32 @@
+#ifndef ICU4XWeekRelativeUnit_H
+#define ICU4XWeekRelativeUnit_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef enum ICU4XWeekRelativeUnit {
+ ICU4XWeekRelativeUnit_Previous = 0,
+ ICU4XWeekRelativeUnit_Current = 1,
+ ICU4XWeekRelativeUnit_Next = 2,
+} ICU4XWeekRelativeUnit;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+void ICU4XWeekRelativeUnit_destroy(ICU4XWeekRelativeUnit* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XWeekRelativeUnit.hpp b/intl/icu_capi/cpp/include/ICU4XWeekRelativeUnit.hpp
new file mode 100644
index 0000000000..f0862f0d32
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XWeekRelativeUnit.hpp
@@ -0,0 +1,25 @@
+#ifndef ICU4XWeekRelativeUnit_HPP
+#define ICU4XWeekRelativeUnit_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XWeekRelativeUnit.h"
+
+
+
+/**
+ * See the [Rust documentation for `RelativeUnit`](https://docs.rs/icu/latest/icu/calendar/week/enum.RelativeUnit.html) for more information.
+ */
+enum struct ICU4XWeekRelativeUnit {
+ Previous = 0,
+ Current = 1,
+ Next = 2,
+};
+
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.h b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.h
new file mode 100644
index 0000000000..112025bdf5
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XWordBreakIteratorLatin1_H
+#define ICU4XWordBreakIteratorLatin1_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XWordBreakIteratorLatin1 ICU4XWordBreakIteratorLatin1;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XSegmenterWordType.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XWordBreakIteratorLatin1_next(ICU4XWordBreakIteratorLatin1* self);
+
+ICU4XSegmenterWordType ICU4XWordBreakIteratorLatin1_word_type(const ICU4XWordBreakIteratorLatin1* self);
+
+bool ICU4XWordBreakIteratorLatin1_is_word_like(const ICU4XWordBreakIteratorLatin1* self);
+void ICU4XWordBreakIteratorLatin1_destroy(ICU4XWordBreakIteratorLatin1* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp
new file mode 100644
index 0000000000..83c8f0ef7e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp
@@ -0,0 +1,72 @@
+#ifndef ICU4XWordBreakIteratorLatin1_HPP
+#define ICU4XWordBreakIteratorLatin1_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XWordBreakIteratorLatin1.h"
+
+#include "ICU4XSegmenterWordType.hpp"
+
+/**
+ * A destruction policy for using ICU4XWordBreakIteratorLatin1 with std::unique_ptr.
+ */
+struct ICU4XWordBreakIteratorLatin1Deleter {
+ void operator()(capi::ICU4XWordBreakIteratorLatin1* l) const noexcept {
+ capi::ICU4XWordBreakIteratorLatin1_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `WordBreakIterator`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html) for more information.
+ */
+class ICU4XWordBreakIteratorLatin1 {
+ public:
+
+ /**
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ * out of range of a 32-bit signed integer.
+ *
+ * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next) for more information.
+ */
+ int32_t next();
+
+ /**
+ * Return the status value of break boundary.
+ *
+ * See the [Rust documentation for `word_type`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type) for more information.
+ */
+ ICU4XSegmenterWordType word_type() const;
+
+ /**
+ * Return true when break boundary is word-like such as letter/number/CJK
+ *
+ * See the [Rust documentation for `is_word_like`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like) for more information.
+ */
+ bool is_word_like() const;
+ inline const capi::ICU4XWordBreakIteratorLatin1* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XWordBreakIteratorLatin1* AsFFIMut() { return this->inner.get(); }
+ inline explicit ICU4XWordBreakIteratorLatin1(capi::ICU4XWordBreakIteratorLatin1* i) : inner(i) {}
+ ICU4XWordBreakIteratorLatin1() = default;
+ ICU4XWordBreakIteratorLatin1(ICU4XWordBreakIteratorLatin1&&) noexcept = default;
+ ICU4XWordBreakIteratorLatin1& operator=(ICU4XWordBreakIteratorLatin1&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XWordBreakIteratorLatin1, ICU4XWordBreakIteratorLatin1Deleter> inner;
+};
+
+
+inline int32_t ICU4XWordBreakIteratorLatin1::next() {
+ return capi::ICU4XWordBreakIteratorLatin1_next(this->inner.get());
+}
+inline ICU4XSegmenterWordType ICU4XWordBreakIteratorLatin1::word_type() const {
+ return static_cast<ICU4XSegmenterWordType>(capi::ICU4XWordBreakIteratorLatin1_word_type(this->inner.get()));
+}
+inline bool ICU4XWordBreakIteratorLatin1::is_word_like() const {
+ return capi::ICU4XWordBreakIteratorLatin1_is_word_like(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.h b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.h
new file mode 100644
index 0000000000..676aea3cff
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XWordBreakIteratorUtf16_H
+#define ICU4XWordBreakIteratorUtf16_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XWordBreakIteratorUtf16 ICU4XWordBreakIteratorUtf16;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XSegmenterWordType.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XWordBreakIteratorUtf16_next(ICU4XWordBreakIteratorUtf16* self);
+
+ICU4XSegmenterWordType ICU4XWordBreakIteratorUtf16_word_type(const ICU4XWordBreakIteratorUtf16* self);
+
+bool ICU4XWordBreakIteratorUtf16_is_word_like(const ICU4XWordBreakIteratorUtf16* self);
+void ICU4XWordBreakIteratorUtf16_destroy(ICU4XWordBreakIteratorUtf16* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp
new file mode 100644
index 0000000000..38abe0fe2b
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp
@@ -0,0 +1,72 @@
+#ifndef ICU4XWordBreakIteratorUtf16_HPP
+#define ICU4XWordBreakIteratorUtf16_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XWordBreakIteratorUtf16.h"
+
+#include "ICU4XSegmenterWordType.hpp"
+
+/**
+ * A destruction policy for using ICU4XWordBreakIteratorUtf16 with std::unique_ptr.
+ */
+struct ICU4XWordBreakIteratorUtf16Deleter {
+ void operator()(capi::ICU4XWordBreakIteratorUtf16* l) const noexcept {
+ capi::ICU4XWordBreakIteratorUtf16_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `WordBreakIterator`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html) for more information.
+ */
+class ICU4XWordBreakIteratorUtf16 {
+ public:
+
+ /**
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ * out of range of a 32-bit signed integer.
+ *
+ * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next) for more information.
+ */
+ int32_t next();
+
+ /**
+ * Return the status value of break boundary.
+ *
+ * See the [Rust documentation for `word_type`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type) for more information.
+ */
+ ICU4XSegmenterWordType word_type() const;
+
+ /**
+ * Return true when break boundary is word-like such as letter/number/CJK
+ *
+ * See the [Rust documentation for `is_word_like`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like) for more information.
+ */
+ bool is_word_like() const;
+ inline const capi::ICU4XWordBreakIteratorUtf16* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XWordBreakIteratorUtf16* AsFFIMut() { return this->inner.get(); }
+ inline explicit ICU4XWordBreakIteratorUtf16(capi::ICU4XWordBreakIteratorUtf16* i) : inner(i) {}
+ ICU4XWordBreakIteratorUtf16() = default;
+ ICU4XWordBreakIteratorUtf16(ICU4XWordBreakIteratorUtf16&&) noexcept = default;
+ ICU4XWordBreakIteratorUtf16& operator=(ICU4XWordBreakIteratorUtf16&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XWordBreakIteratorUtf16, ICU4XWordBreakIteratorUtf16Deleter> inner;
+};
+
+
+inline int32_t ICU4XWordBreakIteratorUtf16::next() {
+ return capi::ICU4XWordBreakIteratorUtf16_next(this->inner.get());
+}
+inline ICU4XSegmenterWordType ICU4XWordBreakIteratorUtf16::word_type() const {
+ return static_cast<ICU4XSegmenterWordType>(capi::ICU4XWordBreakIteratorUtf16_word_type(this->inner.get()));
+}
+inline bool ICU4XWordBreakIteratorUtf16::is_word_like() const {
+ return capi::ICU4XWordBreakIteratorUtf16_is_word_like(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.h b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.h
new file mode 100644
index 0000000000..d8e98fb9b1
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.h
@@ -0,0 +1,34 @@
+#ifndef ICU4XWordBreakIteratorUtf8_H
+#define ICU4XWordBreakIteratorUtf8_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XWordBreakIteratorUtf8 ICU4XWordBreakIteratorUtf8;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XSegmenterWordType.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+int32_t ICU4XWordBreakIteratorUtf8_next(ICU4XWordBreakIteratorUtf8* self);
+
+ICU4XSegmenterWordType ICU4XWordBreakIteratorUtf8_word_type(const ICU4XWordBreakIteratorUtf8* self);
+
+bool ICU4XWordBreakIteratorUtf8_is_word_like(const ICU4XWordBreakIteratorUtf8* self);
+void ICU4XWordBreakIteratorUtf8_destroy(ICU4XWordBreakIteratorUtf8* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp
new file mode 100644
index 0000000000..be47dd1b0d
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp
@@ -0,0 +1,72 @@
+#ifndef ICU4XWordBreakIteratorUtf8_HPP
+#define ICU4XWordBreakIteratorUtf8_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XWordBreakIteratorUtf8.h"
+
+#include "ICU4XSegmenterWordType.hpp"
+
+/**
+ * A destruction policy for using ICU4XWordBreakIteratorUtf8 with std::unique_ptr.
+ */
+struct ICU4XWordBreakIteratorUtf8Deleter {
+ void operator()(capi::ICU4XWordBreakIteratorUtf8* l) const noexcept {
+ capi::ICU4XWordBreakIteratorUtf8_destroy(l);
+ }
+};
+
+/**
+ * See the [Rust documentation for `WordBreakIterator`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html) for more information.
+ */
+class ICU4XWordBreakIteratorUtf8 {
+ public:
+
+ /**
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ * out of range of a 32-bit signed integer.
+ *
+ * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next) for more information.
+ */
+ int32_t next();
+
+ /**
+ * Return the status value of break boundary.
+ *
+ * See the [Rust documentation for `word_type`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type) for more information.
+ */
+ ICU4XSegmenterWordType word_type() const;
+
+ /**
+ * Return true when break boundary is word-like such as letter/number/CJK
+ *
+ * See the [Rust documentation for `is_word_like`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like) for more information.
+ */
+ bool is_word_like() const;
+ inline const capi::ICU4XWordBreakIteratorUtf8* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XWordBreakIteratorUtf8* AsFFIMut() { return this->inner.get(); }
+ inline explicit ICU4XWordBreakIteratorUtf8(capi::ICU4XWordBreakIteratorUtf8* i) : inner(i) {}
+ ICU4XWordBreakIteratorUtf8() = default;
+ ICU4XWordBreakIteratorUtf8(ICU4XWordBreakIteratorUtf8&&) noexcept = default;
+ ICU4XWordBreakIteratorUtf8& operator=(ICU4XWordBreakIteratorUtf8&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XWordBreakIteratorUtf8, ICU4XWordBreakIteratorUtf8Deleter> inner;
+};
+
+
+inline int32_t ICU4XWordBreakIteratorUtf8::next() {
+ return capi::ICU4XWordBreakIteratorUtf8_next(this->inner.get());
+}
+inline ICU4XSegmenterWordType ICU4XWordBreakIteratorUtf8::word_type() const {
+ return static_cast<ICU4XSegmenterWordType>(capi::ICU4XWordBreakIteratorUtf8_word_type(this->inner.get()));
+}
+inline bool ICU4XWordBreakIteratorUtf8::is_word_like() const {
+ return capi::ICU4XWordBreakIteratorUtf8_is_word_like(this->inner.get());
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XWordSegmenter.h b/intl/icu_capi/cpp/include/ICU4XWordSegmenter.h
new file mode 100644
index 0000000000..5bef9437e0
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XWordSegmenter.h
@@ -0,0 +1,44 @@
+#ifndef ICU4XWordSegmenter_H
+#define ICU4XWordSegmenter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XWordSegmenter ICU4XWordSegmenter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "diplomat_result_box_ICU4XWordSegmenter_ICU4XError.h"
+#include "ICU4XWordBreakIteratorUtf8.h"
+#include "ICU4XWordBreakIteratorUtf16.h"
+#include "ICU4XWordBreakIteratorLatin1.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XWordSegmenter_ICU4XError ICU4XWordSegmenter_create_auto(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XWordSegmenter_ICU4XError ICU4XWordSegmenter_create_lstm(const ICU4XDataProvider* provider);
+
+diplomat_result_box_ICU4XWordSegmenter_ICU4XError ICU4XWordSegmenter_create_dictionary(const ICU4XDataProvider* provider);
+
+ICU4XWordBreakIteratorUtf8* ICU4XWordSegmenter_segment_utf8(const ICU4XWordSegmenter* self, const char* input_data, size_t input_len);
+
+ICU4XWordBreakIteratorUtf16* ICU4XWordSegmenter_segment_utf16(const ICU4XWordSegmenter* self, const uint16_t* input_data, size_t input_len);
+
+ICU4XWordBreakIteratorLatin1* ICU4XWordSegmenter_segment_latin1(const ICU4XWordSegmenter* self, const uint8_t* input_data, size_t input_len);
+void ICU4XWordSegmenter_destroy(ICU4XWordSegmenter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp b/intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp
new file mode 100644
index 0000000000..49734b5a4a
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp
@@ -0,0 +1,148 @@
+#ifndef ICU4XWordSegmenter_HPP
+#define ICU4XWordSegmenter_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XWordSegmenter.h"
+
+class ICU4XDataProvider;
+class ICU4XWordSegmenter;
+#include "ICU4XError.hpp"
+class ICU4XWordBreakIteratorUtf8;
+class ICU4XWordBreakIteratorUtf16;
+class ICU4XWordBreakIteratorLatin1;
+
+/**
+ * A destruction policy for using ICU4XWordSegmenter with std::unique_ptr.
+ */
+struct ICU4XWordSegmenterDeleter {
+ void operator()(capi::ICU4XWordSegmenter* l) const noexcept {
+ capi::ICU4XWordSegmenter_destroy(l);
+ }
+};
+
+/**
+ * An ICU4X word-break segmenter, capable of finding word breakpoints in strings.
+ *
+ * See the [Rust documentation for `WordSegmenter`](https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html) for more information.
+ */
+class ICU4XWordSegmenter {
+ public:
+
+ /**
+ * Construct an [`ICU4XWordSegmenter`] with automatically selecting the best available LSTM
+ * or dictionary payload data.
+ *
+ * Note: currently, it uses dictionary for Chinese and Japanese, and LSTM for Burmese,
+ * Khmer, Lao, and Thai.
+ *
+ * See the [Rust documentation for `new_auto`](https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_auto) for more information.
+ */
+ static diplomat::result<ICU4XWordSegmenter, ICU4XError> create_auto(const ICU4XDataProvider& provider);
+
+ /**
+ * Construct an [`ICU4XWordSegmenter`] with LSTM payload data for Burmese, Khmer, Lao, and
+ * Thai.
+ *
+ * Warning: [`ICU4XWordSegmenter`] created by this function doesn't handle Chinese or
+ * Japanese.
+ *
+ * See the [Rust documentation for `new_lstm`](https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_lstm) for more information.
+ */
+ static diplomat::result<ICU4XWordSegmenter, ICU4XError> create_lstm(const ICU4XDataProvider& provider);
+
+ /**
+ * Construct an [`ICU4XWordSegmenter`] with dictionary payload data for Chinese, Japanese,
+ * Burmese, Khmer, Lao, and Thai.
+ *
+ * See the [Rust documentation for `new_dictionary`](https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_dictionary) for more information.
+ */
+ static diplomat::result<ICU4XWordSegmenter, ICU4XError> create_dictionary(const ICU4XDataProvider& provider);
+
+ /**
+ * Segments a (potentially ill-formed) UTF-8 string.
+ *
+ * See the [Rust documentation for `segment_utf8`](https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_utf8) for more information.
+ *
+ * Lifetimes: `this`, `input` must live at least as long as the output.
+ */
+ ICU4XWordBreakIteratorUtf8 segment_utf8(const std::string_view input) const;
+
+ /**
+ * Segments a UTF-16 string.
+ *
+ * See the [Rust documentation for `segment_utf16`](https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_utf16) for more information.
+ *
+ * Lifetimes: `this`, `input` must live at least as long as the output.
+ */
+ ICU4XWordBreakIteratorUtf16 segment_utf16(const diplomat::span<const uint16_t> input) const;
+
+ /**
+ * Segments a Latin-1 string.
+ *
+ * See the [Rust documentation for `segment_latin1`](https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_latin1) for more information.
+ *
+ * Lifetimes: `this`, `input` must live at least as long as the output.
+ */
+ ICU4XWordBreakIteratorLatin1 segment_latin1(const diplomat::span<const uint8_t> input) const;
+ inline const capi::ICU4XWordSegmenter* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XWordSegmenter* AsFFIMut() { return this->inner.get(); }
+ inline explicit ICU4XWordSegmenter(capi::ICU4XWordSegmenter* i) : inner(i) {}
+ ICU4XWordSegmenter() = default;
+ ICU4XWordSegmenter(ICU4XWordSegmenter&&) noexcept = default;
+ ICU4XWordSegmenter& operator=(ICU4XWordSegmenter&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XWordSegmenter, ICU4XWordSegmenterDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XWordBreakIteratorUtf8.hpp"
+#include "ICU4XWordBreakIteratorUtf16.hpp"
+#include "ICU4XWordBreakIteratorLatin1.hpp"
+
+inline diplomat::result<ICU4XWordSegmenter, ICU4XError> ICU4XWordSegmenter::create_auto(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XWordSegmenter_create_auto(provider.AsFFI());
+ diplomat::result<ICU4XWordSegmenter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XWordSegmenter>(ICU4XWordSegmenter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XWordSegmenter, ICU4XError> ICU4XWordSegmenter::create_lstm(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XWordSegmenter_create_lstm(provider.AsFFI());
+ diplomat::result<ICU4XWordSegmenter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XWordSegmenter>(ICU4XWordSegmenter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XWordSegmenter, ICU4XError> ICU4XWordSegmenter::create_dictionary(const ICU4XDataProvider& provider) {
+ auto diplomat_result_raw_out_value = capi::ICU4XWordSegmenter_create_dictionary(provider.AsFFI());
+ diplomat::result<ICU4XWordSegmenter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XWordSegmenter>(ICU4XWordSegmenter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline ICU4XWordBreakIteratorUtf8 ICU4XWordSegmenter::segment_utf8(const std::string_view input) const {
+ return ICU4XWordBreakIteratorUtf8(capi::ICU4XWordSegmenter_segment_utf8(this->inner.get(), input.data(), input.size()));
+}
+inline ICU4XWordBreakIteratorUtf16 ICU4XWordSegmenter::segment_utf16(const diplomat::span<const uint16_t> input) const {
+ return ICU4XWordBreakIteratorUtf16(capi::ICU4XWordSegmenter_segment_utf16(this->inner.get(), input.data(), input.size()));
+}
+inline ICU4XWordBreakIteratorLatin1 ICU4XWordSegmenter::segment_latin1(const diplomat::span<const uint8_t> input) const {
+ return ICU4XWordBreakIteratorLatin1(capi::ICU4XWordSegmenter_segment_latin1(this->inner.get(), input.data(), input.size()));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XZonedDateTimeFormatter.h b/intl/icu_capi/cpp/include/ICU4XZonedDateTimeFormatter.h
new file mode 100644
index 0000000000..77b228a5a2
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XZonedDateTimeFormatter.h
@@ -0,0 +1,45 @@
+#ifndef ICU4XZonedDateTimeFormatter_H
+#define ICU4XZonedDateTimeFormatter_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+#endif
+
+typedef struct ICU4XZonedDateTimeFormatter ICU4XZonedDateTimeFormatter;
+#ifdef __cplusplus
+} // namespace capi
+#endif
+#include "ICU4XDataProvider.h"
+#include "ICU4XLocale.h"
+#include "ICU4XDateLength.h"
+#include "ICU4XTimeLength.h"
+#include "diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError.h"
+#include "ICU4XIsoTimeZoneOptions.h"
+#include "ICU4XDateTime.h"
+#include "ICU4XCustomTimeZone.h"
+#include "diplomat_result_void_ICU4XError.h"
+#include "ICU4XIsoDateTime.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError ICU4XZonedDateTimeFormatter_create_with_lengths(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length);
+
+diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError ICU4XZonedDateTimeFormatter_create_with_lengths_and_iso_8601_time_zone_fallback(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length, ICU4XIsoTimeZoneOptions zone_options);
+
+diplomat_result_void_ICU4XError ICU4XZonedDateTimeFormatter_format_datetime_with_custom_time_zone(const ICU4XZonedDateTimeFormatter* self, const ICU4XDateTime* datetime, const ICU4XCustomTimeZone* time_zone, DiplomatWriteable* write);
+
+diplomat_result_void_ICU4XError ICU4XZonedDateTimeFormatter_format_iso_datetime_with_custom_time_zone(const ICU4XZonedDateTimeFormatter* self, const ICU4XIsoDateTime* datetime, const ICU4XCustomTimeZone* time_zone, DiplomatWriteable* write);
+void ICU4XZonedDateTimeFormatter_destroy(ICU4XZonedDateTimeFormatter* self);
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/ICU4XZonedDateTimeFormatter.hpp b/intl/icu_capi/cpp/include/ICU4XZonedDateTimeFormatter.hpp
new file mode 100644
index 0000000000..ac0dba0b1e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/ICU4XZonedDateTimeFormatter.hpp
@@ -0,0 +1,173 @@
+#ifndef ICU4XZonedDateTimeFormatter_HPP
+#define ICU4XZonedDateTimeFormatter_HPP
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <algorithm>
+#include <memory>
+#include <variant>
+#include <optional>
+#include "diplomat_runtime.hpp"
+
+#include "ICU4XZonedDateTimeFormatter.h"
+
+class ICU4XDataProvider;
+class ICU4XLocale;
+#include "ICU4XDateLength.hpp"
+#include "ICU4XTimeLength.hpp"
+class ICU4XZonedDateTimeFormatter;
+#include "ICU4XError.hpp"
+struct ICU4XIsoTimeZoneOptions;
+class ICU4XDateTime;
+class ICU4XCustomTimeZone;
+class ICU4XIsoDateTime;
+
+/**
+ * A destruction policy for using ICU4XZonedDateTimeFormatter with std::unique_ptr.
+ */
+struct ICU4XZonedDateTimeFormatterDeleter {
+ void operator()(capi::ICU4XZonedDateTimeFormatter* l) const noexcept {
+ capi::ICU4XZonedDateTimeFormatter_destroy(l);
+ }
+};
+
+/**
+ * An object capable of formatting a date time with time zone to a string.
+ *
+ * See the [Rust documentation for `ZonedDateTimeFormatter`](https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html) for more information.
+ */
+class ICU4XZonedDateTimeFormatter {
+ public:
+
+ /**
+ * Creates a new [`ICU4XZonedDateTimeFormatter`] from locale data.
+ *
+ * This function has `date_length` and `time_length` arguments and uses default options
+ * for the time zone.
+ *
+ * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.try_new) for more information.
+ */
+ static diplomat::result<ICU4XZonedDateTimeFormatter, ICU4XError> create_with_lengths(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length);
+
+ /**
+ * Creates a new [`ICU4XZonedDateTimeFormatter`] from locale data.
+ *
+ * This function has `date_length` and `time_length` arguments and uses an ISO-8601 style
+ * fallback for the time zone with the given configurations.
+ *
+ * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.try_new) for more information.
+ */
+ static diplomat::result<ICU4XZonedDateTimeFormatter, ICU4XError> create_with_lengths_and_iso_8601_time_zone_fallback(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length, ICU4XIsoTimeZoneOptions zone_options);
+
+ /**
+ * Formats a [`ICU4XDateTime`] and [`ICU4XCustomTimeZone`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_datetime_with_custom_time_zone_to_writeable(const ICU4XDateTime& datetime, const ICU4XCustomTimeZone& time_zone, W& write) const;
+
+ /**
+ * Formats a [`ICU4XDateTime`] and [`ICU4XCustomTimeZone`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_datetime_with_custom_time_zone(const ICU4XDateTime& datetime, const ICU4XCustomTimeZone& time_zone) const;
+
+ /**
+ * Formats a [`ICU4XIsoDateTime`] and [`ICU4XCustomTimeZone`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format) for more information.
+ */
+ template<typename W> diplomat::result<std::monostate, ICU4XError> format_iso_datetime_with_custom_time_zone_to_writeable(const ICU4XIsoDateTime& datetime, const ICU4XCustomTimeZone& time_zone, W& write) const;
+
+ /**
+ * Formats a [`ICU4XIsoDateTime`] and [`ICU4XCustomTimeZone`] to a string.
+ *
+ * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format) for more information.
+ */
+ diplomat::result<std::string, ICU4XError> format_iso_datetime_with_custom_time_zone(const ICU4XIsoDateTime& datetime, const ICU4XCustomTimeZone& time_zone) const;
+ inline const capi::ICU4XZonedDateTimeFormatter* AsFFI() const { return this->inner.get(); }
+ inline capi::ICU4XZonedDateTimeFormatter* AsFFIMut() { return this->inner.get(); }
+ inline ICU4XZonedDateTimeFormatter(capi::ICU4XZonedDateTimeFormatter* i) : inner(i) {}
+ ICU4XZonedDateTimeFormatter() = default;
+ ICU4XZonedDateTimeFormatter(ICU4XZonedDateTimeFormatter&&) noexcept = default;
+ ICU4XZonedDateTimeFormatter& operator=(ICU4XZonedDateTimeFormatter&& other) noexcept = default;
+ private:
+ std::unique_ptr<capi::ICU4XZonedDateTimeFormatter, ICU4XZonedDateTimeFormatterDeleter> inner;
+};
+
+#include "ICU4XDataProvider.hpp"
+#include "ICU4XLocale.hpp"
+#include "ICU4XIsoTimeZoneOptions.hpp"
+#include "ICU4XDateTime.hpp"
+#include "ICU4XCustomTimeZone.hpp"
+#include "ICU4XIsoDateTime.hpp"
+
+inline diplomat::result<ICU4XZonedDateTimeFormatter, ICU4XError> ICU4XZonedDateTimeFormatter::create_with_lengths(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length) {
+ auto diplomat_result_raw_out_value = capi::ICU4XZonedDateTimeFormatter_create_with_lengths(provider.AsFFI(), locale.AsFFI(), static_cast<capi::ICU4XDateLength>(date_length), static_cast<capi::ICU4XTimeLength>(time_length));
+ diplomat::result<ICU4XZonedDateTimeFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XZonedDateTimeFormatter>(ICU4XZonedDateTimeFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<ICU4XZonedDateTimeFormatter, ICU4XError> ICU4XZonedDateTimeFormatter::create_with_lengths_and_iso_8601_time_zone_fallback(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XDateLength date_length, ICU4XTimeLength time_length, ICU4XIsoTimeZoneOptions zone_options) {
+ ICU4XIsoTimeZoneOptions diplomat_wrapped_struct_zone_options = zone_options;
+ auto diplomat_result_raw_out_value = capi::ICU4XZonedDateTimeFormatter_create_with_lengths_and_iso_8601_time_zone_fallback(provider.AsFFI(), locale.AsFFI(), static_cast<capi::ICU4XDateLength>(date_length), static_cast<capi::ICU4XTimeLength>(time_length), capi::ICU4XIsoTimeZoneOptions{ .format = static_cast<capi::ICU4XIsoTimeZoneFormat>(diplomat_wrapped_struct_zone_options.format), .minutes = static_cast<capi::ICU4XIsoTimeZoneMinuteDisplay>(diplomat_wrapped_struct_zone_options.minutes), .seconds = static_cast<capi::ICU4XIsoTimeZoneSecondDisplay>(diplomat_wrapped_struct_zone_options.seconds) });
+ diplomat::result<ICU4XZonedDateTimeFormatter, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok<ICU4XZonedDateTimeFormatter>(ICU4XZonedDateTimeFormatter(diplomat_result_raw_out_value.ok));
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XZonedDateTimeFormatter::format_datetime_with_custom_time_zone_to_writeable(const ICU4XDateTime& datetime, const ICU4XCustomTimeZone& time_zone, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XZonedDateTimeFormatter_format_datetime_with_custom_time_zone(this->inner.get(), datetime.AsFFI(), time_zone.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XZonedDateTimeFormatter::format_datetime_with_custom_time_zone(const ICU4XDateTime& datetime, const ICU4XCustomTimeZone& time_zone) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XZonedDateTimeFormatter_format_datetime_with_custom_time_zone(this->inner.get(), datetime.AsFFI(), time_zone.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+template<typename W> inline diplomat::result<std::monostate, ICU4XError> ICU4XZonedDateTimeFormatter::format_iso_datetime_with_custom_time_zone_to_writeable(const ICU4XIsoDateTime& datetime, const ICU4XCustomTimeZone& time_zone, W& write) const {
+ capi::DiplomatWriteable write_writer = diplomat::WriteableTrait<W>::Construct(write);
+ auto diplomat_result_raw_out_value = capi::ICU4XZonedDateTimeFormatter_format_iso_datetime_with_custom_time_zone(this->inner.get(), datetime.AsFFI(), time_zone.AsFFI(), &write_writer);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value;
+}
+inline diplomat::result<std::string, ICU4XError> ICU4XZonedDateTimeFormatter::format_iso_datetime_with_custom_time_zone(const ICU4XIsoDateTime& datetime, const ICU4XCustomTimeZone& time_zone) const {
+ std::string diplomat_writeable_string;
+ capi::DiplomatWriteable diplomat_writeable_out = diplomat::WriteableFromString(diplomat_writeable_string);
+ auto diplomat_result_raw_out_value = capi::ICU4XZonedDateTimeFormatter_format_iso_datetime_with_custom_time_zone(this->inner.get(), datetime.AsFFI(), time_zone.AsFFI(), &diplomat_writeable_out);
+ diplomat::result<std::monostate, ICU4XError> diplomat_result_out_value;
+ if (diplomat_result_raw_out_value.is_ok) {
+ diplomat_result_out_value = diplomat::Ok(std::monostate());
+ } else {
+ diplomat_result_out_value = diplomat::Err<ICU4XError>(static_cast<ICU4XError>(diplomat_result_raw_out_value.err));
+ }
+ return diplomat_result_out_value.replace_ok(std::move(diplomat_writeable_string));
+}
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_ICU4XAnyCalendarKind_void.h b/intl/icu_capi/cpp/include/diplomat_result_ICU4XAnyCalendarKind_void.h
new file mode 100644
index 0000000000..f67f66ed4d
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_ICU4XAnyCalendarKind_void.h
@@ -0,0 +1,24 @@
+#ifndef diplomat_result_ICU4XAnyCalendarKind_void_H
+#define diplomat_result_ICU4XAnyCalendarKind_void_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XAnyCalendarKind.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_ICU4XAnyCalendarKind_void {
+ union {
+ ICU4XAnyCalendarKind ok;
+ };
+ bool is_ok;
+} diplomat_result_ICU4XAnyCalendarKind_void;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_ICU4XPluralCategory_void.h b/intl/icu_capi/cpp/include/diplomat_result_ICU4XPluralCategory_void.h
new file mode 100644
index 0000000000..b56ef60acb
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_ICU4XPluralCategory_void.h
@@ -0,0 +1,24 @@
+#ifndef diplomat_result_ICU4XPluralCategory_void_H
+#define diplomat_result_ICU4XPluralCategory_void_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XPluralCategory.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_ICU4XPluralCategory_void {
+ union {
+ ICU4XPluralCategory ok;
+ };
+ bool is_ok;
+} diplomat_result_ICU4XPluralCategory_void;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_ICU4XWeekOf_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_ICU4XWeekOf_ICU4XError.h
new file mode 100644
index 0000000000..4dee8f941f
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_ICU4XWeekOf_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_ICU4XWeekOf_ICU4XError_H
+#define diplomat_result_ICU4XWeekOf_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XWeekOf.h"
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_ICU4XWeekOf_ICU4XError {
+ union {
+ ICU4XWeekOf ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_ICU4XWeekOf_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_bool_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_bool_ICU4XError.h
new file mode 100644
index 0000000000..015930214d
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_bool_ICU4XError.h
@@ -0,0 +1,25 @@
+#ifndef diplomat_result_bool_ICU4XError_H
+#define diplomat_result_bool_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_bool_ICU4XError {
+ union {
+ bool ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_bool_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError.h
new file mode 100644
index 0000000000..0d18fe4076
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError_H
+#define diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XBcp47ToIanaMapper ICU4XBcp47ToIanaMapper;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError {
+ union {
+ ICU4XBcp47ToIanaMapper* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XBidi_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XBidi_ICU4XError.h
new file mode 100644
index 0000000000..f1cd7ca6a3
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XBidi_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XBidi_ICU4XError_H
+#define diplomat_result_box_ICU4XBidi_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XBidi ICU4XBidi;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XBidi_ICU4XError {
+ union {
+ ICU4XBidi* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XBidi_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCalendar_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCalendar_ICU4XError.h
new file mode 100644
index 0000000000..bffa22c6b0
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCalendar_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCalendar_ICU4XError_H
+#define diplomat_result_box_ICU4XCalendar_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCalendar ICU4XCalendar;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCalendar_ICU4XError {
+ union {
+ ICU4XCalendar* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCalendar_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.h
new file mode 100644
index 0000000000..2c05f79671
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError_H
+#define diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCanonicalCombiningClassMap ICU4XCanonicalCombiningClassMap;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError {
+ union {
+ ICU4XCanonicalCombiningClassMap* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.h
new file mode 100644
index 0000000000..66d0386ff8
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCanonicalComposition_ICU4XError_H
+#define diplomat_result_box_ICU4XCanonicalComposition_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCanonicalComposition ICU4XCanonicalComposition;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCanonicalComposition_ICU4XError {
+ union {
+ ICU4XCanonicalComposition* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCanonicalComposition_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.h
new file mode 100644
index 0000000000..cf02637fef
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError_H
+#define diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCanonicalDecomposition ICU4XCanonicalDecomposition;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError {
+ union {
+ ICU4XCanonicalDecomposition* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.h
new file mode 100644
index 0000000000..7b2a957399
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCaseMapCloser_ICU4XError_H
+#define diplomat_result_box_ICU4XCaseMapCloser_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCaseMapCloser ICU4XCaseMapCloser;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCaseMapCloser_ICU4XError {
+ union {
+ ICU4XCaseMapCloser* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCaseMapCloser_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCaseMapper_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCaseMapper_ICU4XError.h
new file mode 100644
index 0000000000..c6e03a748c
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCaseMapper_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCaseMapper_ICU4XError_H
+#define diplomat_result_box_ICU4XCaseMapper_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCaseMapper ICU4XCaseMapper;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCaseMapper_ICU4XError {
+ union {
+ ICU4XCaseMapper* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCaseMapper_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.h
new file mode 100644
index 0000000000..fbe11daad2
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCodePointMapData16_ICU4XError_H
+#define diplomat_result_box_ICU4XCodePointMapData16_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCodePointMapData16 ICU4XCodePointMapData16;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCodePointMapData16_ICU4XError {
+ union {
+ ICU4XCodePointMapData16* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCodePointMapData16_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.h
new file mode 100644
index 0000000000..2e203279e3
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCodePointMapData8_ICU4XError_H
+#define diplomat_result_box_ICU4XCodePointMapData8_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCodePointMapData8 ICU4XCodePointMapData8;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCodePointMapData8_ICU4XError {
+ union {
+ ICU4XCodePointMapData8* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCodePointMapData8_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCodePointSetData_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCodePointSetData_ICU4XError.h
new file mode 100644
index 0000000000..e70e39ba61
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCodePointSetData_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCodePointSetData_ICU4XError_H
+#define diplomat_result_box_ICU4XCodePointSetData_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCodePointSetData ICU4XCodePointSetData;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCodePointSetData_ICU4XError {
+ union {
+ ICU4XCodePointSetData* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCodePointSetData_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCollator_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCollator_ICU4XError.h
new file mode 100644
index 0000000000..abb5c8a598
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCollator_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCollator_ICU4XError_H
+#define diplomat_result_box_ICU4XCollator_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCollator ICU4XCollator;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCollator_ICU4XError {
+ union {
+ ICU4XCollator* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCollator_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.h
new file mode 100644
index 0000000000..d0c381ef03
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XComposingNormalizer_ICU4XError_H
+#define diplomat_result_box_ICU4XComposingNormalizer_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XComposingNormalizer ICU4XComposingNormalizer;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XComposingNormalizer_ICU4XError {
+ union {
+ ICU4XComposingNormalizer* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XComposingNormalizer_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.h
new file mode 100644
index 0000000000..4709a89871
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XCustomTimeZone_ICU4XError_H
+#define diplomat_result_box_ICU4XCustomTimeZone_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XCustomTimeZone ICU4XCustomTimeZone;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XCustomTimeZone_ICU4XError {
+ union {
+ ICU4XCustomTimeZone* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XCustomTimeZone_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDataProvider_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDataProvider_ICU4XError.h
new file mode 100644
index 0000000000..a5be844183
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDataProvider_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XDataProvider_ICU4XError_H
+#define diplomat_result_box_ICU4XDataProvider_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XDataProvider ICU4XDataProvider;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XDataProvider_ICU4XError {
+ union {
+ ICU4XDataProvider* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XDataProvider_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDataStruct_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDataStruct_ICU4XError.h
new file mode 100644
index 0000000000..d8c1d33e21
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDataStruct_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XDataStruct_ICU4XError_H
+#define diplomat_result_box_ICU4XDataStruct_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XDataStruct ICU4XDataStruct;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XDataStruct_ICU4XError {
+ union {
+ ICU4XDataStruct* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XDataStruct_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDateFormatter_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDateFormatter_ICU4XError.h
new file mode 100644
index 0000000000..b6d9671434
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDateFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XDateFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XDateFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XDateFormatter ICU4XDateFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XDateFormatter_ICU4XError {
+ union {
+ ICU4XDateFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XDateFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError.h
new file mode 100644
index 0000000000..855e74fe6c
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XDateTimeFormatter ICU4XDateTimeFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError {
+ union {
+ ICU4XDateTimeFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDateTime_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDateTime_ICU4XError.h
new file mode 100644
index 0000000000..2d4cb2fe48
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDateTime_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XDateTime_ICU4XError_H
+#define diplomat_result_box_ICU4XDateTime_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XDateTime ICU4XDateTime;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XDateTime_ICU4XError {
+ union {
+ ICU4XDateTime* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XDateTime_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDate_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDate_ICU4XError.h
new file mode 100644
index 0000000000..30461b264a
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDate_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XDate_ICU4XError_H
+#define diplomat_result_box_ICU4XDate_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XDate ICU4XDate;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XDate_ICU4XError {
+ union {
+ ICU4XDate* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XDate_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.h
new file mode 100644
index 0000000000..c51d9907bc
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError_H
+#define diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XDecomposingNormalizer ICU4XDecomposingNormalizer;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError {
+ union {
+ ICU4XDecomposingNormalizer* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.h
new file mode 100644
index 0000000000..8ee245a093
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XFixedDecimalFormatter ICU4XFixedDecimalFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError {
+ union {
+ ICU4XFixedDecimalFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.h
new file mode 100644
index 0000000000..f45cd78fb9
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XFixedDecimal_ICU4XError_H
+#define diplomat_result_box_ICU4XFixedDecimal_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XFixedDecimal ICU4XFixedDecimal;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XFixedDecimal_ICU4XError {
+ union {
+ ICU4XFixedDecimal* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XFixedDecimal_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.h
new file mode 100644
index 0000000000..98ff137a9a
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError_H
+#define diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XGeneralCategoryNameToMaskMapper ICU4XGeneralCategoryNameToMaskMapper;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError {
+ union {
+ ICU4XGeneralCategoryNameToMaskMapper* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.h
new file mode 100644
index 0000000000..d560b381a5
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError_H
+#define diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XGraphemeClusterSegmenter ICU4XGraphemeClusterSegmenter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError {
+ union {
+ ICU4XGraphemeClusterSegmenter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError.h
new file mode 100644
index 0000000000..86b13be912
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XGregorianDateFormatter ICU4XGregorianDateFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError {
+ union {
+ ICU4XGregorianDateFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError.h
new file mode 100644
index 0000000000..4393d9ffb0
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XGregorianDateTimeFormatter ICU4XGregorianDateTimeFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError {
+ union {
+ ICU4XGregorianDateTimeFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError.h
new file mode 100644
index 0000000000..270b38ba94
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XGregorianZonedDateTimeFormatter ICU4XGregorianZonedDateTimeFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError {
+ union {
+ ICU4XGregorianZonedDateTimeFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError.h
new file mode 100644
index 0000000000..2e05730b0b
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError_H
+#define diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XIanaToBcp47Mapper ICU4XIanaToBcp47Mapper;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError {
+ union {
+ ICU4XIanaToBcp47Mapper* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.h
new file mode 100644
index 0000000000..8a55b47a68
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XIsoDateTime_ICU4XError_H
+#define diplomat_result_box_ICU4XIsoDateTime_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XIsoDateTime ICU4XIsoDateTime;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XIsoDateTime_ICU4XError {
+ union {
+ ICU4XIsoDateTime* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XIsoDateTime_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XIsoDate_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XIsoDate_ICU4XError.h
new file mode 100644
index 0000000000..8528d73b07
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XIsoDate_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XIsoDate_ICU4XError_H
+#define diplomat_result_box_ICU4XIsoDate_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XIsoDate ICU4XIsoDate;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XIsoDate_ICU4XError {
+ union {
+ ICU4XIsoDate* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XIsoDate_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.h
new file mode 100644
index 0000000000..004d3494ae
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLineSegmenter_ICU4XError_H
+#define diplomat_result_box_ICU4XLineSegmenter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLineSegmenter ICU4XLineSegmenter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLineSegmenter_ICU4XError {
+ union {
+ ICU4XLineSegmenter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLineSegmenter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XListFormatter_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XListFormatter_ICU4XError.h
new file mode 100644
index 0000000000..df40aa2dae
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XListFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XListFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XListFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XListFormatter ICU4XListFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XListFormatter_ICU4XError {
+ union {
+ ICU4XListFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XListFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError.h
new file mode 100644
index 0000000000..a49bb700ca
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError_H
+#define diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLocaleCanonicalizer ICU4XLocaleCanonicalizer;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError {
+ union {
+ ICU4XLocaleCanonicalizer* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.h
new file mode 100644
index 0000000000..740f9d99fa
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError_H
+#define diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLocaleDirectionality ICU4XLocaleDirectionality;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError {
+ union {
+ ICU4XLocaleDirectionality* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.h
new file mode 100644
index 0000000000..6b0f09b2a2
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLocaleDisplayNamesFormatter ICU4XLocaleDisplayNamesFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError {
+ union {
+ ICU4XLocaleDisplayNamesFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleExpander_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleExpander_ICU4XError.h
new file mode 100644
index 0000000000..c7275e699c
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleExpander_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLocaleExpander_ICU4XError_H
+#define diplomat_result_box_ICU4XLocaleExpander_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLocaleExpander ICU4XLocaleExpander;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLocaleExpander_ICU4XError {
+ union {
+ ICU4XLocaleExpander* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLocaleExpander_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.h
new file mode 100644
index 0000000000..0dc002718e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError_H
+#define diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLocaleFallbackerWithConfig ICU4XLocaleFallbackerWithConfig;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError {
+ union {
+ ICU4XLocaleFallbackerWithConfig* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.h
new file mode 100644
index 0000000000..3427bf3e3a
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError_H
+#define diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLocaleFallbacker ICU4XLocaleFallbacker;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError {
+ union {
+ ICU4XLocaleFallbacker* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocale_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocale_ICU4XError.h
new file mode 100644
index 0000000000..f5720b612f
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XLocale_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XLocale_ICU4XError_H
+#define diplomat_result_box_ICU4XLocale_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XLocale ICU4XLocale;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XLocale_ICU4XError {
+ union {
+ ICU4XLocale* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XLocale_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.h
new file mode 100644
index 0000000000..ebd519e0b5
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError_H
+#define diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XMetazoneCalculator ICU4XMetazoneCalculator;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError {
+ union {
+ ICU4XMetazoneCalculator* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XPluralOperands_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XPluralOperands_ICU4XError.h
new file mode 100644
index 0000000000..7c068ba4b8
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XPluralOperands_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XPluralOperands_ICU4XError_H
+#define diplomat_result_box_ICU4XPluralOperands_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XPluralOperands ICU4XPluralOperands;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XPluralOperands_ICU4XError {
+ union {
+ ICU4XPluralOperands* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XPluralOperands_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XPluralRules_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XPluralRules_ICU4XError.h
new file mode 100644
index 0000000000..4fa522b850
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XPluralRules_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XPluralRules_ICU4XError_H
+#define diplomat_result_box_ICU4XPluralRules_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XPluralRules ICU4XPluralRules;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XPluralRules_ICU4XError {
+ union {
+ ICU4XPluralRules* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XPluralRules_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.h
new file mode 100644
index 0000000000..047ef959b0
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError_H
+#define diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XPropertyValueNameToEnumMapper ICU4XPropertyValueNameToEnumMapper;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError {
+ union {
+ ICU4XPropertyValueNameToEnumMapper* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.h
new file mode 100644
index 0000000000..fcf7e88a23
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError_H
+#define diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XRegionDisplayNames ICU4XRegionDisplayNames;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError {
+ union {
+ ICU4XRegionDisplayNames* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.h
new file mode 100644
index 0000000000..bffd6161aa
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError_H
+#define diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XScriptWithExtensions ICU4XScriptWithExtensions;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError {
+ union {
+ ICU4XScriptWithExtensions* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.h
new file mode 100644
index 0000000000..a8ab968fa9
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError_H
+#define diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XSentenceSegmenter ICU4XSentenceSegmenter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError {
+ union {
+ ICU4XSentenceSegmenter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTimeFormatter_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTimeFormatter_ICU4XError.h
new file mode 100644
index 0000000000..0e63cbbc2a
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTimeFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XTimeFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XTimeFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XTimeFormatter ICU4XTimeFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XTimeFormatter_ICU4XError {
+ union {
+ ICU4XTimeFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XTimeFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError.h
new file mode 100644
index 0000000000..5f4851051e
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XTimeZoneFormatter ICU4XTimeZoneFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError {
+ union {
+ ICU4XTimeZoneFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTime_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTime_ICU4XError.h
new file mode 100644
index 0000000000..3e58b1e4da
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTime_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XTime_ICU4XError_H
+#define diplomat_result_box_ICU4XTime_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XTime ICU4XTime;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XTime_ICU4XError {
+ union {
+ ICU4XTime* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XTime_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.h
new file mode 100644
index 0000000000..f8b017cfd4
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError_H
+#define diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XTitlecaseMapper ICU4XTitlecaseMapper;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError {
+ union {
+ ICU4XTitlecaseMapper* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.h
new file mode 100644
index 0000000000..6dd14e82b6
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XUnicodeSetData_ICU4XError_H
+#define diplomat_result_box_ICU4XUnicodeSetData_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XUnicodeSetData ICU4XUnicodeSetData;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XUnicodeSetData_ICU4XError {
+ union {
+ ICU4XUnicodeSetData* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XUnicodeSetData_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.h
new file mode 100644
index 0000000000..1f547fd383
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XWeekCalculator_ICU4XError_H
+#define diplomat_result_box_ICU4XWeekCalculator_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XWeekCalculator ICU4XWeekCalculator;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XWeekCalculator_ICU4XError {
+ union {
+ ICU4XWeekCalculator* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XWeekCalculator_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.h
new file mode 100644
index 0000000000..e41c59b661
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XWordSegmenter_ICU4XError_H
+#define diplomat_result_box_ICU4XWordSegmenter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XWordSegmenter ICU4XWordSegmenter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XWordSegmenter_ICU4XError {
+ union {
+ ICU4XWordSegmenter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XWordSegmenter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError.h
new file mode 100644
index 0000000000..52a0ab4462
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError.h
@@ -0,0 +1,26 @@
+#ifndef diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError_H
+#define diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+typedef struct ICU4XZonedDateTimeFormatter ICU4XZonedDateTimeFormatter;
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError {
+ union {
+ ICU4XZonedDateTimeFormatter* ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_int32_t_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_int32_t_ICU4XError.h
new file mode 100644
index 0000000000..adbe148dd1
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_int32_t_ICU4XError.h
@@ -0,0 +1,25 @@
+#ifndef diplomat_result_int32_t_ICU4XError_H
+#define diplomat_result_int32_t_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_int32_t_ICU4XError {
+ union {
+ int32_t ok;
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_int32_t_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_uint16_t_void.h b/intl/icu_capi/cpp/include/diplomat_result_uint16_t_void.h
new file mode 100644
index 0000000000..3adeb5f36d
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_uint16_t_void.h
@@ -0,0 +1,23 @@
+#ifndef diplomat_result_uint16_t_void_H
+#define diplomat_result_uint16_t_void_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_uint16_t_void {
+ union {
+ uint16_t ok;
+ };
+ bool is_ok;
+} diplomat_result_uint16_t_void;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_void_ICU4XError.h b/intl/icu_capi/cpp/include/diplomat_result_void_ICU4XError.h
new file mode 100644
index 0000000000..f092491e34
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_void_ICU4XError.h
@@ -0,0 +1,24 @@
+#ifndef diplomat_result_void_ICU4XError_H
+#define diplomat_result_void_ICU4XError_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#include "ICU4XError.h"
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_void_ICU4XError {
+ union {
+ ICU4XError err;
+ };
+ bool is_ok;
+} diplomat_result_void_ICU4XError;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_result_void_void.h b/intl/icu_capi/cpp/include/diplomat_result_void_void.h
new file mode 100644
index 0000000000..2d5cc704e5
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_result_void_void.h
@@ -0,0 +1,20 @@
+#ifndef diplomat_result_void_void_H
+#define diplomat_result_void_void_H
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "diplomat_runtime.h"
+
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+typedef struct diplomat_result_void_void {
+ bool is_ok;
+} diplomat_result_void_void;
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_runtime.h b/intl/icu_capi/cpp/include/diplomat_runtime.h
new file mode 100644
index 0000000000..de0f9c76fe
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_runtime.h
@@ -0,0 +1,70 @@
+#ifndef DIPLOMAT_RUNTIME_C_H
+#define DIPLOMAT_RUNTIME_C_H
+
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <sys/types.h>
+
+// uchar.h doesn't always exist, but char32_t is always available
+// in C++ anyway
+#ifndef __cplusplus
+#ifdef __APPLE__
+#include <stdint.h>
+typedef uint16_t char16_t;
+typedef uint32_t char32_t;
+#else
+#include <uchar.h>
+#endif
+#endif
+
+
+#ifdef __cplusplus
+namespace capi {
+extern "C" {
+#endif
+
+typedef struct DiplomatWriteable {
+ void* context;
+ char* buf;
+ size_t len;
+ size_t cap;
+ void (*flush)(struct DiplomatWriteable*);
+ bool (*grow)(struct DiplomatWriteable*, size_t);
+} DiplomatWriteable;
+
+DiplomatWriteable diplomat_simple_writeable(char* buf, size_t buf_size);
+
+typedef struct DiplomatStringView {
+ const char* data;
+ size_t len;
+} DiplomatStringView;
+
+#define MAKE_SLICE_VIEW(name, c_ty) \
+ typedef struct Diplomat##name##View { \
+ const c_ty* data; \
+ size_t len; \
+ } Diplomat##name##View;
+
+MAKE_SLICE_VIEW(I8, int8_t)
+MAKE_SLICE_VIEW(U8, uint8_t)
+MAKE_SLICE_VIEW(I16, int16_t)
+MAKE_SLICE_VIEW(U16, uint16_t)
+MAKE_SLICE_VIEW(I32, int32_t)
+MAKE_SLICE_VIEW(U32, uint32_t)
+MAKE_SLICE_VIEW(I64, int64_t)
+MAKE_SLICE_VIEW(U64, uint64_t)
+MAKE_SLICE_VIEW(Isize, intptr_t)
+MAKE_SLICE_VIEW(Usize, size_t)
+MAKE_SLICE_VIEW(F32, float)
+MAKE_SLICE_VIEW(F64, double)
+MAKE_SLICE_VIEW(Bool, bool)
+MAKE_SLICE_VIEW(Char, char32_t)
+
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace capi
+#endif
+
+#endif
diff --git a/intl/icu_capi/cpp/include/diplomat_runtime.hpp b/intl/icu_capi/cpp/include/diplomat_runtime.hpp
new file mode 100644
index 0000000000..841752280d
--- /dev/null
+++ b/intl/icu_capi/cpp/include/diplomat_runtime.hpp
@@ -0,0 +1,175 @@
+#ifndef DIPLOMAT_RUNTIME_CPP_H
+#define DIPLOMAT_RUNTIME_CPP_H
+
+#include <string>
+#include <variant>
+#include <array>
+#include <optional>
+#include <type_traits>
+
+#if __cplusplus >= 202002L
+#include<span>
+#endif
+
+#include "diplomat_runtime.h"
+
+namespace diplomat {
+
+extern "C" inline void Flush(capi::DiplomatWriteable* w) {
+ std::string* string = reinterpret_cast<std::string*>(w->context);
+ string->resize(w->len);
+};
+
+extern "C" inline bool Grow(capi::DiplomatWriteable* w, uintptr_t requested) {
+ std::string* string = reinterpret_cast<std::string*>(w->context);
+ string->resize(requested);
+ w->cap = string->length();
+ w->buf = &(*string)[0];
+ return true;
+};
+
+inline capi::DiplomatWriteable WriteableFromString(std::string& string) {
+ capi::DiplomatWriteable w;
+ w.context = &string;
+ w.buf = &string[0];
+ w.len = string.length();
+ // Same as length, since C++ strings are not supposed
+ // to be written to past their len; you resize *first*
+ w.cap = string.length();
+ w.flush = Flush;
+ w.grow = Grow;
+ return w;
+};
+
+template<typename T> struct WriteableTrait {
+ // static inline capi::DiplomatWriteable Construct(T& t);
+};
+
+
+template<> struct WriteableTrait<std::string> {
+ static inline capi::DiplomatWriteable Construct(std::string& t) {
+ return diplomat::WriteableFromString(t);
+ }
+};
+
+template<class T> struct Ok {
+ T inner;
+ explicit Ok(T&& i): inner(std::move(i)) {}
+ // We don't want to expose an lvalue-capable constructor in general
+ // however there is no problem doing this for trivially copyable types
+ template<typename X = T, typename = typename std::enable_if<std::is_trivially_copyable<X>::value>::type>
+ explicit Ok(const T& i): inner(i) {}
+ Ok() = default;
+ Ok(Ok&&) noexcept = default;
+ Ok(const Ok &) = default;
+ Ok& operator=(const Ok&) = default;
+ Ok& operator=(Ok&&) noexcept = default;
+};
+
+template<class T> struct Err {
+ T inner;
+ explicit Err(T&& i): inner(std::move(i)) {}
+ // We don't want to expose an lvalue-capable constructor in general
+ // however there is no problem doing this for trivially copyable types
+ template<typename X = T, typename = typename std::enable_if<std::is_trivially_copyable<X>::value>::type>
+ explicit Err(const T& i): inner(i) {}
+ Err() = default;
+ Err(Err&&) noexcept = default;
+ Err(const Err &) = default;
+ Err& operator=(const Err&) = default;
+ Err& operator=(Err&&) noexcept = default;
+};
+
+template<class T, class E>
+class result {
+private:
+ std::variant<Ok<T>, Err<E>> val;
+public:
+ explicit result(Ok<T>&& v): val(std::move(v)) {}
+ explicit result(Err<E>&& v): val(std::move(v)) {}
+ result() = default;
+ result(const result &) = default;
+ result& operator=(const result&) = default;
+ result& operator=(Ok<T>&& t) {
+ this->val = Ok<T>(std::move(t));
+ return *this;
+ }
+ result& operator=(Err<E>&& e) {
+ this->val = Err<E>(std::move(e));
+ return *this;
+ }
+ result& operator=(result&&) noexcept = default;
+ result(result &&) noexcept = default;
+ ~result() = default;
+ bool is_ok() const {
+ return std::holds_alternative<Ok<T>>(this->val);
+ };
+ bool is_err() const {
+ return std::holds_alternative<Err<E>>(this->val);
+ };
+
+ std::optional<T> ok() && {
+ if (!this->is_ok()) {
+ return std::nullopt;
+ }
+ return std::make_optional(std::move(std::get<Ok<T>>(std::move(this->val)).inner));
+ };
+ std::optional<E> err() && {
+ if (!this->is_err()) {
+ return std::nullopt;
+ }
+ return std::make_optional(std::move(std::get<Err<E>>(std::move(this->val)).inner));
+ }
+
+ void set_ok(T&& t) {
+ this->val = Ok<T>(std::move(t));
+ }
+
+ void set_err(E&& e) {
+ this->val = Err<E>(std::move(e));
+ }
+
+ template<typename T2>
+ result<T2, E> replace_ok(T2&& t) {
+ if (this->is_err()) {
+ return result<T2, E>(Err<E>(std::get<Err<E>>(std::move(this->val))));
+ } else {
+ return result<T2, E>(Ok<T2>(std::move(t)));
+ }
+ }
+};
+
+
+// Use custom std::span on C++17, otherwise use std::span
+#if __cplusplus >= 202002L
+
+template<class T> using span = std::span<T>;
+
+#else // __cplusplus >= 202002L
+
+// C++-17-compatible std::span
+template<class T>
+class span {
+
+public:
+ constexpr span(T* data, size_t size)
+ : data_(data), size_(size) {}
+ template<size_t N>
+ explicit constexpr span(std::array<typename std::remove_const<T>::type, N>& arr)
+ : data_(const_cast<T*>(arr.data())), size_(N) {}
+ constexpr T* data() const noexcept {
+ return this->data_;
+ }
+ constexpr size_t size() const noexcept {
+ return this->size_;
+ }
+private:
+ T* data_;
+ size_t size_;
+};
+
+#endif // __cplusplus >= 202002L
+
+}
+
+#endif
diff --git a/intl/icu_capi/dart/README.md b/intl/icu_capi/dart/README.md
new file mode 100644
index 0000000000..c993661d16
--- /dev/null
+++ b/intl/icu_capi/dart/README.md
@@ -0,0 +1,17 @@
+# Dart FFI for ICU4X
+
+This folder contains the Dart FFI for ICU4X. To re-generate the bindings run:
+
+```sh
+cargo make diplomat-gen-dart
+```
+
+Or re-generate all of the bindings:
+
+```sh
+cargo make diplomat-gen
+```
+
+## More Information
+
+For more information on development, authorship, contributing etc. please visit [`ICU4X home page`](https://github.com/unicode-org/icu4x).
diff --git a/intl/icu_capi/js/README.md b/intl/icu_capi/js/README.md
new file mode 100644
index 0000000000..8b72051091
--- /dev/null
+++ b/intl/icu_capi/js/README.md
@@ -0,0 +1,17 @@
+# JavaScript/TypeScript FFI for ICU4X
+
+This folder contains the JavaScript/TypeScript FFI for ICU4X. To re-generate the bindings run:
+
+```sh
+cargo make diplomat-gen-js
+```
+
+Or re-generate all of the bindings:
+
+```sh
+cargo make diplomat-gen
+```
+
+## More Information
+
+For more information on development, authorship, contributing etc. please visit [`ICU4X home page`](https://github.com/unicode-org/icu4x).
diff --git a/intl/icu_capi/js/examples/tinywasm/.gitignore b/intl/icu_capi/js/examples/tinywasm/.gitignore
new file mode 100644
index 0000000000..a65b41774a
--- /dev/null
+++ b/intl/icu_capi/js/examples/tinywasm/.gitignore
@@ -0,0 +1 @@
+lib
diff --git a/intl/icu_capi/js/examples/tinywasm/Makefile b/intl/icu_capi/js/examples/tinywasm/Makefile
new file mode 100755
index 0000000000..786dff11cb
--- /dev/null
+++ b/intl/icu_capi/js/examples/tinywasm/Makefile
@@ -0,0 +1,42 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := build
+FORCE:
+
+ALL_HEADERS := $(wildcard ../../include/*)
+ICU4X_NIGHTLY_TOOLCHAIN ?= "nightly-2022-12-26"
+
+$(ALL_HEADERS):
+
+# 100 KiB, working around a bug in older rustc
+# https://github.com/unicode-org/icu4x/issues/2753
+WASM_STACK_SIZE := 100000
+
+BASEDIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
+
+lib: $(ALL_HEADERS)
+ rm -rf lib;
+ mkdir lib;
+ cp ../../package/lib/* lib
+
+crate/target/wasm32-unknown-unknown/release/crate.wasm: FORCE
+ rustup toolchain install ${ICU4X_NIGHTLY_TOOLCHAIN}
+ rustup component add rust-src --toolchain ${ICU4X_NIGHTLY_TOOLCHAIN}
+ # Build the WASM library
+ cd crate && \
+ RUSTFLAGS="-Cpanic=abort -Copt-level=s -C link-arg=-zstack-size=${WASM_STACK_SIZE} -Clinker-plugin-lto -Ccodegen-units=1 -C linker=${BASEDIR}/ld.py -C linker-flavor=wasm-ld -Clto -Cembed-bitcode" \
+ cargo +${ICU4X_NIGHTLY_TOOLCHAIN} build \
+ -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort \
+ --target wasm32-unknown-unknown \
+ --release
+
+build: crate/target/wasm32-unknown-unknown/release/crate.wasm lib
+ ls -l crate/target/wasm32-unknown-unknown/release/crate.wasm
+
+test:
+ node tiny.mjs
+
+clean:
+ git clean -xf *
diff --git a/intl/icu_capi/js/examples/tinywasm/README.md b/intl/icu_capi/js/examples/tinywasm/README.md
new file mode 100644
index 0000000000..708e6b5d5a
--- /dev/null
+++ b/intl/icu_capi/js/examples/tinywasm/README.md
@@ -0,0 +1 @@
+This is a example of how to build a size-optimized WASM library file using ICU4X.
diff --git a/intl/icu_capi/js/examples/tinywasm/delete_fetch.mjs b/intl/icu_capi/js/examples/tinywasm/delete_fetch.mjs
new file mode 100644
index 0000000000..7aebb7d79c
--- /dev/null
+++ b/intl/icu_capi/js/examples/tinywasm/delete_fetch.mjs
@@ -0,0 +1,8 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+// diplomat-wasm.mjs uses fetch when available, but fetch in Node.js is broken,
+// so delete the function to force the wasm to be loaded via the fs module.
+// See <https://github.com/rust-diplomat/diplomat/issues/283>.
+delete globalThis.fetch;
diff --git a/intl/icu_capi/js/examples/tinywasm/diplomat.config.js b/intl/icu_capi/js/examples/tinywasm/diplomat.config.js
new file mode 100644
index 0000000000..5b3842cd69
--- /dev/null
+++ b/intl/icu_capi/js/examples/tinywasm/diplomat.config.js
@@ -0,0 +1,7 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+export default {
+ wasm_path: new URL('crate/target/wasm32-unknown-unknown/release/crate.wasm', import.meta.url),
+};
diff --git a/intl/icu_capi/js/examples/tinywasm/ld.py b/intl/icu_capi/js/examples/tinywasm/ld.py
new file mode 100755
index 0000000000..243da958de
--- /dev/null
+++ b/intl/icu_capi/js/examples/tinywasm/ld.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python3
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+import sys
+import subprocess
+
+SYMBOLS = [
+ "ICU4XDataProvider_create_compiled",
+ "ICU4XDataProvider_destroy",
+ "ICU4XFixedDecimal_create_from_i32",
+ "ICU4XFixedDecimal_destroy",
+ "ICU4XFixedDecimal_multiply_pow10",
+ "ICU4XFixedDecimalFormatter_create_with_grouping_strategy",
+ "ICU4XFixedDecimalFormatter_destroy",
+ "ICU4XFixedDecimalFormatter_format",
+ "ICU4XLocale_create_from_string",
+ "ICU4XLocale_destroy",
+]
+
+def main():
+ new_argv = []
+ is_export = False
+ for arg in sys.argv[1:]:
+ if is_export:
+ if not arg.startswith("ICU4X") or arg in SYMBOLS:
+ new_argv += ["--export", arg]
+ is_export = False
+ elif arg == "--export":
+ is_export = True
+ else:
+ new_argv += [arg]
+ is_export = False
+ result = subprocess.run(["lld-15"] + new_argv, stdout=sys.stdout, stderr=sys.stderr)
+ return result.returncode
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/intl/icu_capi/js/examples/tinywasm/package.json b/intl/icu_capi/js/examples/tinywasm/package.json
new file mode 100644
index 0000000000..26ec535f10
--- /dev/null
+++ b/intl/icu_capi/js/examples/tinywasm/package.json
@@ -0,0 +1,4 @@
+{
+ "main": "tiny.mjs",
+ "type": "module"
+}
diff --git a/intl/icu_capi/js/examples/tinywasm/tiny.mjs b/intl/icu_capi/js/examples/tinywasm/tiny.mjs
new file mode 100644
index 0000000000..570b356801
--- /dev/null
+++ b/intl/icu_capi/js/examples/tinywasm/tiny.mjs
@@ -0,0 +1,24 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+import "./delete_fetch.mjs";
+import { ICU4XLocale } from "./lib/ICU4XLocale.js";
+import { ICU4XDataProvider } from "./lib/ICU4XDataProvider.js";
+import { ICU4XFixedDecimalFormatter } from "./lib/ICU4XFixedDecimalFormatter.js";
+import { ICU4XFixedDecimal } from "./lib/ICU4XFixedDecimal.js";
+
+async function main() {
+ const locale = ICU4XLocale.create_from_string("bn");
+ const provider = ICU4XDataProvider.create_compiled();
+
+ const format = ICU4XFixedDecimalFormatter.create_with_grouping_strategy(provider, locale, "Auto");
+
+ const decimal = ICU4XFixedDecimal.create_from_i32(1000007);
+ decimal.multiply_pow10(-2);
+
+ const result = format.format(decimal);
+ console.log("Output is", result);
+}
+
+main();
diff --git a/intl/icu_capi/js/examples/wasm-demo/.gitignore b/intl/icu_capi/js/examples/wasm-demo/.gitignore
new file mode 100644
index 0000000000..a261f29175
--- /dev/null
+++ b/intl/icu_capi/js/examples/wasm-demo/.gitignore
@@ -0,0 +1 @@
+dist/*
diff --git a/intl/icu_capi/js/examples/wasm-demo/cors-config-file.json b/intl/icu_capi/js/examples/wasm-demo/cors-config-file.json
new file mode 100644
index 0000000000..45696ea0d2
--- /dev/null
+++ b/intl/icu_capi/js/examples/wasm-demo/cors-config-file.json
@@ -0,0 +1,8 @@
+[
+ {
+ "origin": ["*"],
+ "method": ["GET"],
+ "responseHeader": ["Content-Type"],
+ "maxAgeSeconds": 3600
+ }
+]
diff --git a/intl/icu_capi/js/examples/wasm-demo/index.html b/intl/icu_capi/js/examples/wasm-demo/index.html
new file mode 100644
index 0000000000..4ad9305b9e
--- /dev/null
+++ b/intl/icu_capi/js/examples/wasm-demo/index.html
@@ -0,0 +1,310 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset='utf8' />
+ <meta name='viewport' content='width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes' />
+ <title>WASM Demo</title>
+
+ <style>
+ #main {
+ margin-top: 3vh;
+ margin-bottom: 3vh;
+ }
+
+ @media (min-width: 768px) {
+ .demo-dropdown-menu {
+ display: none !important;
+ }
+ }
+
+ @media (max-width: 767px) {
+ .demo-tab-menu {
+ display: none !important;
+ }
+ }
+
+ .seg-delim {
+ color: red;
+ font-weight: bold;
+ }
+ </style>
+ </head>
+ <body>
+ <!-- With Webpack -->
+ <script src='index.js'></script>
+ <!-- Without Webpack -->
+ <!--
+ <script type="importmap">
+ {
+ "imports": {
+ "icu4x": "../icu4x/lib/index.js"
+ }
+ }
+ </script>
+ <script type="module" src='./dist/app.js'></script>
+ -->
+
+ <div id="main" class="container">
+
+ <div class="demo-dropdown-menu vstack gap-2">
+
+ <button class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
+ Demos
+ <!-- menu icon -->
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list" viewBox="0 0 16 16">
+ <path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"/>
+ </svg>
+ </button>
+
+ <div class="collapse" id="collapseExample">
+ <div class="card card-body">
+ <ul class="nav nav-pills mb-3 flex-column" role="tablist">
+ <li class="nav-item" role="presentation">
+ <button class="nav-link active" data-bs-toggle="pill" data-bs-target="#pills-fdf" type="button" role="tab" aria-controls="pills-fdf" aria-selected="true">Fixed Decimal Formatting</button>
+ </li>
+ <li class="nav-item" role="presentation">
+ <button class="nav-link" data-bs-toggle="pill" data-bs-target="#pills-dtf" type="button" role="tab" aria-controls="pills-dtf" aria-selected="false">Date Time Formatting</button>
+ </li>
+ <li class="nav-item" role="presentation">
+ <button class="nav-link" data-bs-toggle="pill" data-bs-target="#pills-seg" type="button" role="tab" aria-controls="pills-seg" aria-selected="false">Segmenter</button>
+ </li>
+ </ul>
+
+ </div>
+
+ </div>
+
+ </div>
+
+ <div class="demo-tab-menu">
+ <ul class="nav nav-pills mb-3" role="tablist">
+ <li class="nav-item" role="presentation">
+ <button class="nav-link active" data-bs-toggle="pill" data-bs-target="#pills-fdf" type="button" role="tab" aria-controls="pills-fdf" aria-selected="true">Fixed Decimal Formatting</button>
+ </li>
+ <li class="nav-item" role="presentation">
+ <button class="nav-link" data-bs-toggle="pill" data-bs-target="#pills-dtf" type="button" role="tab" aria-controls="pills-dtf" aria-selected="false">Date Time Formatting</button>
+ </li>
+ <li class="nav-item" role="presentation">
+ <button class="nav-link" data-bs-toggle="pill" data-bs-target="#pills-seg" type="button" role="tab" aria-controls="pills-seg" aria-selected="false">Segmenter</button>
+ </li>
+ </ul>
+ </div>
+
+ <div class="tab-content" id="pills-tabContent">
+ <div class="tab-pane show active" id="pills-fdf" role="tabpanel" aria-labelledby="pills-fdf-tab" tabindex="0">
+ <div class="vstack gap-2">
+ Locale
+ <div class="btn-toolbar" role="toolbar" aria-label="Fixed Decimal Formatting options">
+ <div class="btn-group" role="group" aria-label="Fixed Decimal Formatting Locale">
+ <input type="radio" class="btn-check" name="fdf-locale" id="fdf-locale-en" value="en" checked>
+ <label class="btn btn-outline-primary" for="fdf-locale-en">en</label>
+
+ <input type="radio" class="btn-check" name="fdf-locale" id="fdf-locale-bn" value="bn">
+ <label class="btn btn-outline-primary" for="fdf-locale-bn">bn</label>
+
+ <div class="input-group">
+ <input type="radio" class="btn-check" name="fdf-locale" id="fdf-locale-other" value="other">
+ <label class="btn btn-outline-primary" for="fdf-locale-other">other</label>
+ <input type="text" id="fdf-locale-other-input" class="form-control" placeholder="Locale ID">
+ </div>
+ </div>
+ </div>
+
+ Grouping Strategy
+ <div class="btn-toolbar" role="toolbar" aria-label="Fixed Decimal Formatting options">
+ <div class="btn-group" role="group" aria-label="Fixed Decimal Formatting Locale">
+ <input type="radio" class="btn-check" name="fdf-grouping" id="fdf-grouping-auto" value="Auto" checked>
+ <label class="btn btn-outline-primary" for="fdf-grouping-auto">Auto</label>
+
+ <input type="radio" class="btn-check" name="fdf-grouping" id="fdf-grouping-never" value="Never">
+ <label class="btn btn-outline-primary" for="fdf-grouping-never">Never</label>
+
+ <input type="radio" class="btn-check" name="fdf-grouping" id="fdf-grouping-always" value="Always">
+ <label class="btn btn-outline-primary" for="fdf-grouping-always">Always</label>
+
+ <input type="radio" class="btn-check" name="fdf-grouping" id="fdf-grouping-min2" value="Min2">
+ <label class="btn btn-outline-primary" for="fdf-grouping-min2">Min2</label>
+ </div>
+ </div>
+
+ Enter a number
+ <input type="text" id='fdf-input' class="form-control" placeholder="3.141"></input>
+ <div class="card">
+ <div class="card-header">Formatted</div>
+ <div class="card-body">
+ <p id="fdf-formatted" class="card-text"></p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="tab-pane" id="pills-dtf" role="tabpanel" aria-labelledby="pills-dtf-tab" tabindex="0">
+ <div class="vstack gap-2">
+ Locale
+
+ <div class="btn-toolbar" role="toolbar" aria-label="DateTime Formatting options">
+ <div class="btn-group me-2" role="group" aria-label="DateTime Formatting Locale">
+ <input type="radio" class="btn-check" name="dtf-locale" id="dtf-locale-en" value="en" checked>
+ <label class="btn btn-outline-primary" for="dtf-locale-en">en</label>
+
+ <input type="radio" class="btn-check" name="dtf-locale" id="dtf-locale-bn" value="bn">
+ <label class="btn btn-outline-primary" for="dtf-locale-bn">bn</label>
+ <input type="radio" class="btn-check" name="dtf-locale" id="dtf-locale-ja" value="ja">
+ <label class="btn btn-outline-primary" for="dtf-locale-ja">ja</label>
+
+ <div class="input-group">
+ <input type="radio" class="btn-check" name="dtf-locale" id="dtf-locale-other" value="other">
+ <label class="btn btn-outline-primary" for="dtf-locale-other">other</label>
+ <input type="text" id="dtf-locale-other-input" class="form-control" placeholder="Locale ID">
+ </div>
+ </div>
+ <div class="input-group" role="group" aria-label="DateTime Formatting Locale">
+ <span class="input-group-text">Calendar</span>
+ <select name="dtf-calendar" class="form-select">
+ <option value="from-locale" selected>Default for locale</option>
+ <option value="buddhist">Buddhist</option>
+ <option value="chinese">Chinese</option>
+ <option value="coptic">Coptic</option>
+ <option value="dangi">Dangi</option>
+ <option value="ethiopic">Ethiopian</option>
+ <option value="gregory">Gregorian</option>
+ <option value="indian">Indian national</option>
+ <option value="islamicc">Islamic Civil</option>
+ <option value="islamic">Islamic Observational</option>
+ <option value="tbla">Islamic Tabular</option>
+ <option value="umalqura">Islamic Umm-al-Qura</option>
+ <option value="japanese">Japanese</option>
+ <option value="japanext">Japanese (historical eras)</option>
+ <option value="persian">Persian</option>
+ <option value="roc">Republic of China</option>
+ </select>
+ </div>
+ </div>
+
+ Date length
+ <div class="btn-toolbar" role="toolbar" aria-label="DateTime Formatting options">
+ <div class="btn-group" role="group" aria-label="DateTime Formatting Locale">
+ <input type="radio" class="btn-check" name="dtf-date-length" id="dtf-date-length-full" value="Full">
+ <label class="btn btn-outline-primary" for="dtf-date-length-full">Full</label>
+
+ <input type="radio" class="btn-check" name="dtf-date-length" id="dtf-date-length-long" value="Long">
+ <label class="btn btn-outline-primary" for="dtf-date-length-long">Long</label>
+
+ <input type="radio" class="btn-check" name="dtf-date-length" id="dtf-date-length-medium" value="Medium">
+ <label class="btn btn-outline-primary" for="dtf-date-length-medium">Medium</label>
+
+ <input type="radio" class="btn-check" name="dtf-date-length" id="dtf-date-length-short" value="Short" checked>
+ <label class="btn btn-outline-primary" for="dtf-date-length-short">Short</label>
+ </div>
+ </div>
+
+ Time length
+ <div class="btn-toolbar" role="toolbar" aria-label="DateTime Formatting options">
+ <div class="btn-group" role="group" aria-label="DateTime Formatting Locale"
+ title="Demo doesn't currently support full/long time styles as they need time zone support, which is available in ICU4X but not this demo">
+ <input type="radio" class="btn-check" name="dtf-time-length" id="dtf-time-length-full" value="Full" disabled>
+ <label class="btn btn-outline-primary" for="dtf-time-length-full">Full</label>
+
+ <input type="radio" class="btn-check" name="dtf-time-length" id="dtf-time-length-long" value="Long" disabled>
+ <label class="btn btn-outline-primary" for="dtf-time-length-long">Long</label>
+
+ <input type="radio" class="btn-check" name="dtf-time-length" id="dtf-time-length-medium" value="Medium">
+ <label class="btn btn-outline-primary" for="dtf-time-length-medium">Medium</label>
+
+ <input type="radio" class="btn-check" name="dtf-time-length" id="dtf-time-length-short" value="Short" checked>
+ <label class="btn btn-outline-primary" for="dtf-time-length-short">Short</label>
+ </div>
+ </div>
+
+ Date
+ <input type='datetime-local' id='dtf-input'>
+
+ <div class="card">
+ <div class="card-header">Formatted</div>
+ <div class="card-body">
+ <p id="dtf-formatted" class="card-text"></p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="tab-pane" id="pills-seg" role="tabpanel" aria-labelledby="pills-seg-tab" tabindex="0">
+ <div class="vstack gap-2">
+ Segmentation Model (note: LSTM not supported in Chinese/Japanese)
+ <div class="btn-toolbar" role="toolbar" aria-label="Segmentation options">
+ <div class="btn-group" role="group" aria-label="Segmentation model">
+ <input type="radio" class="btn-check" name="segmenter-model" id="segmenter-model-auto" value="Auto" checked>
+ <label class="btn btn-outline-primary" for="segmenter-model-auto">Auto</label>
+
+ <input type="radio" class="btn-check" name="segmenter-model" id="segmenter-model-never" value="LSTM">
+ <label class="btn btn-outline-primary" for="segmenter-model-never">LSTM</label>
+
+ <input type="radio" class="btn-check" name="segmenter-model" id="segmenter-model-always" value="Dictionary">
+ <label class="btn btn-outline-primary" for="segmenter-model-always">Dictionary</label>
+ </div>
+ </div>
+
+ Enter a string
+ <button id="seg-sample-japanese" type="button" class="btn btn-secondary">Sample Japanese</button>
+ <button id="seg-sample-chinese" type="button" class="btn btn-secondary">Sample Chinese</button>
+ <button id="seg-sample-thai" type="button" class="btn btn-secondary">Sample Thai</button>
+ <input type="text" id='seg-input' class="form-control" placeholder="全部の人間は"></input>
+ <div class="card">
+ <div class="card-header">Segmented</div>
+ <div class="card-body">
+ <p id="seg-segmented" class="card-text"></p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="bigspinner">
+ <!--
+ The MIT License (MIT)
+
+ Copyright (c) 2014 Sam Herbert
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ -->
+ <svg width="135" height="135" viewBox="0 0 135 135" xmlns="http://www.w3.org/2000/svg" fill="#fff">
+ <path d="M67.447 58c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10zm9.448 9.447c0 5.523 4.477 10 10 10 5.522 0 10-4.477 10-10s-4.478-10-10-10c-5.523 0-10 4.477-10 10zm-9.448 9.448c-5.523 0-10 4.477-10 10 0 5.522 4.477 10 10 10s10-4.478 10-10c0-5.523-4.477-10-10-10zM58 67.447c0-5.523-4.477-10-10-10s-10 4.477-10 10 4.477 10 10 10 10-4.477 10-10z">
+ <animateTransform
+ attributeName="transform"
+ type="rotate"
+ from="0 67 67"
+ to="-360 67 67"
+ dur="2.5s"
+ repeatCount="indefinite"/>
+ </path>
+ <path d="M28.19 40.31c6.627 0 12-5.374 12-12 0-6.628-5.373-12-12-12-6.628 0-12 5.372-12 12 0 6.626 5.372 12 12 12zm30.72-19.825c4.686 4.687 12.284 4.687 16.97 0 4.686-4.686 4.686-12.284 0-16.97-4.686-4.687-12.284-4.687-16.97 0-4.687 4.686-4.687 12.284 0 16.97zm35.74 7.705c0 6.627 5.37 12 12 12 6.626 0 12-5.373 12-12 0-6.628-5.374-12-12-12-6.63 0-12 5.372-12 12zm19.822 30.72c-4.686 4.686-4.686 12.284 0 16.97 4.687 4.686 12.285 4.686 16.97 0 4.687-4.686 4.687-12.284 0-16.97-4.685-4.687-12.283-4.687-16.97 0zm-7.704 35.74c-6.627 0-12 5.37-12 12 0 6.626 5.373 12 12 12s12-5.374 12-12c0-6.63-5.373-12-12-12zm-30.72 19.822c-4.686-4.686-12.284-4.686-16.97 0-4.686 4.687-4.686 12.285 0 16.97 4.686 4.687 12.284 4.687 16.97 0 4.687-4.685 4.687-12.283 0-16.97zm-35.74-7.704c0-6.627-5.372-12-12-12-6.626 0-12 5.373-12 12s5.374 12 12 12c6.628 0 12-5.373 12-12zm-19.823-30.72c4.687-4.686 4.687-12.284 0-16.97-4.686-4.686-12.284-4.686-16.97 0-4.687 4.686-4.687 12.284 0 16.97 4.686 4.687 12.284 4.687 16.97 0z">
+ <animateTransform
+ attributeName="transform"
+ type="rotate"
+ from="0 67 67"
+ to="360 67 67"
+ dur="8s"
+ repeatCount="indefinite"/>
+ </path>
+ </svg>
+ </div>
+ <style type="text/css">
+ #bigspinner {
+ position: fixed;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 999;
+ }
+ #bigspinner svg {
+ position: absolute;
+ top: 10%;
+ width: 40%;
+ left: 30%;
+ }
+ </style>
+ </body>
+</html> \ No newline at end of file
diff --git a/intl/icu_capi/js/examples/wasm-demo/index.js b/intl/icu_capi/js/examples/wasm-demo/index.js
new file mode 100644
index 0000000000..8a8bb33baf
--- /dev/null
+++ b/intl/icu_capi/js/examples/wasm-demo/index.js
@@ -0,0 +1,3 @@
+const gsc = document.createElement('script');
+gsc.setAttribute('src', './dist/bundle.js');
+document.body.appendChild(gsc); \ No newline at end of file
diff --git a/intl/icu_capi/js/examples/wasm-demo/package-lock.json b/intl/icu_capi/js/examples/wasm-demo/package-lock.json
new file mode 100644
index 0000000000..f585fe4f86
--- /dev/null
+++ b/intl/icu_capi/js/examples/wasm-demo/package-lock.json
@@ -0,0 +1,7643 @@
+{
+ "name": "icu4x-demo",
+ "version": "1.0.0",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "icu4x-demo",
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "@popperjs/core": "^2.11.5",
+ "bootstrap": "^5.2.0",
+ "data.either": "^1.5.2",
+ "icu4x": "file:../../package"
+ },
+ "devDependencies": {
+ "@types/bootstrap": "^5.2.1",
+ "autoprefixer": "^10.4.8",
+ "css-loader": "^6.7.1",
+ "postcss-loader": "^7.2.4",
+ "sass": "^1.54.0",
+ "sass-loader": "^13.0.2",
+ "style-loader": "^3.3.1",
+ "ts-loader": "^9.3.1",
+ "typescript": "^4.7.4",
+ "webpack": "^5.76.0",
+ "webpack-cli": "^4.10.0",
+ "webpack-dev-server": "^4.9.3"
+ }
+ },
+ "../../package": {
+ "name": "icu4x",
+ "version": "0.0.1",
+ "license": "Apache-2.0",
+ "devDependencies": {
+ "ava": "^5.3.1",
+ "benchmark": "^2.1.4"
+ }
+ },
+ "../node": {
+ "extraneous": true
+ },
+ "node_modules/@babel/code-frame": {
+ "version": "7.21.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz",
+ "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/highlight": "^7.18.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.19.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz",
+ "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/highlight": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz",
+ "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.18.6",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "1.1.3"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+ "dev": true
+ },
+ "node_modules/@babel/highlight/node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@cspotcode/source-map-support": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "@jridgewell/trace-mapping": "0.3.9"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+ "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ },
+ "node_modules/@discoveryjs/json-ext": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz",
+ "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==",
+ "dev": true,
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/@jridgewell/gen-mapping": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz",
+ "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/set-array": "^1.0.1",
+ "@jridgewell/sourcemap-codec": "^1.4.10",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
+ "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/set-array": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
+ "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/source-map": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz",
+ "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.0",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.4.14",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
+ "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
+ "dev": true
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.17",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz",
+ "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/resolve-uri": "3.1.0",
+ "@jridgewell/sourcemap-codec": "1.4.14"
+ }
+ },
+ "node_modules/@leichtgewicht/ip-codec": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
+ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==",
+ "dev": true
+ },
+ "node_modules/@popperjs/core": {
+ "version": "2.11.5",
+ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz",
+ "integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/popperjs"
+ }
+ },
+ "node_modules/@tsconfig/node10": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
+ "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/@tsconfig/node12": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
+ "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/@tsconfig/node14": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
+ "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/@tsconfig/node16": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
+ "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/@types/body-parser": {
+ "version": "1.19.2",
+ "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz",
+ "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==",
+ "dev": true,
+ "dependencies": {
+ "@types/connect": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/bonjour": {
+ "version": "3.5.10",
+ "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.10.tgz",
+ "integrity": "sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/bootstrap": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/@types/bootstrap/-/bootstrap-5.2.1.tgz",
+ "integrity": "sha512-jPdLpDnBTHeocqelEz+ZVP2eY12hIBXgJLV/n0URiQiiNLdCgHwDqaI0chijjn1qwvDNbjzhKDeYAHxsnIGtIA==",
+ "dev": true,
+ "dependencies": {
+ "@popperjs/core": "^2.9.2"
+ }
+ },
+ "node_modules/@types/connect": {
+ "version": "3.4.35",
+ "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
+ "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/connect-history-api-fallback": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz",
+ "integrity": "sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw==",
+ "dev": true,
+ "dependencies": {
+ "@types/express-serve-static-core": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/eslint": {
+ "version": "8.21.2",
+ "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.21.2.tgz",
+ "integrity": "sha512-EMpxUyystd3uZVByZap1DACsMXvb82ypQnGn89e1Y0a+LYu3JJscUd/gqhRsVFDkaD2MIiWo0MT8EfXr3DGRKw==",
+ "dev": true,
+ "dependencies": {
+ "@types/estree": "*",
+ "@types/json-schema": "*"
+ }
+ },
+ "node_modules/@types/eslint-scope": {
+ "version": "3.7.4",
+ "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz",
+ "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==",
+ "dev": true,
+ "dependencies": {
+ "@types/eslint": "*",
+ "@types/estree": "*"
+ }
+ },
+ "node_modules/@types/estree": {
+ "version": "0.0.51",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz",
+ "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==",
+ "dev": true
+ },
+ "node_modules/@types/express": {
+ "version": "4.17.13",
+ "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz",
+ "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==",
+ "dev": true,
+ "dependencies": {
+ "@types/body-parser": "*",
+ "@types/express-serve-static-core": "^4.17.18",
+ "@types/qs": "*",
+ "@types/serve-static": "*"
+ }
+ },
+ "node_modules/@types/express-serve-static-core": {
+ "version": "4.17.30",
+ "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.30.tgz",
+ "integrity": "sha512-gstzbTWro2/nFed1WXtf+TtrpwxH7Ggs4RLYTLbeVgIkUQOI3WG/JKjgeOU1zXDvezllupjrf8OPIdvTbIaVOQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*",
+ "@types/qs": "*",
+ "@types/range-parser": "*"
+ }
+ },
+ "node_modules/@types/http-proxy": {
+ "version": "1.17.9",
+ "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.9.tgz",
+ "integrity": "sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/json-schema": {
+ "version": "7.0.11",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
+ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
+ "dev": true
+ },
+ "node_modules/@types/mime": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.0.tgz",
+ "integrity": "sha512-fccbsHKqFDXClBZTDLA43zl0+TbxyIwyzIzwwhvoJvhNjOErCdeX2xJbURimv2EbSVUGav001PaCJg4mZxMl4w==",
+ "dev": true
+ },
+ "node_modules/@types/node": {
+ "version": "18.6.1",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.1.tgz",
+ "integrity": "sha512-z+2vB6yDt1fNwKOeGbckpmirO+VBDuQqecXkgeIqDlaOtmKn6hPR/viQ8cxCfqLU4fTlvM3+YjM367TukWdxpg==",
+ "dev": true
+ },
+ "node_modules/@types/qs": {
+ "version": "6.9.7",
+ "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
+ "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==",
+ "dev": true
+ },
+ "node_modules/@types/range-parser": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
+ "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==",
+ "dev": true
+ },
+ "node_modules/@types/retry": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz",
+ "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==",
+ "dev": true
+ },
+ "node_modules/@types/serve-index": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.1.tgz",
+ "integrity": "sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg==",
+ "dev": true,
+ "dependencies": {
+ "@types/express": "*"
+ }
+ },
+ "node_modules/@types/serve-static": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.0.tgz",
+ "integrity": "sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==",
+ "dev": true,
+ "dependencies": {
+ "@types/mime": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/sockjs": {
+ "version": "0.3.33",
+ "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.33.tgz",
+ "integrity": "sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/ws": {
+ "version": "8.5.3",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz",
+ "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@webassemblyjs/ast": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
+ "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/helper-numbers": "1.11.1",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.1"
+ }
+ },
+ "node_modules/@webassemblyjs/floating-point-hex-parser": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz",
+ "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==",
+ "dev": true
+ },
+ "node_modules/@webassemblyjs/helper-api-error": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz",
+ "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==",
+ "dev": true
+ },
+ "node_modules/@webassemblyjs/helper-buffer": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz",
+ "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==",
+ "dev": true
+ },
+ "node_modules/@webassemblyjs/helper-numbers": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz",
+ "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/floating-point-hex-parser": "1.11.1",
+ "@webassemblyjs/helper-api-error": "1.11.1",
+ "@xtuc/long": "4.2.2"
+ }
+ },
+ "node_modules/@webassemblyjs/helper-wasm-bytecode": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz",
+ "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==",
+ "dev": true
+ },
+ "node_modules/@webassemblyjs/helper-wasm-section": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz",
+ "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.11.1",
+ "@webassemblyjs/helper-buffer": "1.11.1",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
+ "@webassemblyjs/wasm-gen": "1.11.1"
+ }
+ },
+ "node_modules/@webassemblyjs/ieee754": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz",
+ "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==",
+ "dev": true,
+ "dependencies": {
+ "@xtuc/ieee754": "^1.2.0"
+ }
+ },
+ "node_modules/@webassemblyjs/leb128": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz",
+ "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==",
+ "dev": true,
+ "dependencies": {
+ "@xtuc/long": "4.2.2"
+ }
+ },
+ "node_modules/@webassemblyjs/utf8": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz",
+ "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==",
+ "dev": true
+ },
+ "node_modules/@webassemblyjs/wasm-edit": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz",
+ "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.11.1",
+ "@webassemblyjs/helper-buffer": "1.11.1",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
+ "@webassemblyjs/helper-wasm-section": "1.11.1",
+ "@webassemblyjs/wasm-gen": "1.11.1",
+ "@webassemblyjs/wasm-opt": "1.11.1",
+ "@webassemblyjs/wasm-parser": "1.11.1",
+ "@webassemblyjs/wast-printer": "1.11.1"
+ }
+ },
+ "node_modules/@webassemblyjs/wasm-gen": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz",
+ "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.11.1",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
+ "@webassemblyjs/ieee754": "1.11.1",
+ "@webassemblyjs/leb128": "1.11.1",
+ "@webassemblyjs/utf8": "1.11.1"
+ }
+ },
+ "node_modules/@webassemblyjs/wasm-opt": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz",
+ "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.11.1",
+ "@webassemblyjs/helper-buffer": "1.11.1",
+ "@webassemblyjs/wasm-gen": "1.11.1",
+ "@webassemblyjs/wasm-parser": "1.11.1"
+ }
+ },
+ "node_modules/@webassemblyjs/wasm-parser": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz",
+ "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.11.1",
+ "@webassemblyjs/helper-api-error": "1.11.1",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
+ "@webassemblyjs/ieee754": "1.11.1",
+ "@webassemblyjs/leb128": "1.11.1",
+ "@webassemblyjs/utf8": "1.11.1"
+ }
+ },
+ "node_modules/@webassemblyjs/wast-printer": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz",
+ "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.11.1",
+ "@xtuc/long": "4.2.2"
+ }
+ },
+ "node_modules/@webpack-cli/configtest": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz",
+ "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==",
+ "dev": true,
+ "peerDependencies": {
+ "webpack": "4.x.x || 5.x.x",
+ "webpack-cli": "4.x.x"
+ }
+ },
+ "node_modules/@webpack-cli/info": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz",
+ "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==",
+ "dev": true,
+ "dependencies": {
+ "envinfo": "^7.7.3"
+ },
+ "peerDependencies": {
+ "webpack-cli": "4.x.x"
+ }
+ },
+ "node_modules/@webpack-cli/serve": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz",
+ "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==",
+ "dev": true,
+ "peerDependencies": {
+ "webpack-cli": "4.x.x"
+ },
+ "peerDependenciesMeta": {
+ "webpack-dev-server": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@xtuc/ieee754": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
+ "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==",
+ "dev": true
+ },
+ "node_modules/@xtuc/long": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz",
+ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
+ "dev": true
+ },
+ "node_modules/accepts": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "dev": true,
+ "dependencies": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.8.2",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
+ "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==",
+ "dev": true,
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-import-assertions": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz",
+ "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==",
+ "dev": true,
+ "peerDependencies": {
+ "acorn": "^8"
+ }
+ },
+ "node_modules/acorn-walk": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz",
+ "integrity": "sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/ajv-formats": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
+ "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
+ "dev": true,
+ "dependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "ajv": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ajv-formats/node_modules/ajv": {
+ "version": "8.11.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz",
+ "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/ajv-formats/node_modules/json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ },
+ "node_modules/ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "peerDependencies": {
+ "ajv": "^6.9.1"
+ }
+ },
+ "node_modules/ansi-html-community": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz",
+ "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==",
+ "dev": true,
+ "engines": [
+ "node >= 0.8.0"
+ ],
+ "bin": {
+ "ansi-html": "bin/ansi-html"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
+ "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
+ "dev": true,
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/arg": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
+ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "dev": true
+ },
+ "node_modules/array-flatten": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz",
+ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==",
+ "dev": true
+ },
+ "node_modules/autoprefixer": {
+ "version": "10.4.8",
+ "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.8.tgz",
+ "integrity": "sha512-75Jr6Q/XpTqEf6D2ltS5uMewJIx5irCU1oBYJrWjFenq/m12WRRrz6g15L1EIoYvPLXTbEry7rDOwrcYNj77xw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/autoprefixer"
+ }
+ ],
+ "dependencies": {
+ "browserslist": "^4.21.3",
+ "caniuse-lite": "^1.0.30001373",
+ "fraction.js": "^4.2.0",
+ "normalize-range": "^0.1.2",
+ "picocolors": "^1.0.0",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "bin": {
+ "autoprefixer": "bin/autoprefixer"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/autoprefixer/node_modules/caniuse-lite": {
+ "version": "1.0.30001373",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001373.tgz",
+ "integrity": "sha512-pJYArGHrPp3TUqQzFYRmP/lwJlj8RCbVe3Gd3eJQkAV8SAC6b19XS9BjMvRdvaS8RMkaTN8ZhoHP6S1y8zzwEQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+ }
+ ]
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
+ },
+ "node_modules/batch": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz",
+ "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==",
+ "dev": true
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/body-parser": {
+ "version": "1.20.0",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz",
+ "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==",
+ "dev": true,
+ "dependencies": {
+ "bytes": "3.1.2",
+ "content-type": "~1.0.4",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "on-finished": "2.4.1",
+ "qs": "6.10.3",
+ "raw-body": "2.5.1",
+ "type-is": "~1.6.18",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/body-parser/node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/bonjour-service": {
+ "version": "1.0.13",
+ "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.0.13.tgz",
+ "integrity": "sha512-LWKRU/7EqDUC9CTAQtuZl5HzBALoCYwtLhffW3et7vZMwv3bWLpJf8bRYlMD5OCcDpTfnPgNCV4yo9ZIaJGMiA==",
+ "dev": true,
+ "dependencies": {
+ "array-flatten": "^2.1.2",
+ "dns-equal": "^1.0.0",
+ "fast-deep-equal": "^3.1.3",
+ "multicast-dns": "^7.2.5"
+ }
+ },
+ "node_modules/bootstrap": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.0.tgz",
+ "integrity": "sha512-qlnS9GL6YZE6Wnef46GxGv1UpGGzAwO0aPL1yOjzDIJpeApeMvqV24iL+pjr2kU4dduoBA9fINKWKgMToobx9A==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/twbs"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/bootstrap"
+ }
+ ],
+ "peerDependencies": {
+ "@popperjs/core": "^2.11.5"
+ }
+ },
+ "node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "dependencies": {
+ "fill-range": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/browserslist": {
+ "version": "4.21.3",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz",
+ "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ }
+ ],
+ "dependencies": {
+ "caniuse-lite": "^1.0.30001370",
+ "electron-to-chromium": "^1.4.202",
+ "node-releases": "^2.0.6",
+ "update-browserslist-db": "^1.0.5"
+ },
+ "bin": {
+ "browserslist": "cli.js"
+ },
+ "engines": {
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
+ }
+ },
+ "node_modules/buffer-from": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+ "dev": true
+ },
+ "node_modules/bytes": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
+ "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/call-bind": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/caniuse-lite": {
+ "version": "1.0.30001370",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001370.tgz",
+ "integrity": "sha512-3PDmaP56wz/qz7G508xzjx8C+MC2qEm4SYhSEzC9IBROo+dGXFWRuaXkWti0A9tuI00g+toiriVqxtWMgl350g==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+ }
+ ]
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ],
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/chrome-trace-event": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",
+ "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.0"
+ }
+ },
+ "node_modules/clone-deep": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz",
+ "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==",
+ "dev": true,
+ "dependencies": {
+ "is-plain-object": "^2.0.4",
+ "kind-of": "^6.0.2",
+ "shallow-clone": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/colorette": {
+ "version": "2.0.19",
+ "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz",
+ "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==",
+ "dev": true
+ },
+ "node_modules/commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "dev": true
+ },
+ "node_modules/compressible": {
+ "version": "2.0.18",
+ "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
+ "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==",
+ "dev": true,
+ "dependencies": {
+ "mime-db": ">= 1.43.0 < 2"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/compression": {
+ "version": "1.7.4",
+ "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz",
+ "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==",
+ "dev": true,
+ "dependencies": {
+ "accepts": "~1.3.5",
+ "bytes": "3.0.0",
+ "compressible": "~2.0.16",
+ "debug": "2.6.9",
+ "on-headers": "~1.0.2",
+ "safe-buffer": "5.1.2",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/compression/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true
+ },
+ "node_modules/connect-history-api-fallback": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz",
+ "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/content-disposition": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": "5.2.1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
+ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
+ "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
+ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
+ "dev": true
+ },
+ "node_modules/core-util-is": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
+ "dev": true
+ },
+ "node_modules/cosmiconfig": {
+ "version": "8.1.3",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz",
+ "integrity": "sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==",
+ "dev": true,
+ "dependencies": {
+ "import-fresh": "^3.2.1",
+ "js-yaml": "^4.1.0",
+ "parse-json": "^5.0.0",
+ "path-type": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/d-fischer"
+ }
+ },
+ "node_modules/cosmiconfig-typescript-loader": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.3.0.tgz",
+ "integrity": "sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=12",
+ "npm": ">=6"
+ },
+ "peerDependencies": {
+ "@types/node": "*",
+ "cosmiconfig": ">=7",
+ "ts-node": ">=10",
+ "typescript": ">=3"
+ }
+ },
+ "node_modules/create-require": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
+ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "dev": true,
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/css-loader": {
+ "version": "6.7.1",
+ "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.7.1.tgz",
+ "integrity": "sha512-yB5CNFa14MbPJcomwNh3wLThtkZgcNyI2bNMRt8iE5Z8Vwl7f8vQXFAzn2HDOJvtDq2NTZBUGMSUNNyrv3/+cw==",
+ "dev": true,
+ "dependencies": {
+ "icss-utils": "^5.1.0",
+ "postcss": "^8.4.7",
+ "postcss-modules-extract-imports": "^3.0.0",
+ "postcss-modules-local-by-default": "^4.0.0",
+ "postcss-modules-scope": "^3.0.0",
+ "postcss-modules-values": "^4.0.0",
+ "postcss-value-parser": "^4.2.0",
+ "semver": "^7.3.5"
+ },
+ "engines": {
+ "node": ">= 12.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "^5.0.0"
+ }
+ },
+ "node_modules/cssesc": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
+ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
+ "dev": true,
+ "bin": {
+ "cssesc": "bin/cssesc"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/data.either": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/data.either/-/data.either-1.5.2.tgz",
+ "integrity": "sha512-ADXzxd3HiUzK+X0Txy8ZxzGKlQcVVMITkQ6yOWZ61EFxQ4a4YEHIMI4mPYc7U4q/3btGNMpJ9+Mt+Q/IWAQCZw==",
+ "deprecated": "This package is no longer supported. Consider switching to fp-ts"
+ },
+ "node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/default-gateway": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz",
+ "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==",
+ "dev": true,
+ "dependencies": {
+ "execa": "^5.0.0"
+ },
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/define-lazy-prop": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
+ "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/destroy": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/detect-node": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",
+ "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==",
+ "dev": true
+ },
+ "node_modules/diff": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=0.3.1"
+ }
+ },
+ "node_modules/dns-equal": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz",
+ "integrity": "sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==",
+ "dev": true
+ },
+ "node_modules/dns-packet": {
+ "version": "5.4.0",
+ "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.4.0.tgz",
+ "integrity": "sha512-EgqGeaBB8hLiHLZtp/IbaDQTL8pZ0+IvwzSHA6d7VyMDM+B9hgddEMa9xjK5oYnw0ci0JQ6g2XCD7/f6cafU6g==",
+ "dev": true,
+ "dependencies": {
+ "@leichtgewicht/ip-codec": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "dev": true
+ },
+ "node_modules/electron-to-chromium": {
+ "version": "1.4.202",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.202.tgz",
+ "integrity": "sha512-JYsK2ex9lmQD27kj19fhXYxzFJ/phLAkLKHv49A5UY6kMRV2xED3qMMLg/voW/+0AR6wMiI+VxlmK9NDtdxlPA==",
+ "dev": true
+ },
+ "node_modules/encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/enhanced-resolve": {
+ "version": "5.10.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz",
+ "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==",
+ "dev": true,
+ "dependencies": {
+ "graceful-fs": "^4.2.4",
+ "tapable": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/envinfo": {
+ "version": "7.8.1",
+ "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz",
+ "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==",
+ "dev": true,
+ "bin": {
+ "envinfo": "dist/cli.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/error-ex": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+ "dev": true,
+ "dependencies": {
+ "is-arrayish": "^0.2.1"
+ }
+ },
+ "node_modules/es-module-lexer": {
+ "version": "0.9.3",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz",
+ "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==",
+ "dev": true
+ },
+ "node_modules/escalade": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "dev": true
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/eslint-scope": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
+ "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
+ "dev": true,
+ "dependencies": {
+ "esrecurse": "^4.3.0",
+ "estraverse": "^4.1.1"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/esrecurse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+ "dev": true,
+ "dependencies": {
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/esrecurse/node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estraverse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
+ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
+ "dev": true,
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/eventemitter3": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
+ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
+ "dev": true
+ },
+ "node_modules/events": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
+ "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.x"
+ }
+ },
+ "node_modules/execa": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
+ "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
+ "dev": true,
+ "dependencies": {
+ "cross-spawn": "^7.0.3",
+ "get-stream": "^6.0.0",
+ "human-signals": "^2.1.0",
+ "is-stream": "^2.0.0",
+ "merge-stream": "^2.0.0",
+ "npm-run-path": "^4.0.1",
+ "onetime": "^5.1.2",
+ "signal-exit": "^3.0.3",
+ "strip-final-newline": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/execa?sponsor=1"
+ }
+ },
+ "node_modules/express": {
+ "version": "4.18.1",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz",
+ "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==",
+ "dev": true,
+ "dependencies": {
+ "accepts": "~1.3.8",
+ "array-flatten": "1.1.1",
+ "body-parser": "1.20.0",
+ "content-disposition": "0.5.4",
+ "content-type": "~1.0.4",
+ "cookie": "0.5.0",
+ "cookie-signature": "1.0.6",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "1.2.0",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "merge-descriptors": "1.0.1",
+ "methods": "~1.1.2",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "path-to-regexp": "0.1.7",
+ "proxy-addr": "~2.0.7",
+ "qs": "6.10.3",
+ "range-parser": "~1.2.1",
+ "safe-buffer": "5.2.1",
+ "send": "0.18.0",
+ "serve-static": "1.15.0",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "type-is": "~1.6.18",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.10.0"
+ }
+ },
+ "node_modules/express/node_modules/array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
+ "dev": true
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true
+ },
+ "node_modules/fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+ "dev": true
+ },
+ "node_modules/fastest-levenshtein": {
+ "version": "1.0.14",
+ "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.14.tgz",
+ "integrity": "sha512-tFfWHjnuUfKE186Tfgr+jtaFc0mZTApEgKDOeyN+FwOqRkO/zK/3h1AiRd8u8CY53owL3CUmGr/oI9p/RdyLTA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4.9.1"
+ }
+ },
+ "node_modules/faye-websocket": {
+ "version": "0.11.4",
+ "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz",
+ "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==",
+ "dev": true,
+ "dependencies": {
+ "websocket-driver": ">=0.5.1"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/finalhandler": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
+ "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
+ "dev": true,
+ "dependencies": {
+ "debug": "2.6.9",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "statuses": "2.0.1",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/follow-redirects": {
+ "version": "1.15.1",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
+ "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/RubenVerborgh"
+ }
+ ],
+ "engines": {
+ "node": ">=4.0"
+ },
+ "peerDependenciesMeta": {
+ "debug": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fraction.js": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz",
+ "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "type": "patreon",
+ "url": "https://www.patreon.com/infusion"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fs-monkey": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.3.tgz",
+ "integrity": "sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q==",
+ "dev": true
+ },
+ "node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+ "dev": true
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+ "dev": true
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz",
+ "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-stream": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
+ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/glob-to-regexp": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
+ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==",
+ "dev": true
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.10",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
+ "dev": true
+ },
+ "node_modules/handle-thing": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz",
+ "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==",
+ "dev": true
+ },
+ "node_modules/has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hpack.js": {
+ "version": "2.1.6",
+ "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz",
+ "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==",
+ "dev": true,
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "obuf": "^1.0.0",
+ "readable-stream": "^2.0.1",
+ "wbuf": "^1.1.0"
+ }
+ },
+ "node_modules/hpack.js/node_modules/readable-stream": {
+ "version": "2.3.7",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+ "dev": true,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "node_modules/hpack.js/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "node_modules/html-entities": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.3.tgz",
+ "integrity": "sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==",
+ "dev": true
+ },
+ "node_modules/http-deceiver": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz",
+ "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==",
+ "dev": true
+ },
+ "node_modules/http-errors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
+ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+ "dev": true,
+ "dependencies": {
+ "depd": "2.0.0",
+ "inherits": "2.0.4",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "toidentifier": "1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/http-parser-js": {
+ "version": "0.5.8",
+ "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz",
+ "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==",
+ "dev": true
+ },
+ "node_modules/http-proxy": {
+ "version": "1.18.1",
+ "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
+ "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
+ "dev": true,
+ "dependencies": {
+ "eventemitter3": "^4.0.0",
+ "follow-redirects": "^1.0.0",
+ "requires-port": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/http-proxy-middleware": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz",
+ "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==",
+ "dev": true,
+ "dependencies": {
+ "@types/http-proxy": "^1.17.8",
+ "http-proxy": "^1.18.1",
+ "is-glob": "^4.0.1",
+ "is-plain-obj": "^3.0.0",
+ "micromatch": "^4.0.2"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "@types/express": "^4.17.13"
+ },
+ "peerDependenciesMeta": {
+ "@types/express": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/human-signals": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
+ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
+ "dev": true,
+ "engines": {
+ "node": ">=10.17.0"
+ }
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "dev": true,
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/icss-utils": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
+ "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==",
+ "dev": true,
+ "engines": {
+ "node": "^10 || ^12 || >= 14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/icu4x": {
+ "resolved": "../../package",
+ "link": true
+ },
+ "node_modules/immutable": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz",
+ "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==",
+ "dev": true
+ },
+ "node_modules/import-fresh": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
+ "dev": true,
+ "dependencies": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/import-fresh/node_modules/resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/import-local": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz",
+ "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==",
+ "dev": true,
+ "dependencies": {
+ "pkg-dir": "^4.2.0",
+ "resolve-cwd": "^3.0.0"
+ },
+ "bin": {
+ "import-local-fixture": "fixtures/cli.js"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "dev": true,
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true
+ },
+ "node_modules/interpret": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz",
+ "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/ipaddr.js": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz",
+ "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==",
+ "dev": true,
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/is-arrayish": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
+ "dev": true
+ },
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-core-module": {
+ "version": "2.9.0",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz",
+ "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==",
+ "dev": true,
+ "dependencies": {
+ "has": "^1.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-docker": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
+ "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
+ "dev": true,
+ "bin": {
+ "is-docker": "cli.js"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/is-plain-obj": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz",
+ "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-plain-object": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "dev": true,
+ "dependencies": {
+ "isobject": "^3.0.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-stream": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
+ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-wsl": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
+ "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
+ "dev": true,
+ "dependencies": {
+ "is-docker": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
+ "dev": true
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "dev": true
+ },
+ "node_modules/isobject": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/jest-worker": {
+ "version": "27.5.1",
+ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz",
+ "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*",
+ "merge-stream": "^2.0.0",
+ "supports-color": "^8.0.0"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ }
+ },
+ "node_modules/jest-worker/node_modules/supports-color": {
+ "version": "8.1.1",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
+ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/supports-color?sponsor=1"
+ }
+ },
+ "node_modules/js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "dev": true
+ },
+ "node_modules/js-yaml": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
+ "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "dev": true,
+ "dependencies": {
+ "argparse": "^2.0.1"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/json-parse-even-better-errors": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
+ "dev": true
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "node_modules/kind-of": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/klona": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.5.tgz",
+ "integrity": "sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/lines-and-columns": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
+ "dev": true
+ },
+ "node_modules/loader-runner": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",
+ "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.11.5"
+ }
+ },
+ "node_modules/locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "dependencies": {
+ "p-locate": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/make-error": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
+ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/memfs": {
+ "version": "3.4.7",
+ "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.7.tgz",
+ "integrity": "sha512-ygaiUSNalBX85388uskeCyhSAoOSgzBbtVCr9jA2RROssFL9Q19/ZXFqS+2Th2sr1ewNIWgFdLzLC3Yl1Zv+lw==",
+ "dev": true,
+ "dependencies": {
+ "fs-monkey": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+ },
+ "node_modules/merge-descriptors": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
+ "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==",
+ "dev": true
+ },
+ "node_modules/merge-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
+ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
+ "dev": true
+ },
+ "node_modules/methods": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/micromatch": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "dev": true,
+ "dependencies": {
+ "braces": "^3.0.2",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "dev": true,
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dev": true,
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mimic-fn": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/minimalistic-assert": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
+ "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
+ "dev": true
+ },
+ "node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "dev": true
+ },
+ "node_modules/multicast-dns": {
+ "version": "7.2.5",
+ "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz",
+ "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==",
+ "dev": true,
+ "dependencies": {
+ "dns-packet": "^5.2.2",
+ "thunky": "^1.0.2"
+ },
+ "bin": {
+ "multicast-dns": "cli.js"
+ }
+ },
+ "node_modules/negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/neo-async": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
+ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
+ "dev": true
+ },
+ "node_modules/node-forge": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
+ "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 6.13.0"
+ }
+ },
+ "node_modules/node-releases": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz",
+ "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==",
+ "dev": true
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/normalize-range": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
+ "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/npm-run-path": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
+ "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
+ "dev": true,
+ "dependencies": {
+ "path-key": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/object-inspect": {
+ "version": "1.12.2",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",
+ "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/obuf": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz",
+ "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==",
+ "dev": true
+ },
+ "node_modules/on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "dev": true,
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/on-headers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
+ "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dev": true,
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/onetime": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+ "dev": true,
+ "dependencies": {
+ "mimic-fn": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/open": {
+ "version": "8.4.0",
+ "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz",
+ "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==",
+ "dev": true,
+ "dependencies": {
+ "define-lazy-prop": "^2.0.0",
+ "is-docker": "^2.1.1",
+ "is-wsl": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "dev": true,
+ "dependencies": {
+ "p-try": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "dependencies": {
+ "p-limit": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/p-retry": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz",
+ "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/retry": "0.12.0",
+ "retry": "^0.13.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/p-try": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "dependencies": {
+ "callsites": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/parse-json": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/code-frame": "^7.0.0",
+ "error-ex": "^1.3.1",
+ "json-parse-even-better-errors": "^2.3.0",
+ "lines-and-columns": "^1.1.6"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "dev": true
+ },
+ "node_modules/path-to-regexp": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
+ "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==",
+ "dev": true
+ },
+ "node_modules/path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/picocolors": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+ "dev": true
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pkg-dir": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+ "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+ "dev": true,
+ "dependencies": {
+ "find-up": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.4.31",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
+ "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "dependencies": {
+ "nanoid": "^3.3.6",
+ "picocolors": "^1.0.0",
+ "source-map-js": "^1.0.2"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/postcss-loader": {
+ "version": "7.2.4",
+ "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.2.4.tgz",
+ "integrity": "sha512-F88rpxxNspo5hatIc+orYwZDtHFaVFOSIVAx+fBfJC1GmhWbVmPWtmg2gXKE1OxJbneOSGn8PWdIwsZFcruS+w==",
+ "dev": true,
+ "dependencies": {
+ "cosmiconfig": "^8.1.3",
+ "cosmiconfig-typescript-loader": "^4.3.0",
+ "klona": "^2.0.6",
+ "semver": "^7.3.8"
+ },
+ "engines": {
+ "node": ">= 14.15.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "postcss": "^7.0.0 || ^8.0.1",
+ "ts-node": ">=10",
+ "typescript": ">=4",
+ "webpack": "^5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "ts-node": {
+ "optional": true
+ },
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/postcss-loader/node_modules/klona": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz",
+ "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/postcss-loader/node_modules/semver": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz",
+ "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==",
+ "dev": true,
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/postcss-modules-extract-imports": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz",
+ "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==",
+ "dev": true,
+ "engines": {
+ "node": "^10 || ^12 || >= 14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/postcss-modules-local-by-default": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz",
+ "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==",
+ "dev": true,
+ "dependencies": {
+ "icss-utils": "^5.0.0",
+ "postcss-selector-parser": "^6.0.2",
+ "postcss-value-parser": "^4.1.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >= 14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/postcss-modules-scope": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz",
+ "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==",
+ "dev": true,
+ "dependencies": {
+ "postcss-selector-parser": "^6.0.4"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >= 14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/postcss-modules-values": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz",
+ "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==",
+ "dev": true,
+ "dependencies": {
+ "icss-utils": "^5.0.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >= 14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/postcss-selector-parser": {
+ "version": "6.0.10",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz",
+ "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==",
+ "dev": true,
+ "dependencies": {
+ "cssesc": "^3.0.0",
+ "util-deprecate": "^1.0.2"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/postcss-value-parser": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
+ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
+ "dev": true
+ },
+ "node_modules/postcss/node_modules/nanoid": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
+ "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/process-nextick-args": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+ "dev": true
+ },
+ "node_modules/proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "dev": true,
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/proxy-addr/node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/punycode": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/qs": {
+ "version": "6.10.3",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz",
+ "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
+ "dev": true,
+ "dependencies": {
+ "side-channel": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/randombytes": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "node_modules/range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
+ "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
+ "dev": true,
+ "dependencies": {
+ "bytes": "3.1.2",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/raw-body/node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/readable-stream": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "dev": true,
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dev": true,
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/rechoir": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz",
+ "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==",
+ "dev": true,
+ "dependencies": {
+ "resolve": "^1.9.0"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/requires-port": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
+ "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
+ "dev": true
+ },
+ "node_modules/resolve": {
+ "version": "1.22.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
+ "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
+ "dev": true,
+ "dependencies": {
+ "is-core-module": "^2.9.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/resolve-cwd": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
+ "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
+ "dev": true,
+ "dependencies": {
+ "resolve-from": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/resolve-from": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/retry": {
+ "version": "0.13.1",
+ "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz",
+ "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "dev": true
+ },
+ "node_modules/sass": {
+ "version": "1.54.0",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.0.tgz",
+ "integrity": "sha512-C4zp79GCXZfK0yoHZg+GxF818/aclhp9F48XBu/+bm9vXEVAYov9iU3FBVRMq3Hx3OA4jfKL+p2K9180mEh0xQ==",
+ "dev": true,
+ "dependencies": {
+ "chokidar": ">=3.0.0 <4.0.0",
+ "immutable": "^4.0.0",
+ "source-map-js": ">=0.6.2 <2.0.0"
+ },
+ "bin": {
+ "sass": "sass.js"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/sass-loader": {
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-13.0.2.tgz",
+ "integrity": "sha512-BbiqbVmbfJaWVeOOAu2o7DhYWtcNmTfvroVgFXa6k2hHheMxNAeDHLNoDy/Q5aoaVlz0LH+MbMktKwm9vN/j8Q==",
+ "dev": true,
+ "dependencies": {
+ "klona": "^2.0.4",
+ "neo-async": "^2.6.2"
+ },
+ "engines": {
+ "node": ">= 14.15.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "fibers": ">= 3.1.0",
+ "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0",
+ "sass": "^1.3.0",
+ "sass-embedded": "*",
+ "webpack": "^5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "fibers": {
+ "optional": true
+ },
+ "node-sass": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/schema-utils": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
+ "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
+ "dev": true,
+ "dependencies": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/select-hose": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
+ "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==",
+ "dev": true
+ },
+ "node_modules/selfsigned": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.0.1.tgz",
+ "integrity": "sha512-LmME957M1zOsUhG+67rAjKfiWFox3SBxE/yymatMZsAx+oMrJ0YQ8AToOnyCm7xbeg2ep37IHLxdu0o2MavQOQ==",
+ "dev": true,
+ "dependencies": {
+ "node-forge": "^1"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/semver": {
+ "version": "7.3.7",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
+ "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
+ "dev": true,
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/send": {
+ "version": "0.18.0",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
+ "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
+ "dev": true,
+ "dependencies": {
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "mime": "1.6.0",
+ "ms": "2.1.3",
+ "on-finished": "2.4.1",
+ "range-parser": "~1.2.1",
+ "statuses": "2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/send/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true
+ },
+ "node_modules/serialize-javascript": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz",
+ "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==",
+ "dev": true,
+ "dependencies": {
+ "randombytes": "^2.1.0"
+ }
+ },
+ "node_modules/serve-index": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz",
+ "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==",
+ "dev": true,
+ "dependencies": {
+ "accepts": "~1.3.4",
+ "batch": "0.6.1",
+ "debug": "2.6.9",
+ "escape-html": "~1.0.3",
+ "http-errors": "~1.6.2",
+ "mime-types": "~2.1.17",
+ "parseurl": "~1.3.2"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/serve-index/node_modules/depd": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+ "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/serve-index/node_modules/http-errors": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
+ "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==",
+ "dev": true,
+ "dependencies": {
+ "depd": "~1.1.2",
+ "inherits": "2.0.3",
+ "setprototypeof": "1.1.0",
+ "statuses": ">= 1.4.0 < 2"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/serve-index/node_modules/inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==",
+ "dev": true
+ },
+ "node_modules/serve-index/node_modules/setprototypeof": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
+ "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==",
+ "dev": true
+ },
+ "node_modules/serve-index/node_modules/statuses": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
+ "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/serve-static": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
+ "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
+ "dev": true,
+ "dependencies": {
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.3",
+ "send": "0.18.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "dev": true
+ },
+ "node_modules/shallow-clone": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz",
+ "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==",
+ "dev": true,
+ "dependencies": {
+ "kind-of": "^6.0.2"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/side-channel": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
+ "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.0",
+ "get-intrinsic": "^1.0.2",
+ "object-inspect": "^1.9.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+ "dev": true
+ },
+ "node_modules/sockjs": {
+ "version": "0.3.24",
+ "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz",
+ "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==",
+ "dev": true,
+ "dependencies": {
+ "faye-websocket": "^0.11.3",
+ "uuid": "^8.3.2",
+ "websocket-driver": "^0.7.4"
+ }
+ },
+ "node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-js": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-support": {
+ "version": "0.5.21",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+ "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+ "dev": true,
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "source-map": "^0.6.0"
+ }
+ },
+ "node_modules/spdy": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz",
+ "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==",
+ "dev": true,
+ "dependencies": {
+ "debug": "^4.1.0",
+ "handle-thing": "^2.0.0",
+ "http-deceiver": "^1.2.7",
+ "select-hose": "^2.0.0",
+ "spdy-transport": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/spdy-transport": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz",
+ "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==",
+ "dev": true,
+ "dependencies": {
+ "debug": "^4.1.0",
+ "detect-node": "^2.0.4",
+ "hpack.js": "^2.1.6",
+ "obuf": "^1.1.2",
+ "readable-stream": "^3.0.6",
+ "wbuf": "^1.7.3"
+ }
+ },
+ "node_modules/spdy-transport/node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/spdy-transport/node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
+ "node_modules/spdy/node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/spdy/node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
+ "node_modules/statuses": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "node_modules/string_decoder/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "node_modules/strip-final-newline": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
+ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/style-loader": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz",
+ "integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 12.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "^5.0.0"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/tapable": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
+ "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/terser": {
+ "version": "5.16.6",
+ "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.6.tgz",
+ "integrity": "sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/source-map": "^0.3.2",
+ "acorn": "^8.5.0",
+ "commander": "^2.20.0",
+ "source-map-support": "~0.5.20"
+ },
+ "bin": {
+ "terser": "bin/terser"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/terser-webpack-plugin": {
+ "version": "5.3.7",
+ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz",
+ "integrity": "sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/trace-mapping": "^0.3.17",
+ "jest-worker": "^27.4.5",
+ "schema-utils": "^3.1.1",
+ "serialize-javascript": "^6.0.1",
+ "terser": "^5.16.5"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "^5.1.0"
+ },
+ "peerDependenciesMeta": {
+ "@swc/core": {
+ "optional": true
+ },
+ "esbuild": {
+ "optional": true
+ },
+ "uglify-js": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/thunky": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz",
+ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==",
+ "dev": true
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/ts-loader": {
+ "version": "9.3.1",
+ "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.3.1.tgz",
+ "integrity": "sha512-OkyShkcZTsTwyS3Kt7a4rsT/t2qvEVQuKCTg4LJmpj9fhFR7ukGdZwV6Qq3tRUkqcXtfGpPR7+hFKHCG/0d3Lw==",
+ "dev": true,
+ "dependencies": {
+ "chalk": "^4.1.0",
+ "enhanced-resolve": "^5.0.0",
+ "micromatch": "^4.0.0",
+ "semver": "^7.3.4"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "typescript": "*",
+ "webpack": "^5.0.0"
+ }
+ },
+ "node_modules/ts-node": {
+ "version": "10.9.1",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
+ "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
+ "dev": true,
+ "peer": true,
+ "dependencies": {
+ "@cspotcode/source-map-support": "^0.8.0",
+ "@tsconfig/node10": "^1.0.7",
+ "@tsconfig/node12": "^1.0.7",
+ "@tsconfig/node14": "^1.0.0",
+ "@tsconfig/node16": "^1.0.2",
+ "acorn": "^8.4.1",
+ "acorn-walk": "^8.1.1",
+ "arg": "^4.1.0",
+ "create-require": "^1.1.0",
+ "diff": "^4.0.1",
+ "make-error": "^1.1.1",
+ "v8-compile-cache-lib": "^3.0.1",
+ "yn": "3.1.1"
+ },
+ "bin": {
+ "ts-node": "dist/bin.js",
+ "ts-node-cwd": "dist/bin-cwd.js",
+ "ts-node-esm": "dist/bin-esm.js",
+ "ts-node-script": "dist/bin-script.js",
+ "ts-node-transpile-only": "dist/bin-transpile.js",
+ "ts-script": "dist/bin-script-deprecated.js"
+ },
+ "peerDependencies": {
+ "@swc/core": ">=1.2.50",
+ "@swc/wasm": ">=1.2.50",
+ "@types/node": "*",
+ "typescript": ">=2.7"
+ },
+ "peerDependenciesMeta": {
+ "@swc/core": {
+ "optional": true
+ },
+ "@swc/wasm": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/type-is": {
+ "version": "1.6.18",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "dev": true,
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.24"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/typescript": {
+ "version": "4.7.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
+ "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
+ "dev": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=4.2.0"
+ }
+ },
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/update-browserslist-db": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz",
+ "integrity": "sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ }
+ ],
+ "dependencies": {
+ "escalade": "^3.1.1",
+ "picocolors": "^1.0.0"
+ },
+ "bin": {
+ "browserslist-lint": "cli.js"
+ },
+ "peerDependencies": {
+ "browserslist": ">= 4.21.0"
+ }
+ },
+ "node_modules/uri-js": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+ "dev": true,
+ "dependencies": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+ "dev": true
+ },
+ "node_modules/utils-merge": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/uuid": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
+ "dev": true,
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
+ "node_modules/v8-compile-cache-lib": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
+ "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
+ "dev": true,
+ "peer": true
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/watchpack": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
+ "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
+ "dev": true,
+ "dependencies": {
+ "glob-to-regexp": "^0.4.1",
+ "graceful-fs": "^4.1.2"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/wbuf": {
+ "version": "1.7.3",
+ "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz",
+ "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==",
+ "dev": true,
+ "dependencies": {
+ "minimalistic-assert": "^1.0.0"
+ }
+ },
+ "node_modules/webpack": {
+ "version": "5.76.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz",
+ "integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==",
+ "dev": true,
+ "dependencies": {
+ "@types/eslint-scope": "^3.7.3",
+ "@types/estree": "^0.0.51",
+ "@webassemblyjs/ast": "1.11.1",
+ "@webassemblyjs/wasm-edit": "1.11.1",
+ "@webassemblyjs/wasm-parser": "1.11.1",
+ "acorn": "^8.7.1",
+ "acorn-import-assertions": "^1.7.6",
+ "browserslist": "^4.14.5",
+ "chrome-trace-event": "^1.0.2",
+ "enhanced-resolve": "^5.10.0",
+ "es-module-lexer": "^0.9.0",
+ "eslint-scope": "5.1.1",
+ "events": "^3.2.0",
+ "glob-to-regexp": "^0.4.1",
+ "graceful-fs": "^4.2.9",
+ "json-parse-even-better-errors": "^2.3.1",
+ "loader-runner": "^4.2.0",
+ "mime-types": "^2.1.27",
+ "neo-async": "^2.6.2",
+ "schema-utils": "^3.1.0",
+ "tapable": "^2.1.1",
+ "terser-webpack-plugin": "^5.1.3",
+ "watchpack": "^2.4.0",
+ "webpack-sources": "^3.2.3"
+ },
+ "bin": {
+ "webpack": "bin/webpack.js"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependenciesMeta": {
+ "webpack-cli": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/webpack-cli": {
+ "version": "4.10.0",
+ "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz",
+ "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==",
+ "dev": true,
+ "dependencies": {
+ "@discoveryjs/json-ext": "^0.5.0",
+ "@webpack-cli/configtest": "^1.2.0",
+ "@webpack-cli/info": "^1.5.0",
+ "@webpack-cli/serve": "^1.7.0",
+ "colorette": "^2.0.14",
+ "commander": "^7.0.0",
+ "cross-spawn": "^7.0.3",
+ "fastest-levenshtein": "^1.0.12",
+ "import-local": "^3.0.2",
+ "interpret": "^2.2.0",
+ "rechoir": "^0.7.0",
+ "webpack-merge": "^5.7.3"
+ },
+ "bin": {
+ "webpack-cli": "bin/cli.js"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "4.x.x || 5.x.x"
+ },
+ "peerDependenciesMeta": {
+ "@webpack-cli/generators": {
+ "optional": true
+ },
+ "@webpack-cli/migrate": {
+ "optional": true
+ },
+ "webpack-bundle-analyzer": {
+ "optional": true
+ },
+ "webpack-dev-server": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/webpack-cli/node_modules/commander": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
+ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/webpack-dev-middleware": {
+ "version": "5.3.3",
+ "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz",
+ "integrity": "sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==",
+ "dev": true,
+ "dependencies": {
+ "colorette": "^2.0.10",
+ "memfs": "^3.4.3",
+ "mime-types": "^2.1.31",
+ "range-parser": "^1.2.1",
+ "schema-utils": "^4.0.0"
+ },
+ "engines": {
+ "node": ">= 12.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "^4.0.0 || ^5.0.0"
+ }
+ },
+ "node_modules/webpack-dev-middleware/node_modules/ajv": {
+ "version": "8.11.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz",
+ "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/webpack-dev-middleware/node_modules/ajv-keywords": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
+ "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3"
+ },
+ "peerDependencies": {
+ "ajv": "^8.8.2"
+ }
+ },
+ "node_modules/webpack-dev-middleware/node_modules/json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ },
+ "node_modules/webpack-dev-middleware/node_modules/schema-utils": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz",
+ "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==",
+ "dev": true,
+ "dependencies": {
+ "@types/json-schema": "^7.0.9",
+ "ajv": "^8.8.0",
+ "ajv-formats": "^2.1.1",
+ "ajv-keywords": "^5.0.0"
+ },
+ "engines": {
+ "node": ">= 12.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/webpack-dev-server": {
+ "version": "4.9.3",
+ "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.9.3.tgz",
+ "integrity": "sha512-3qp/eoboZG5/6QgiZ3llN8TUzkSpYg1Ko9khWX1h40MIEUNS2mDoIa8aXsPfskER+GbTvs/IJZ1QTBBhhuetSw==",
+ "dev": true,
+ "dependencies": {
+ "@types/bonjour": "^3.5.9",
+ "@types/connect-history-api-fallback": "^1.3.5",
+ "@types/express": "^4.17.13",
+ "@types/serve-index": "^1.9.1",
+ "@types/serve-static": "^1.13.10",
+ "@types/sockjs": "^0.3.33",
+ "@types/ws": "^8.5.1",
+ "ansi-html-community": "^0.0.8",
+ "bonjour-service": "^1.0.11",
+ "chokidar": "^3.5.3",
+ "colorette": "^2.0.10",
+ "compression": "^1.7.4",
+ "connect-history-api-fallback": "^2.0.0",
+ "default-gateway": "^6.0.3",
+ "express": "^4.17.3",
+ "graceful-fs": "^4.2.6",
+ "html-entities": "^2.3.2",
+ "http-proxy-middleware": "^2.0.3",
+ "ipaddr.js": "^2.0.1",
+ "open": "^8.0.9",
+ "p-retry": "^4.5.0",
+ "rimraf": "^3.0.2",
+ "schema-utils": "^4.0.0",
+ "selfsigned": "^2.0.1",
+ "serve-index": "^1.9.1",
+ "sockjs": "^0.3.24",
+ "spdy": "^4.0.2",
+ "webpack-dev-middleware": "^5.3.1",
+ "ws": "^8.4.2"
+ },
+ "bin": {
+ "webpack-dev-server": "bin/webpack-dev-server.js"
+ },
+ "engines": {
+ "node": ">= 12.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "^4.37.0 || ^5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "webpack-cli": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/webpack-dev-server/node_modules/ajv": {
+ "version": "8.11.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz",
+ "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/webpack-dev-server/node_modules/ajv-keywords": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
+ "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3"
+ },
+ "peerDependencies": {
+ "ajv": "^8.8.2"
+ }
+ },
+ "node_modules/webpack-dev-server/node_modules/json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ },
+ "node_modules/webpack-dev-server/node_modules/schema-utils": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz",
+ "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==",
+ "dev": true,
+ "dependencies": {
+ "@types/json-schema": "^7.0.9",
+ "ajv": "^8.8.0",
+ "ajv-formats": "^2.1.1",
+ "ajv-keywords": "^5.0.0"
+ },
+ "engines": {
+ "node": ">= 12.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/webpack-merge": {
+ "version": "5.8.0",
+ "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz",
+ "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==",
+ "dev": true,
+ "dependencies": {
+ "clone-deep": "^4.0.1",
+ "wildcard": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/webpack-sources": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",
+ "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
+ "dev": true,
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/websocket-driver": {
+ "version": "0.7.4",
+ "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz",
+ "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==",
+ "dev": true,
+ "dependencies": {
+ "http-parser-js": ">=0.5.1",
+ "safe-buffer": ">=5.1.0",
+ "websocket-extensions": ">=0.1.1"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/websocket-extensions": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz",
+ "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/wildcard": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz",
+ "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==",
+ "dev": true
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "dev": true
+ },
+ "node_modules/ws": {
+ "version": "8.8.1",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz",
+ "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": "^5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "node_modules/yn": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
+ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
+ "dev": true,
+ "peer": true,
+ "engines": {
+ "node": ">=6"
+ }
+ }
+ },
+ "dependencies": {
+ "@babel/code-frame": {
+ "version": "7.21.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz",
+ "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==",
+ "dev": true,
+ "requires": {
+ "@babel/highlight": "^7.18.6"
+ }
+ },
+ "@babel/helper-validator-identifier": {
+ "version": "7.19.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz",
+ "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==",
+ "dev": true
+ },
+ "@babel/highlight": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz",
+ "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.18.6",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "@cspotcode/source-map-support": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "@jridgewell/trace-mapping": "0.3.9"
+ },
+ "dependencies": {
+ "@jridgewell/trace-mapping": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+ "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ }
+ }
+ },
+ "@discoveryjs/json-ext": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz",
+ "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==",
+ "dev": true
+ },
+ "@jridgewell/gen-mapping": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz",
+ "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/set-array": "^1.0.1",
+ "@jridgewell/sourcemap-codec": "^1.4.10",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ }
+ },
+ "@jridgewell/resolve-uri": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
+ "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
+ "dev": true
+ },
+ "@jridgewell/set-array": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
+ "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
+ "dev": true
+ },
+ "@jridgewell/source-map": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz",
+ "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/gen-mapping": "^0.3.0",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ }
+ },
+ "@jridgewell/sourcemap-codec": {
+ "version": "1.4.14",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
+ "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
+ "dev": true
+ },
+ "@jridgewell/trace-mapping": {
+ "version": "0.3.17",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz",
+ "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/resolve-uri": "3.1.0",
+ "@jridgewell/sourcemap-codec": "1.4.14"
+ }
+ },
+ "@leichtgewicht/ip-codec": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
+ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==",
+ "dev": true
+ },
+ "@popperjs/core": {
+ "version": "2.11.5",
+ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz",
+ "integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw=="
+ },
+ "@tsconfig/node10": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
+ "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
+ "dev": true,
+ "peer": true
+ },
+ "@tsconfig/node12": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
+ "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
+ "dev": true,
+ "peer": true
+ },
+ "@tsconfig/node14": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
+ "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
+ "dev": true,
+ "peer": true
+ },
+ "@tsconfig/node16": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
+ "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
+ "dev": true,
+ "peer": true
+ },
+ "@types/body-parser": {
+ "version": "1.19.2",
+ "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz",
+ "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==",
+ "dev": true,
+ "requires": {
+ "@types/connect": "*",
+ "@types/node": "*"
+ }
+ },
+ "@types/bonjour": {
+ "version": "3.5.10",
+ "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.10.tgz",
+ "integrity": "sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@types/bootstrap": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/@types/bootstrap/-/bootstrap-5.2.1.tgz",
+ "integrity": "sha512-jPdLpDnBTHeocqelEz+ZVP2eY12hIBXgJLV/n0URiQiiNLdCgHwDqaI0chijjn1qwvDNbjzhKDeYAHxsnIGtIA==",
+ "dev": true,
+ "requires": {
+ "@popperjs/core": "^2.9.2"
+ }
+ },
+ "@types/connect": {
+ "version": "3.4.35",
+ "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
+ "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@types/connect-history-api-fallback": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz",
+ "integrity": "sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw==",
+ "dev": true,
+ "requires": {
+ "@types/express-serve-static-core": "*",
+ "@types/node": "*"
+ }
+ },
+ "@types/eslint": {
+ "version": "8.21.2",
+ "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.21.2.tgz",
+ "integrity": "sha512-EMpxUyystd3uZVByZap1DACsMXvb82ypQnGn89e1Y0a+LYu3JJscUd/gqhRsVFDkaD2MIiWo0MT8EfXr3DGRKw==",
+ "dev": true,
+ "requires": {
+ "@types/estree": "*",
+ "@types/json-schema": "*"
+ }
+ },
+ "@types/eslint-scope": {
+ "version": "3.7.4",
+ "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz",
+ "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==",
+ "dev": true,
+ "requires": {
+ "@types/eslint": "*",
+ "@types/estree": "*"
+ }
+ },
+ "@types/estree": {
+ "version": "0.0.51",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz",
+ "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==",
+ "dev": true
+ },
+ "@types/express": {
+ "version": "4.17.13",
+ "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz",
+ "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==",
+ "dev": true,
+ "requires": {
+ "@types/body-parser": "*",
+ "@types/express-serve-static-core": "^4.17.18",
+ "@types/qs": "*",
+ "@types/serve-static": "*"
+ }
+ },
+ "@types/express-serve-static-core": {
+ "version": "4.17.30",
+ "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.30.tgz",
+ "integrity": "sha512-gstzbTWro2/nFed1WXtf+TtrpwxH7Ggs4RLYTLbeVgIkUQOI3WG/JKjgeOU1zXDvezllupjrf8OPIdvTbIaVOQ==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*",
+ "@types/qs": "*",
+ "@types/range-parser": "*"
+ }
+ },
+ "@types/http-proxy": {
+ "version": "1.17.9",
+ "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.9.tgz",
+ "integrity": "sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@types/json-schema": {
+ "version": "7.0.11",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
+ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
+ "dev": true
+ },
+ "@types/mime": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.0.tgz",
+ "integrity": "sha512-fccbsHKqFDXClBZTDLA43zl0+TbxyIwyzIzwwhvoJvhNjOErCdeX2xJbURimv2EbSVUGav001PaCJg4mZxMl4w==",
+ "dev": true
+ },
+ "@types/node": {
+ "version": "18.6.1",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.1.tgz",
+ "integrity": "sha512-z+2vB6yDt1fNwKOeGbckpmirO+VBDuQqecXkgeIqDlaOtmKn6hPR/viQ8cxCfqLU4fTlvM3+YjM367TukWdxpg==",
+ "dev": true
+ },
+ "@types/qs": {
+ "version": "6.9.7",
+ "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
+ "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==",
+ "dev": true
+ },
+ "@types/range-parser": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
+ "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==",
+ "dev": true
+ },
+ "@types/retry": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz",
+ "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==",
+ "dev": true
+ },
+ "@types/serve-index": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.1.tgz",
+ "integrity": "sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg==",
+ "dev": true,
+ "requires": {
+ "@types/express": "*"
+ }
+ },
+ "@types/serve-static": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.0.tgz",
+ "integrity": "sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==",
+ "dev": true,
+ "requires": {
+ "@types/mime": "*",
+ "@types/node": "*"
+ }
+ },
+ "@types/sockjs": {
+ "version": "0.3.33",
+ "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.33.tgz",
+ "integrity": "sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@types/ws": {
+ "version": "8.5.3",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz",
+ "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@webassemblyjs/ast": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
+ "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/helper-numbers": "1.11.1",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.1"
+ }
+ },
+ "@webassemblyjs/floating-point-hex-parser": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz",
+ "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==",
+ "dev": true
+ },
+ "@webassemblyjs/helper-api-error": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz",
+ "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==",
+ "dev": true
+ },
+ "@webassemblyjs/helper-buffer": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz",
+ "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==",
+ "dev": true
+ },
+ "@webassemblyjs/helper-numbers": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz",
+ "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/floating-point-hex-parser": "1.11.1",
+ "@webassemblyjs/helper-api-error": "1.11.1",
+ "@xtuc/long": "4.2.2"
+ }
+ },
+ "@webassemblyjs/helper-wasm-bytecode": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz",
+ "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==",
+ "dev": true
+ },
+ "@webassemblyjs/helper-wasm-section": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz",
+ "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/ast": "1.11.1",
+ "@webassemblyjs/helper-buffer": "1.11.1",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
+ "@webassemblyjs/wasm-gen": "1.11.1"
+ }
+ },
+ "@webassemblyjs/ieee754": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz",
+ "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==",
+ "dev": true,
+ "requires": {
+ "@xtuc/ieee754": "^1.2.0"
+ }
+ },
+ "@webassemblyjs/leb128": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz",
+ "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==",
+ "dev": true,
+ "requires": {
+ "@xtuc/long": "4.2.2"
+ }
+ },
+ "@webassemblyjs/utf8": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz",
+ "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==",
+ "dev": true
+ },
+ "@webassemblyjs/wasm-edit": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz",
+ "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/ast": "1.11.1",
+ "@webassemblyjs/helper-buffer": "1.11.1",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
+ "@webassemblyjs/helper-wasm-section": "1.11.1",
+ "@webassemblyjs/wasm-gen": "1.11.1",
+ "@webassemblyjs/wasm-opt": "1.11.1",
+ "@webassemblyjs/wasm-parser": "1.11.1",
+ "@webassemblyjs/wast-printer": "1.11.1"
+ }
+ },
+ "@webassemblyjs/wasm-gen": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz",
+ "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/ast": "1.11.1",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
+ "@webassemblyjs/ieee754": "1.11.1",
+ "@webassemblyjs/leb128": "1.11.1",
+ "@webassemblyjs/utf8": "1.11.1"
+ }
+ },
+ "@webassemblyjs/wasm-opt": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz",
+ "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/ast": "1.11.1",
+ "@webassemblyjs/helper-buffer": "1.11.1",
+ "@webassemblyjs/wasm-gen": "1.11.1",
+ "@webassemblyjs/wasm-parser": "1.11.1"
+ }
+ },
+ "@webassemblyjs/wasm-parser": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz",
+ "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/ast": "1.11.1",
+ "@webassemblyjs/helper-api-error": "1.11.1",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
+ "@webassemblyjs/ieee754": "1.11.1",
+ "@webassemblyjs/leb128": "1.11.1",
+ "@webassemblyjs/utf8": "1.11.1"
+ }
+ },
+ "@webassemblyjs/wast-printer": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz",
+ "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/ast": "1.11.1",
+ "@xtuc/long": "4.2.2"
+ }
+ },
+ "@webpack-cli/configtest": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz",
+ "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==",
+ "dev": true,
+ "requires": {}
+ },
+ "@webpack-cli/info": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz",
+ "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==",
+ "dev": true,
+ "requires": {
+ "envinfo": "^7.7.3"
+ }
+ },
+ "@webpack-cli/serve": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz",
+ "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==",
+ "dev": true,
+ "requires": {}
+ },
+ "@xtuc/ieee754": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
+ "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==",
+ "dev": true
+ },
+ "@xtuc/long": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz",
+ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
+ "dev": true
+ },
+ "accepts": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "dev": true,
+ "requires": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ }
+ },
+ "acorn": {
+ "version": "8.8.2",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
+ "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==",
+ "dev": true
+ },
+ "acorn-import-assertions": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz",
+ "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==",
+ "dev": true,
+ "requires": {}
+ },
+ "acorn-walk": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz",
+ "integrity": "sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==",
+ "dev": true,
+ "peer": true
+ },
+ "ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ajv-formats": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
+ "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
+ "dev": true,
+ "requires": {
+ "ajv": "^8.0.0"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "8.11.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz",
+ "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ }
+ }
+ },
+ "ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "requires": {}
+ },
+ "ansi-html-community": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz",
+ "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "anymatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
+ "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
+ "dev": true,
+ "requires": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ }
+ },
+ "arg": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
+ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
+ "dev": true,
+ "peer": true
+ },
+ "argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "dev": true
+ },
+ "array-flatten": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz",
+ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==",
+ "dev": true
+ },
+ "autoprefixer": {
+ "version": "10.4.8",
+ "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.8.tgz",
+ "integrity": "sha512-75Jr6Q/XpTqEf6D2ltS5uMewJIx5irCU1oBYJrWjFenq/m12WRRrz6g15L1EIoYvPLXTbEry7rDOwrcYNj77xw==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.21.3",
+ "caniuse-lite": "^1.0.30001373",
+ "fraction.js": "^4.2.0",
+ "normalize-range": "^0.1.2",
+ "picocolors": "^1.0.0",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "dependencies": {
+ "caniuse-lite": {
+ "version": "1.0.30001373",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001373.tgz",
+ "integrity": "sha512-pJYArGHrPp3TUqQzFYRmP/lwJlj8RCbVe3Gd3eJQkAV8SAC6b19XS9BjMvRdvaS8RMkaTN8ZhoHP6S1y8zzwEQ==",
+ "dev": true
+ }
+ }
+ },
+ "balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
+ },
+ "batch": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz",
+ "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==",
+ "dev": true
+ },
+ "binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "dev": true
+ },
+ "body-parser": {
+ "version": "1.20.0",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz",
+ "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==",
+ "dev": true,
+ "requires": {
+ "bytes": "3.1.2",
+ "content-type": "~1.0.4",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "on-finished": "2.4.1",
+ "qs": "6.10.3",
+ "raw-body": "2.5.1",
+ "type-is": "~1.6.18",
+ "unpipe": "1.0.0"
+ },
+ "dependencies": {
+ "bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "dev": true
+ }
+ }
+ },
+ "bonjour-service": {
+ "version": "1.0.13",
+ "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.0.13.tgz",
+ "integrity": "sha512-LWKRU/7EqDUC9CTAQtuZl5HzBALoCYwtLhffW3et7vZMwv3bWLpJf8bRYlMD5OCcDpTfnPgNCV4yo9ZIaJGMiA==",
+ "dev": true,
+ "requires": {
+ "array-flatten": "^2.1.2",
+ "dns-equal": "^1.0.0",
+ "fast-deep-equal": "^3.1.3",
+ "multicast-dns": "^7.2.5"
+ }
+ },
+ "bootstrap": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.0.tgz",
+ "integrity": "sha512-qlnS9GL6YZE6Wnef46GxGv1UpGGzAwO0aPL1yOjzDIJpeApeMvqV24iL+pjr2kU4dduoBA9fINKWKgMToobx9A==",
+ "requires": {}
+ },
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "requires": {
+ "fill-range": "^7.0.1"
+ }
+ },
+ "browserslist": {
+ "version": "4.21.3",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz",
+ "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==",
+ "dev": true,
+ "requires": {
+ "caniuse-lite": "^1.0.30001370",
+ "electron-to-chromium": "^1.4.202",
+ "node-releases": "^2.0.6",
+ "update-browserslist-db": "^1.0.5"
+ }
+ },
+ "buffer-from": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+ "dev": true
+ },
+ "bytes": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
+ "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==",
+ "dev": true
+ },
+ "call-bind": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2"
+ }
+ },
+ "callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true
+ },
+ "caniuse-lite": {
+ "version": "1.0.30001370",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001370.tgz",
+ "integrity": "sha512-3PDmaP56wz/qz7G508xzjx8C+MC2qEm4SYhSEzC9IBROo+dGXFWRuaXkWti0A9tuI00g+toiriVqxtWMgl350g==",
+ "dev": true
+ },
+ "chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "dev": true,
+ "requires": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "fsevents": "~2.3.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ }
+ },
+ "chrome-trace-event": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",
+ "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==",
+ "dev": true
+ },
+ "clone-deep": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz",
+ "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==",
+ "dev": true,
+ "requires": {
+ "is-plain-object": "^2.0.4",
+ "kind-of": "^6.0.2",
+ "shallow-clone": "^3.0.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "colorette": {
+ "version": "2.0.19",
+ "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz",
+ "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==",
+ "dev": true
+ },
+ "commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "dev": true
+ },
+ "compressible": {
+ "version": "2.0.18",
+ "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
+ "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==",
+ "dev": true,
+ "requires": {
+ "mime-db": ">= 1.43.0 < 2"
+ }
+ },
+ "compression": {
+ "version": "1.7.4",
+ "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz",
+ "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==",
+ "dev": true,
+ "requires": {
+ "accepts": "~1.3.5",
+ "bytes": "3.0.0",
+ "compressible": "~2.0.16",
+ "debug": "2.6.9",
+ "on-headers": "~1.0.2",
+ "safe-buffer": "5.1.2",
+ "vary": "~1.1.2"
+ },
+ "dependencies": {
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ }
+ }
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true
+ },
+ "connect-history-api-fallback": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz",
+ "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==",
+ "dev": true
+ },
+ "content-disposition": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "5.2.1"
+ }
+ },
+ "content-type": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
+ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
+ "dev": true
+ },
+ "cookie": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
+ "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
+ "dev": true
+ },
+ "cookie-signature": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
+ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
+ "dev": true
+ },
+ "core-util-is": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
+ "dev": true
+ },
+ "cosmiconfig": {
+ "version": "8.1.3",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz",
+ "integrity": "sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==",
+ "dev": true,
+ "requires": {
+ "import-fresh": "^3.2.1",
+ "js-yaml": "^4.1.0",
+ "parse-json": "^5.0.0",
+ "path-type": "^4.0.0"
+ }
+ },
+ "cosmiconfig-typescript-loader": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.3.0.tgz",
+ "integrity": "sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q==",
+ "dev": true,
+ "requires": {}
+ },
+ "create-require": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
+ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
+ "dev": true,
+ "peer": true
+ },
+ "cross-spawn": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "dev": true,
+ "requires": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ }
+ },
+ "css-loader": {
+ "version": "6.7.1",
+ "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.7.1.tgz",
+ "integrity": "sha512-yB5CNFa14MbPJcomwNh3wLThtkZgcNyI2bNMRt8iE5Z8Vwl7f8vQXFAzn2HDOJvtDq2NTZBUGMSUNNyrv3/+cw==",
+ "dev": true,
+ "requires": {
+ "icss-utils": "^5.1.0",
+ "postcss": "^8.4.7",
+ "postcss-modules-extract-imports": "^3.0.0",
+ "postcss-modules-local-by-default": "^4.0.0",
+ "postcss-modules-scope": "^3.0.0",
+ "postcss-modules-values": "^4.0.0",
+ "postcss-value-parser": "^4.2.0",
+ "semver": "^7.3.5"
+ }
+ },
+ "cssesc": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
+ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
+ "dev": true
+ },
+ "data.either": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/data.either/-/data.either-1.5.2.tgz",
+ "integrity": "sha512-ADXzxd3HiUzK+X0Txy8ZxzGKlQcVVMITkQ6yOWZ61EFxQ4a4YEHIMI4mPYc7U4q/3btGNMpJ9+Mt+Q/IWAQCZw=="
+ },
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "default-gateway": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz",
+ "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==",
+ "dev": true,
+ "requires": {
+ "execa": "^5.0.0"
+ }
+ },
+ "define-lazy-prop": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
+ "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==",
+ "dev": true
+ },
+ "depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "dev": true
+ },
+ "destroy": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+ "dev": true
+ },
+ "detect-node": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",
+ "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==",
+ "dev": true
+ },
+ "diff": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+ "dev": true,
+ "peer": true
+ },
+ "dns-equal": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz",
+ "integrity": "sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==",
+ "dev": true
+ },
+ "dns-packet": {
+ "version": "5.4.0",
+ "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.4.0.tgz",
+ "integrity": "sha512-EgqGeaBB8hLiHLZtp/IbaDQTL8pZ0+IvwzSHA6d7VyMDM+B9hgddEMa9xjK5oYnw0ci0JQ6g2XCD7/f6cafU6g==",
+ "dev": true,
+ "requires": {
+ "@leichtgewicht/ip-codec": "^2.0.1"
+ }
+ },
+ "ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "dev": true
+ },
+ "electron-to-chromium": {
+ "version": "1.4.202",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.202.tgz",
+ "integrity": "sha512-JYsK2ex9lmQD27kj19fhXYxzFJ/phLAkLKHv49A5UY6kMRV2xED3qMMLg/voW/+0AR6wMiI+VxlmK9NDtdxlPA==",
+ "dev": true
+ },
+ "encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "dev": true
+ },
+ "enhanced-resolve": {
+ "version": "5.10.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz",
+ "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.2.4",
+ "tapable": "^2.2.0"
+ }
+ },
+ "envinfo": {
+ "version": "7.8.1",
+ "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz",
+ "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==",
+ "dev": true
+ },
+ "error-ex": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+ "dev": true,
+ "requires": {
+ "is-arrayish": "^0.2.1"
+ }
+ },
+ "es-module-lexer": {
+ "version": "0.9.3",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz",
+ "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==",
+ "dev": true
+ },
+ "escalade": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+ "dev": true
+ },
+ "escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "dev": true
+ },
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "dev": true
+ },
+ "eslint-scope": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
+ "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
+ "dev": true,
+ "requires": {
+ "esrecurse": "^4.3.0",
+ "estraverse": "^4.1.1"
+ }
+ },
+ "esrecurse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+ "dev": true,
+ "requires": {
+ "estraverse": "^5.2.0"
+ },
+ "dependencies": {
+ "estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "dev": true
+ }
+ }
+ },
+ "estraverse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
+ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
+ "dev": true
+ },
+ "etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "dev": true
+ },
+ "eventemitter3": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
+ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
+ "dev": true
+ },
+ "events": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
+ "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
+ "dev": true
+ },
+ "execa": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
+ "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
+ "dev": true,
+ "requires": {
+ "cross-spawn": "^7.0.3",
+ "get-stream": "^6.0.0",
+ "human-signals": "^2.1.0",
+ "is-stream": "^2.0.0",
+ "merge-stream": "^2.0.0",
+ "npm-run-path": "^4.0.1",
+ "onetime": "^5.1.2",
+ "signal-exit": "^3.0.3",
+ "strip-final-newline": "^2.0.0"
+ }
+ },
+ "express": {
+ "version": "4.18.1",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz",
+ "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==",
+ "dev": true,
+ "requires": {
+ "accepts": "~1.3.8",
+ "array-flatten": "1.1.1",
+ "body-parser": "1.20.0",
+ "content-disposition": "0.5.4",
+ "content-type": "~1.0.4",
+ "cookie": "0.5.0",
+ "cookie-signature": "1.0.6",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "1.2.0",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "merge-descriptors": "1.0.1",
+ "methods": "~1.1.2",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "path-to-regexp": "0.1.7",
+ "proxy-addr": "~2.0.7",
+ "qs": "6.10.3",
+ "range-parser": "~1.2.1",
+ "safe-buffer": "5.2.1",
+ "send": "0.18.0",
+ "serve-static": "1.15.0",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "type-is": "~1.6.18",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ },
+ "dependencies": {
+ "array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
+ "dev": true
+ }
+ }
+ },
+ "fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true
+ },
+ "fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+ "dev": true
+ },
+ "fastest-levenshtein": {
+ "version": "1.0.14",
+ "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.14.tgz",
+ "integrity": "sha512-tFfWHjnuUfKE186Tfgr+jtaFc0mZTApEgKDOeyN+FwOqRkO/zK/3h1AiRd8u8CY53owL3CUmGr/oI9p/RdyLTA==",
+ "dev": true
+ },
+ "faye-websocket": {
+ "version": "0.11.4",
+ "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz",
+ "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==",
+ "dev": true,
+ "requires": {
+ "websocket-driver": ">=0.5.1"
+ }
+ },
+ "fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "requires": {
+ "to-regex-range": "^5.0.1"
+ }
+ },
+ "finalhandler": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
+ "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
+ "dev": true,
+ "requires": {
+ "debug": "2.6.9",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "statuses": "2.0.1",
+ "unpipe": "~1.0.0"
+ }
+ },
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "follow-redirects": {
+ "version": "1.15.1",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
+ "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==",
+ "dev": true
+ },
+ "forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "dev": true
+ },
+ "fraction.js": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz",
+ "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==",
+ "dev": true
+ },
+ "fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+ "dev": true
+ },
+ "fs-monkey": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.3.tgz",
+ "integrity": "sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q==",
+ "dev": true
+ },
+ "fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+ "dev": true
+ },
+ "fsevents": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+ "dev": true,
+ "optional": true
+ },
+ "function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+ "dev": true
+ },
+ "get-intrinsic": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz",
+ "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.3"
+ }
+ },
+ "get-stream": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
+ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
+ "dev": true
+ },
+ "glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "requires": {
+ "is-glob": "^4.0.1"
+ }
+ },
+ "glob-to-regexp": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
+ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==",
+ "dev": true
+ },
+ "graceful-fs": {
+ "version": "4.2.10",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
+ "dev": true
+ },
+ "handle-thing": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz",
+ "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==",
+ "dev": true
+ },
+ "has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1"
+ }
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "has-symbols": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+ "dev": true
+ },
+ "hpack.js": {
+ "version": "2.1.6",
+ "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz",
+ "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.1",
+ "obuf": "^1.0.0",
+ "readable-stream": "^2.0.1",
+ "wbuf": "^1.1.0"
+ },
+ "dependencies": {
+ "readable-stream": {
+ "version": "2.3.7",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ }
+ }
+ },
+ "html-entities": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.3.tgz",
+ "integrity": "sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==",
+ "dev": true
+ },
+ "http-deceiver": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz",
+ "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==",
+ "dev": true
+ },
+ "http-errors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
+ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+ "dev": true,
+ "requires": {
+ "depd": "2.0.0",
+ "inherits": "2.0.4",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "toidentifier": "1.0.1"
+ }
+ },
+ "http-parser-js": {
+ "version": "0.5.8",
+ "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz",
+ "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==",
+ "dev": true
+ },
+ "http-proxy": {
+ "version": "1.18.1",
+ "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
+ "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
+ "dev": true,
+ "requires": {
+ "eventemitter3": "^4.0.0",
+ "follow-redirects": "^1.0.0",
+ "requires-port": "^1.0.0"
+ }
+ },
+ "http-proxy-middleware": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz",
+ "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==",
+ "dev": true,
+ "requires": {
+ "@types/http-proxy": "^1.17.8",
+ "http-proxy": "^1.18.1",
+ "is-glob": "^4.0.1",
+ "is-plain-obj": "^3.0.0",
+ "micromatch": "^4.0.2"
+ }
+ },
+ "human-signals": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
+ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
+ "dev": true
+ },
+ "iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "dev": true,
+ "requires": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ }
+ },
+ "icss-utils": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
+ "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==",
+ "dev": true,
+ "requires": {}
+ },
+ "icu4x": {
+ "version": "file:../../package",
+ "requires": {
+ "ava": "^5.3.1",
+ "benchmark": "^2.1.4"
+ }
+ },
+ "immutable": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz",
+ "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==",
+ "dev": true
+ },
+ "import-fresh": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
+ "dev": true,
+ "requires": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ },
+ "dependencies": {
+ "resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true
+ }
+ }
+ },
+ "import-local": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz",
+ "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==",
+ "dev": true,
+ "requires": {
+ "pkg-dir": "^4.2.0",
+ "resolve-cwd": "^3.0.0"
+ }
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "dev": true,
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true
+ },
+ "interpret": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz",
+ "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==",
+ "dev": true
+ },
+ "ipaddr.js": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz",
+ "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==",
+ "dev": true
+ },
+ "is-arrayish": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
+ "dev": true
+ },
+ "is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "requires": {
+ "binary-extensions": "^2.0.0"
+ }
+ },
+ "is-core-module": {
+ "version": "2.9.0",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz",
+ "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==",
+ "dev": true,
+ "requires": {
+ "has": "^1.0.3"
+ }
+ },
+ "is-docker": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
+ "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
+ "dev": true
+ },
+ "is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true
+ },
+ "is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^2.1.1"
+ }
+ },
+ "is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true
+ },
+ "is-plain-obj": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz",
+ "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==",
+ "dev": true
+ },
+ "is-plain-object": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "dev": true,
+ "requires": {
+ "isobject": "^3.0.1"
+ }
+ },
+ "is-stream": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
+ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
+ "dev": true
+ },
+ "is-wsl": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
+ "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
+ "dev": true,
+ "requires": {
+ "is-docker": "^2.0.0"
+ }
+ },
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
+ "dev": true
+ },
+ "isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "dev": true
+ },
+ "isobject": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==",
+ "dev": true
+ },
+ "jest-worker": {
+ "version": "27.5.1",
+ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz",
+ "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*",
+ "merge-stream": "^2.0.0",
+ "supports-color": "^8.0.0"
+ },
+ "dependencies": {
+ "supports-color": {
+ "version": "8.1.1",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
+ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ }
+ }
+ },
+ "js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "dev": true
+ },
+ "js-yaml": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
+ "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "dev": true,
+ "requires": {
+ "argparse": "^2.0.1"
+ }
+ },
+ "json-parse-even-better-errors": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
+ "dev": true
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "kind-of": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
+ "dev": true
+ },
+ "klona": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.5.tgz",
+ "integrity": "sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ==",
+ "dev": true
+ },
+ "lines-and-columns": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
+ "dev": true
+ },
+ "loader-runner": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",
+ "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==",
+ "dev": true
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "make-error": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
+ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
+ "dev": true,
+ "peer": true
+ },
+ "media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+ "dev": true
+ },
+ "memfs": {
+ "version": "3.4.7",
+ "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.7.tgz",
+ "integrity": "sha512-ygaiUSNalBX85388uskeCyhSAoOSgzBbtVCr9jA2RROssFL9Q19/ZXFqS+2Th2sr1ewNIWgFdLzLC3Yl1Zv+lw==",
+ "dev": true,
+ "requires": {
+ "fs-monkey": "^1.0.3"
+ }
+ },
+ "merge-descriptors": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
+ "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==",
+ "dev": true
+ },
+ "merge-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
+ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
+ "dev": true
+ },
+ "methods": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
+ "dev": true
+ },
+ "micromatch": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "dev": true,
+ "requires": {
+ "braces": "^3.0.2",
+ "picomatch": "^2.3.1"
+ }
+ },
+ "mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "dev": true
+ },
+ "mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "dev": true
+ },
+ "mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dev": true,
+ "requires": {
+ "mime-db": "1.52.0"
+ }
+ },
+ "mimic-fn": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "dev": true
+ },
+ "minimalistic-assert": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
+ "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ },
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "dev": true
+ },
+ "multicast-dns": {
+ "version": "7.2.5",
+ "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz",
+ "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==",
+ "dev": true,
+ "requires": {
+ "dns-packet": "^5.2.2",
+ "thunky": "^1.0.2"
+ }
+ },
+ "negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "dev": true
+ },
+ "neo-async": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
+ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
+ "dev": true
+ },
+ "node-forge": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
+ "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
+ "dev": true
+ },
+ "node-releases": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz",
+ "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==",
+ "dev": true
+ },
+ "normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true
+ },
+ "normalize-range": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
+ "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
+ "dev": true
+ },
+ "npm-run-path": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
+ "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
+ "dev": true,
+ "requires": {
+ "path-key": "^3.0.0"
+ }
+ },
+ "object-inspect": {
+ "version": "1.12.2",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",
+ "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==",
+ "dev": true
+ },
+ "obuf": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz",
+ "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==",
+ "dev": true
+ },
+ "on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "dev": true,
+ "requires": {
+ "ee-first": "1.1.1"
+ }
+ },
+ "on-headers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
+ "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==",
+ "dev": true
+ },
+ "once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dev": true,
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "onetime": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+ "dev": true,
+ "requires": {
+ "mimic-fn": "^2.1.0"
+ }
+ },
+ "open": {
+ "version": "8.4.0",
+ "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz",
+ "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==",
+ "dev": true,
+ "requires": {
+ "define-lazy-prop": "^2.0.0",
+ "is-docker": "^2.1.1",
+ "is-wsl": "^2.2.0"
+ }
+ },
+ "p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "dev": true,
+ "requires": {
+ "p-try": "^2.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ },
+ "p-retry": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz",
+ "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==",
+ "dev": true,
+ "requires": {
+ "@types/retry": "0.12.0",
+ "retry": "^0.13.1"
+ }
+ },
+ "p-try": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+ "dev": true
+ },
+ "parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "requires": {
+ "callsites": "^3.0.0"
+ }
+ },
+ "parse-json": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "error-ex": "^1.3.1",
+ "json-parse-even-better-errors": "^2.3.0",
+ "lines-and-columns": "^1.1.6"
+ }
+ },
+ "parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "dev": true
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "dev": true
+ },
+ "path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true
+ },
+ "path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "dev": true
+ },
+ "path-to-regexp": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
+ "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==",
+ "dev": true
+ },
+ "path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true
+ },
+ "picocolors": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+ "dev": true
+ },
+ "picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true
+ },
+ "pkg-dir": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+ "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+ "dev": true,
+ "requires": {
+ "find-up": "^4.0.0"
+ }
+ },
+ "postcss": {
+ "version": "8.4.31",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
+ "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
+ "dev": true,
+ "requires": {
+ "nanoid": "^3.3.6",
+ "picocolors": "^1.0.0",
+ "source-map-js": "^1.0.2"
+ },
+ "dependencies": {
+ "nanoid": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
+ "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
+ "dev": true
+ }
+ }
+ },
+ "postcss-loader": {
+ "version": "7.2.4",
+ "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.2.4.tgz",
+ "integrity": "sha512-F88rpxxNspo5hatIc+orYwZDtHFaVFOSIVAx+fBfJC1GmhWbVmPWtmg2gXKE1OxJbneOSGn8PWdIwsZFcruS+w==",
+ "dev": true,
+ "requires": {
+ "cosmiconfig": "^8.1.3",
+ "cosmiconfig-typescript-loader": "^4.3.0",
+ "klona": "^2.0.6",
+ "semver": "^7.3.8"
+ },
+ "dependencies": {
+ "klona": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz",
+ "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==",
+ "dev": true
+ },
+ "semver": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz",
+ "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ }
+ }
+ },
+ "postcss-modules-extract-imports": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz",
+ "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==",
+ "dev": true,
+ "requires": {}
+ },
+ "postcss-modules-local-by-default": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz",
+ "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==",
+ "dev": true,
+ "requires": {
+ "icss-utils": "^5.0.0",
+ "postcss-selector-parser": "^6.0.2",
+ "postcss-value-parser": "^4.1.0"
+ }
+ },
+ "postcss-modules-scope": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz",
+ "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==",
+ "dev": true,
+ "requires": {
+ "postcss-selector-parser": "^6.0.4"
+ }
+ },
+ "postcss-modules-values": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz",
+ "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==",
+ "dev": true,
+ "requires": {
+ "icss-utils": "^5.0.0"
+ }
+ },
+ "postcss-selector-parser": {
+ "version": "6.0.10",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz",
+ "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==",
+ "dev": true,
+ "requires": {
+ "cssesc": "^3.0.0",
+ "util-deprecate": "^1.0.2"
+ }
+ },
+ "postcss-value-parser": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
+ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
+ "dev": true
+ },
+ "process-nextick-args": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+ "dev": true
+ },
+ "proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "dev": true,
+ "requires": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "dependencies": {
+ "ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "dev": true
+ }
+ }
+ },
+ "punycode": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
+ "dev": true
+ },
+ "qs": {
+ "version": "6.10.3",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz",
+ "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
+ "dev": true,
+ "requires": {
+ "side-channel": "^1.0.4"
+ }
+ },
+ "randombytes": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "dev": true
+ },
+ "raw-body": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
+ "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
+ "dev": true,
+ "requires": {
+ "bytes": "3.1.2",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "unpipe": "1.0.0"
+ },
+ "dependencies": {
+ "bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "dev": true
+ }
+ }
+ },
+ "readable-stream": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ },
+ "readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dev": true,
+ "requires": {
+ "picomatch": "^2.2.1"
+ }
+ },
+ "rechoir": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz",
+ "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==",
+ "dev": true,
+ "requires": {
+ "resolve": "^1.9.0"
+ }
+ },
+ "require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "dev": true
+ },
+ "requires-port": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
+ "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
+ "dev": true
+ },
+ "resolve": {
+ "version": "1.22.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
+ "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
+ "dev": true,
+ "requires": {
+ "is-core-module": "^2.9.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ }
+ },
+ "resolve-cwd": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
+ "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
+ "dev": true,
+ "requires": {
+ "resolve-from": "^5.0.0"
+ }
+ },
+ "resolve-from": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+ "dev": true
+ },
+ "retry": {
+ "version": "0.13.1",
+ "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz",
+ "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==",
+ "dev": true
+ },
+ "rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "dev": true
+ },
+ "safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "dev": true
+ },
+ "sass": {
+ "version": "1.54.0",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.0.tgz",
+ "integrity": "sha512-C4zp79GCXZfK0yoHZg+GxF818/aclhp9F48XBu/+bm9vXEVAYov9iU3FBVRMq3Hx3OA4jfKL+p2K9180mEh0xQ==",
+ "dev": true,
+ "requires": {
+ "chokidar": ">=3.0.0 <4.0.0",
+ "immutable": "^4.0.0",
+ "source-map-js": ">=0.6.2 <2.0.0"
+ }
+ },
+ "sass-loader": {
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-13.0.2.tgz",
+ "integrity": "sha512-BbiqbVmbfJaWVeOOAu2o7DhYWtcNmTfvroVgFXa6k2hHheMxNAeDHLNoDy/Q5aoaVlz0LH+MbMktKwm9vN/j8Q==",
+ "dev": true,
+ "requires": {
+ "klona": "^2.0.4",
+ "neo-async": "^2.6.2"
+ }
+ },
+ "schema-utils": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
+ "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
+ "dev": true,
+ "requires": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ }
+ },
+ "select-hose": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
+ "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==",
+ "dev": true
+ },
+ "selfsigned": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.0.1.tgz",
+ "integrity": "sha512-LmME957M1zOsUhG+67rAjKfiWFox3SBxE/yymatMZsAx+oMrJ0YQ8AToOnyCm7xbeg2ep37IHLxdu0o2MavQOQ==",
+ "dev": true,
+ "requires": {
+ "node-forge": "^1"
+ }
+ },
+ "semver": {
+ "version": "7.3.7",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
+ "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "send": {
+ "version": "0.18.0",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
+ "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
+ "dev": true,
+ "requires": {
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "mime": "1.6.0",
+ "ms": "2.1.3",
+ "on-finished": "2.4.1",
+ "range-parser": "~1.2.1",
+ "statuses": "2.0.1"
+ },
+ "dependencies": {
+ "ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true
+ }
+ }
+ },
+ "serialize-javascript": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz",
+ "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==",
+ "dev": true,
+ "requires": {
+ "randombytes": "^2.1.0"
+ }
+ },
+ "serve-index": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz",
+ "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==",
+ "dev": true,
+ "requires": {
+ "accepts": "~1.3.4",
+ "batch": "0.6.1",
+ "debug": "2.6.9",
+ "escape-html": "~1.0.3",
+ "http-errors": "~1.6.2",
+ "mime-types": "~2.1.17",
+ "parseurl": "~1.3.2"
+ },
+ "dependencies": {
+ "depd": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+ "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==",
+ "dev": true
+ },
+ "http-errors": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
+ "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==",
+ "dev": true,
+ "requires": {
+ "depd": "~1.1.2",
+ "inherits": "2.0.3",
+ "setprototypeof": "1.1.0",
+ "statuses": ">= 1.4.0 < 2"
+ }
+ },
+ "inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==",
+ "dev": true
+ },
+ "setprototypeof": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
+ "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==",
+ "dev": true
+ },
+ "statuses": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
+ "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==",
+ "dev": true
+ }
+ }
+ },
+ "serve-static": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
+ "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
+ "dev": true,
+ "requires": {
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.3",
+ "send": "0.18.0"
+ }
+ },
+ "setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "dev": true
+ },
+ "shallow-clone": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz",
+ "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==",
+ "dev": true,
+ "requires": {
+ "kind-of": "^6.0.2"
+ }
+ },
+ "shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "requires": {
+ "shebang-regex": "^3.0.0"
+ }
+ },
+ "shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true
+ },
+ "side-channel": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
+ "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+ "dev": true,
+ "requires": {
+ "call-bind": "^1.0.0",
+ "get-intrinsic": "^1.0.2",
+ "object-inspect": "^1.9.0"
+ }
+ },
+ "signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+ "dev": true
+ },
+ "sockjs": {
+ "version": "0.3.24",
+ "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz",
+ "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==",
+ "dev": true,
+ "requires": {
+ "faye-websocket": "^0.11.3",
+ "uuid": "^8.3.2",
+ "websocket-driver": "^0.7.4"
+ }
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
+ "source-map-js": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
+ "dev": true
+ },
+ "source-map-support": {
+ "version": "0.5.21",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+ "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+ "dev": true,
+ "requires": {
+ "buffer-from": "^1.0.0",
+ "source-map": "^0.6.0"
+ }
+ },
+ "spdy": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz",
+ "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==",
+ "dev": true,
+ "requires": {
+ "debug": "^4.1.0",
+ "handle-thing": "^2.0.0",
+ "http-deceiver": "^1.2.7",
+ "select-hose": "^2.0.0",
+ "spdy-transport": "^3.0.0"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "requires": {
+ "ms": "2.1.2"
+ }
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ }
+ }
+ },
+ "spdy-transport": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz",
+ "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==",
+ "dev": true,
+ "requires": {
+ "debug": "^4.1.0",
+ "detect-node": "^2.0.4",
+ "hpack.js": "^2.1.6",
+ "obuf": "^1.1.2",
+ "readable-stream": "^3.0.6",
+ "wbuf": "^1.7.3"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "requires": {
+ "ms": "2.1.2"
+ }
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ }
+ }
+ },
+ "statuses": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+ "dev": true
+ },
+ "string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "~5.1.0"
+ },
+ "dependencies": {
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ }
+ }
+ },
+ "strip-final-newline": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
+ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
+ "dev": true
+ },
+ "style-loader": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz",
+ "integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==",
+ "dev": true,
+ "requires": {}
+ },
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ },
+ "supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+ "dev": true
+ },
+ "tapable": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
+ "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
+ "dev": true
+ },
+ "terser": {
+ "version": "5.16.6",
+ "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.6.tgz",
+ "integrity": "sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/source-map": "^0.3.2",
+ "acorn": "^8.5.0",
+ "commander": "^2.20.0",
+ "source-map-support": "~0.5.20"
+ }
+ },
+ "terser-webpack-plugin": {
+ "version": "5.3.7",
+ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz",
+ "integrity": "sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/trace-mapping": "^0.3.17",
+ "jest-worker": "^27.4.5",
+ "schema-utils": "^3.1.1",
+ "serialize-javascript": "^6.0.1",
+ "terser": "^5.16.5"
+ }
+ },
+ "thunky": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz",
+ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==",
+ "dev": true
+ },
+ "to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "requires": {
+ "is-number": "^7.0.0"
+ }
+ },
+ "toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "dev": true
+ },
+ "ts-loader": {
+ "version": "9.3.1",
+ "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.3.1.tgz",
+ "integrity": "sha512-OkyShkcZTsTwyS3Kt7a4rsT/t2qvEVQuKCTg4LJmpj9fhFR7ukGdZwV6Qq3tRUkqcXtfGpPR7+hFKHCG/0d3Lw==",
+ "dev": true,
+ "requires": {
+ "chalk": "^4.1.0",
+ "enhanced-resolve": "^5.0.0",
+ "micromatch": "^4.0.0",
+ "semver": "^7.3.4"
+ }
+ },
+ "ts-node": {
+ "version": "10.9.1",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
+ "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
+ "dev": true,
+ "peer": true,
+ "requires": {
+ "@cspotcode/source-map-support": "^0.8.0",
+ "@tsconfig/node10": "^1.0.7",
+ "@tsconfig/node12": "^1.0.7",
+ "@tsconfig/node14": "^1.0.0",
+ "@tsconfig/node16": "^1.0.2",
+ "acorn": "^8.4.1",
+ "acorn-walk": "^8.1.1",
+ "arg": "^4.1.0",
+ "create-require": "^1.1.0",
+ "diff": "^4.0.1",
+ "make-error": "^1.1.1",
+ "v8-compile-cache-lib": "^3.0.1",
+ "yn": "3.1.1"
+ }
+ },
+ "type-is": {
+ "version": "1.6.18",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "dev": true,
+ "requires": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.24"
+ }
+ },
+ "typescript": {
+ "version": "4.7.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
+ "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
+ "dev": true
+ },
+ "unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "dev": true
+ },
+ "update-browserslist-db": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz",
+ "integrity": "sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==",
+ "dev": true,
+ "requires": {
+ "escalade": "^3.1.1",
+ "picocolors": "^1.0.0"
+ }
+ },
+ "uri-js": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+ "dev": true,
+ "requires": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+ "dev": true
+ },
+ "utils-merge": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
+ "dev": true
+ },
+ "uuid": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
+ "dev": true
+ },
+ "v8-compile-cache-lib": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
+ "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
+ "dev": true,
+ "peer": true
+ },
+ "vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "dev": true
+ },
+ "watchpack": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
+ "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
+ "dev": true,
+ "requires": {
+ "glob-to-regexp": "^0.4.1",
+ "graceful-fs": "^4.1.2"
+ }
+ },
+ "wbuf": {
+ "version": "1.7.3",
+ "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz",
+ "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==",
+ "dev": true,
+ "requires": {
+ "minimalistic-assert": "^1.0.0"
+ }
+ },
+ "webpack": {
+ "version": "5.76.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz",
+ "integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==",
+ "dev": true,
+ "requires": {
+ "@types/eslint-scope": "^3.7.3",
+ "@types/estree": "^0.0.51",
+ "@webassemblyjs/ast": "1.11.1",
+ "@webassemblyjs/wasm-edit": "1.11.1",
+ "@webassemblyjs/wasm-parser": "1.11.1",
+ "acorn": "^8.7.1",
+ "acorn-import-assertions": "^1.7.6",
+ "browserslist": "^4.14.5",
+ "chrome-trace-event": "^1.0.2",
+ "enhanced-resolve": "^5.10.0",
+ "es-module-lexer": "^0.9.0",
+ "eslint-scope": "5.1.1",
+ "events": "^3.2.0",
+ "glob-to-regexp": "^0.4.1",
+ "graceful-fs": "^4.2.9",
+ "json-parse-even-better-errors": "^2.3.1",
+ "loader-runner": "^4.2.0",
+ "mime-types": "^2.1.27",
+ "neo-async": "^2.6.2",
+ "schema-utils": "^3.1.0",
+ "tapable": "^2.1.1",
+ "terser-webpack-plugin": "^5.1.3",
+ "watchpack": "^2.4.0",
+ "webpack-sources": "^3.2.3"
+ }
+ },
+ "webpack-cli": {
+ "version": "4.10.0",
+ "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz",
+ "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==",
+ "dev": true,
+ "requires": {
+ "@discoveryjs/json-ext": "^0.5.0",
+ "@webpack-cli/configtest": "^1.2.0",
+ "@webpack-cli/info": "^1.5.0",
+ "@webpack-cli/serve": "^1.7.0",
+ "colorette": "^2.0.14",
+ "commander": "^7.0.0",
+ "cross-spawn": "^7.0.3",
+ "fastest-levenshtein": "^1.0.12",
+ "import-local": "^3.0.2",
+ "interpret": "^2.2.0",
+ "rechoir": "^0.7.0",
+ "webpack-merge": "^5.7.3"
+ },
+ "dependencies": {
+ "commander": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
+ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
+ "dev": true
+ }
+ }
+ },
+ "webpack-dev-middleware": {
+ "version": "5.3.3",
+ "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz",
+ "integrity": "sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==",
+ "dev": true,
+ "requires": {
+ "colorette": "^2.0.10",
+ "memfs": "^3.4.3",
+ "mime-types": "^2.1.31",
+ "range-parser": "^1.2.1",
+ "schema-utils": "^4.0.0"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "8.11.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz",
+ "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ajv-keywords": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
+ "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.3"
+ }
+ },
+ "json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ },
+ "schema-utils": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz",
+ "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==",
+ "dev": true,
+ "requires": {
+ "@types/json-schema": "^7.0.9",
+ "ajv": "^8.8.0",
+ "ajv-formats": "^2.1.1",
+ "ajv-keywords": "^5.0.0"
+ }
+ }
+ }
+ },
+ "webpack-dev-server": {
+ "version": "4.9.3",
+ "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.9.3.tgz",
+ "integrity": "sha512-3qp/eoboZG5/6QgiZ3llN8TUzkSpYg1Ko9khWX1h40MIEUNS2mDoIa8aXsPfskER+GbTvs/IJZ1QTBBhhuetSw==",
+ "dev": true,
+ "requires": {
+ "@types/bonjour": "^3.5.9",
+ "@types/connect-history-api-fallback": "^1.3.5",
+ "@types/express": "^4.17.13",
+ "@types/serve-index": "^1.9.1",
+ "@types/serve-static": "^1.13.10",
+ "@types/sockjs": "^0.3.33",
+ "@types/ws": "^8.5.1",
+ "ansi-html-community": "^0.0.8",
+ "bonjour-service": "^1.0.11",
+ "chokidar": "^3.5.3",
+ "colorette": "^2.0.10",
+ "compression": "^1.7.4",
+ "connect-history-api-fallback": "^2.0.0",
+ "default-gateway": "^6.0.3",
+ "express": "^4.17.3",
+ "graceful-fs": "^4.2.6",
+ "html-entities": "^2.3.2",
+ "http-proxy-middleware": "^2.0.3",
+ "ipaddr.js": "^2.0.1",
+ "open": "^8.0.9",
+ "p-retry": "^4.5.0",
+ "rimraf": "^3.0.2",
+ "schema-utils": "^4.0.0",
+ "selfsigned": "^2.0.1",
+ "serve-index": "^1.9.1",
+ "sockjs": "^0.3.24",
+ "spdy": "^4.0.2",
+ "webpack-dev-middleware": "^5.3.1",
+ "ws": "^8.4.2"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "8.11.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz",
+ "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ajv-keywords": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
+ "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.3"
+ }
+ },
+ "json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ },
+ "schema-utils": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz",
+ "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==",
+ "dev": true,
+ "requires": {
+ "@types/json-schema": "^7.0.9",
+ "ajv": "^8.8.0",
+ "ajv-formats": "^2.1.1",
+ "ajv-keywords": "^5.0.0"
+ }
+ }
+ }
+ },
+ "webpack-merge": {
+ "version": "5.8.0",
+ "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz",
+ "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==",
+ "dev": true,
+ "requires": {
+ "clone-deep": "^4.0.1",
+ "wildcard": "^2.0.0"
+ }
+ },
+ "webpack-sources": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",
+ "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
+ "dev": true
+ },
+ "websocket-driver": {
+ "version": "0.7.4",
+ "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz",
+ "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==",
+ "dev": true,
+ "requires": {
+ "http-parser-js": ">=0.5.1",
+ "safe-buffer": ">=5.1.0",
+ "websocket-extensions": ">=0.1.1"
+ }
+ },
+ "websocket-extensions": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz",
+ "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
+ "dev": true
+ },
+ "which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ },
+ "wildcard": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz",
+ "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==",
+ "dev": true
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "dev": true
+ },
+ "ws": {
+ "version": "8.8.1",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz",
+ "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==",
+ "dev": true,
+ "requires": {}
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "yn": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
+ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
+ "dev": true,
+ "peer": true
+ }
+ }
+}
diff --git a/intl/icu_capi/js/examples/wasm-demo/package.json b/intl/icu_capi/js/examples/wasm-demo/package.json
new file mode 100644
index 0000000000..68f457cc26
--- /dev/null
+++ b/intl/icu_capi/js/examples/wasm-demo/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "icu4x-demo",
+ "version": "1.0.0",
+ "description": "A demo web application using ICU4X bindings.",
+ "type": "module",
+ "scripts": {
+ "clean": "rm dist/*",
+ "build": "webpack",
+ "start": "webpack serve --mode development --port 12345",
+ "tsc": "tsc -p ."
+ },
+ "author": "",
+ "license": "ISC",
+ "dependencies": {
+ "@popperjs/core": "^2.11.5",
+ "bootstrap": "^5.2.0",
+ "data.either": "^1.5.2",
+ "icu4x": "file:../../package"
+ },
+ "devDependencies": {
+ "@types/bootstrap": "^5.2.1",
+ "autoprefixer": "^10.4.8",
+ "css-loader": "^6.7.1",
+ "postcss-loader": "^7.2.4",
+ "sass": "^1.54.0",
+ "sass-loader": "^13.0.2",
+ "style-loader": "^3.3.1",
+ "ts-loader": "^9.3.1",
+ "typescript": "^4.7.4",
+ "webpack": "^5.76.0",
+ "webpack-cli": "^4.10.0",
+ "webpack-dev-server": "^4.9.3"
+ }
+}
diff --git a/intl/icu_capi/js/examples/wasm-demo/src/scss/styles.scss b/intl/icu_capi/js/examples/wasm-demo/src/scss/styles.scss
new file mode 100644
index 0000000000..6c1720cb79
--- /dev/null
+++ b/intl/icu_capi/js/examples/wasm-demo/src/scss/styles.scss
@@ -0,0 +1,2 @@
+// Import all of Bootstrap's CSS
+@import "~bootstrap/scss/bootstrap";
diff --git a/intl/icu_capi/js/examples/wasm-demo/src/ts/app.ts b/intl/icu_capi/js/examples/wasm-demo/src/ts/app.ts
new file mode 100644
index 0000000000..c0d3a7a56d
--- /dev/null
+++ b/intl/icu_capi/js/examples/wasm-demo/src/ts/app.ts
@@ -0,0 +1,16 @@
+import { ICU4XDataProvider } from 'icu4x';
+import * as fdf from './fixed-decimal';
+import * as dtf from './date-time';
+import * as seg from './segmenter';
+
+import 'bootstrap/js/dist/tab';
+import 'bootstrap/js/dist/dropdown';
+import 'bootstrap/js/dist/collapse';
+
+(async function init() {
+ const dataProvider = ICU4XDataProvider.create_compiled();
+ fdf.setup(dataProvider);
+ dtf.setup(dataProvider);
+ seg.setup(dataProvider);
+ (document.querySelector("#bigspinner") as HTMLElement).style.display = "none";
+})() \ No newline at end of file
diff --git a/intl/icu_capi/js/examples/wasm-demo/src/ts/date-time.ts b/intl/icu_capi/js/examples/wasm-demo/src/ts/date-time.ts
new file mode 100644
index 0000000000..5f84f8f4a6
--- /dev/null
+++ b/intl/icu_capi/js/examples/wasm-demo/src/ts/date-time.ts
@@ -0,0 +1,184 @@
+import { ICU4XDataProvider, ICU4XDateLength, ICU4XDateTime, ICU4XDateTimeFormatter, ICU4XLocale, ICU4XTimeLength, ICU4XCalendar } from "icu4x";
+import { Ok, Result, result, unwrap } from "./index";
+
+export class DateTimeDemo {
+ #displayFn: (formatted: string) => void;
+ #dataProvider: ICU4XDataProvider;
+
+ #localeStr: string;
+ #calendarStr: string;
+ #dateTimeStr: string;
+ #locale: Result<ICU4XLocale>;
+ #calendar: Result<ICU4XCalendar>;
+ #dateLength: ICU4XDateLength;
+ #timeLength: ICU4XTimeLength;
+
+ #formatter: Result<ICU4XDateTimeFormatter>;
+ #dateTime: Result<ICU4XDateTime> | null;
+
+ constructor(displayFn: (formatted: string) => void, dataProvider: ICU4XDataProvider) {
+ this.#displayFn = displayFn;
+ this.#dataProvider = dataProvider;
+
+ this.#locale = Ok(ICU4XLocale.create_from_string("en"));
+ this.#calendar = Ok(ICU4XCalendar.create_for_locale(dataProvider, unwrap(this.#locale)));
+ this.#dateLength = ICU4XDateLength.Short;
+ this.#timeLength = ICU4XTimeLength.Short;
+ this.#dateTime = null;
+ this.#dateTimeStr = "";
+ this.#calendarStr = "from-locale";
+ this.#localeStr = "en";
+ this.#updateFormatter();
+ }
+
+ setCalendar(calendar: string): void {
+ this.#calendarStr = calendar;
+ this.#updateLocaleAndCalendar();
+ this.#updateFormatter();
+ }
+
+ setLocale(locid: string): void {
+ this.#localeStr = locid;
+ this.#updateLocaleAndCalendar();
+ this.#updateFormatter();
+ }
+
+ #updateLocaleAndCalendar(): void {
+ let locid = this.#localeStr;
+ if (this.#calendarStr != "from-locale") {
+ if (locid.indexOf("-u-") == -1) {
+ locid = `${locid}-u-ca-${this.#calendarStr}`;
+ } else {
+ // Don't bother trying to patch up the situation where a calendar
+ // is already specified; this is GIGO and the current locale parsing behavior
+ // will just default to the first one (#calendarStr)
+ locid = locid.replace("-u-", `-u-ca-${this.#calendarStr}-`);
+ }
+ }
+ this.#locale = result(() => ICU4XLocale.create_from_string(locid));
+ this.#calendar = result(() => ICU4XCalendar.create_for_locale(this.#dataProvider, unwrap(this.#locale) ));
+ this.#updateDateTime();
+ }
+
+ setDateLength(dateLength: string): void {
+ this.#dateLength = ICU4XDateLength[dateLength];
+ this.#updateFormatter()
+ }
+
+ setTimeLength(timeLength: string): void {
+ this.#timeLength = ICU4XTimeLength[timeLength];
+ this.#updateFormatter()
+ }
+
+ setDateTime(dateTime: string): void {
+ this.#dateTimeStr = dateTime;
+ this.#updateDateTime();
+ this.#render()
+ }
+
+ #updateDateTime(): void {
+ const date = new Date(this.#dateTimeStr);
+
+ this.#dateTime = result(() => ICU4XDateTime.create_from_iso_in_calendar(
+ date.getFullYear(),
+ date.getMonth() + 1,
+ date.getDate(),
+ date.getHours(),
+ date.getMinutes(),
+ date.getSeconds(),
+ 0,
+ unwrap(this.#calendar)
+ ));
+ }
+
+ #updateFormatter(): void {
+ this.#formatter = result(() => ICU4XDateTimeFormatter.create_with_lengths(
+ this.#dataProvider,
+ unwrap(this.#locale),
+ this.#dateLength,
+ this.#timeLength,
+ ));
+ this.#render();
+ }
+
+ #render(): void {
+ try {
+ const formatter = unwrap(this.#formatter);
+ if (this.#dateTime !== null) {
+ const dateTime = unwrap(this.#dateTime);
+ this.#displayFn(formatter.format_datetime(dateTime));
+ } else {
+ this.#displayFn("");
+ }
+ } catch (e) {
+ if (e.error_value) {
+ this.#displayFn(`ICU4X Error: ${e.error_value}`);
+ } else {
+ this.#displayFn(`Unexpected Error: ${e}`);
+ }
+ }
+ }
+}
+
+export function setup(dataProvider: ICU4XDataProvider): void {
+ const formattedDateTime = document.getElementById('dtf-formatted') as HTMLInputElement;
+ const dateTimeDemo = new DateTimeDemo((formatted) => formattedDateTime.innerText = formatted, dataProvider);
+
+ const otherLocaleBtn = document.getElementById('dtf-locale-other') as HTMLInputElement | null;
+ otherLocaleBtn?.addEventListener('click', () => {
+ dateTimeDemo.setLocale(otherLocaleInput.value);
+ });
+
+ const otherLocaleInput = document.getElementById('dtf-locale-other-input') as HTMLInputElement | null;
+ otherLocaleInput?.addEventListener('input', () => {
+ const otherLocaleBtn = document.getElementById('dtf-locale-other') as HTMLInputElement | null;
+ if (otherLocaleBtn != null) {
+ otherLocaleBtn.checked = true;
+ dateTimeDemo.setLocale(otherLocaleInput.value);
+ }
+ });
+
+ for (let input of document.querySelectorAll<HTMLInputElement | null>('input[name="dtf-locale"]')) {
+ if (input?.value !== 'other') {
+ input.addEventListener('input', () => {
+ dateTimeDemo.setLocale(input.value)
+ });
+ }
+ }
+ for (let selector of document.querySelectorAll<HTMLSelectElement | null>('select[name="dtf-calendar"]')) {
+ // <select> doesn't have oninput
+ selector?.addEventListener('change', () => {
+ dateTimeDemo.setCalendar(selector.value)
+ });
+ }
+
+ for (let input of document.querySelectorAll<HTMLInputElement | null>('input[name="dtf-date-length"]')) {
+ input?.addEventListener('input', () => {
+ dateTimeDemo.setDateLength(input.value)
+ });
+ }
+
+ for (let input of document.querySelectorAll<HTMLInputElement | null>('input[name="dtf-time-length"]')) {
+ input?.addEventListener('input', () => {
+ dateTimeDemo.setTimeLength(input.value)
+ });
+ }
+
+ const inputDateTime = document.getElementById('dtf-input') as HTMLInputElement | null;
+ inputDateTime?.addEventListener('input', () => {
+ dateTimeDemo.setDateTime(inputDateTime.value)
+ });
+
+ // Annoyingly `toISOString()` gets us the format we need, but it converts to UTC first
+ // We instead get the current datetime and recast it to a date that is the current datetime
+ // when represented in UTC
+ let now = new Date();
+ const offset = now.getTimezoneOffset();
+ now.setMinutes(now.getMinutes() - offset);
+ const nowISO = now.toISOString().slice(0,16);
+ if (inputDateTime != undefined) {
+ // this seems like the best way to get something compatible with inputDateTIme
+ inputDateTime.value = nowISO;
+ }
+ dateTimeDemo.setDateTime(nowISO);
+}
diff --git a/intl/icu_capi/js/examples/wasm-demo/src/ts/fixed-decimal.ts b/intl/icu_capi/js/examples/wasm-demo/src/ts/fixed-decimal.ts
new file mode 100644
index 0000000000..c604d3d013
--- /dev/null
+++ b/intl/icu_capi/js/examples/wasm-demo/src/ts/fixed-decimal.ts
@@ -0,0 +1,95 @@
+import { ICU4XDataProvider, ICU4XFixedDecimal, ICU4XFixedDecimalFormatter, ICU4XFixedDecimalGroupingStrategy, ICU4XLocale } from "icu4x";
+import { Result, Ok, result, unwrap } from './index';
+
+export class FixedDecimalDemo {
+ #displayFn: (formatted: string) => void;
+ #dataProvider: ICU4XDataProvider;
+
+ #locale: Result<ICU4XLocale>;
+ #groupingStrategy: ICU4XFixedDecimalGroupingStrategy;
+ #formatter: Result<ICU4XFixedDecimalFormatter>;
+ #fixedDecimal: Result<ICU4XFixedDecimal> | null;
+
+ constructor(displayFn: (formatted: string) => void, dataProvider: ICU4XDataProvider) {
+ this.#displayFn = displayFn;
+ this.#dataProvider = dataProvider;
+
+ this.#locale = Ok(ICU4XLocale.create_from_string("en"));
+ this.#groupingStrategy = ICU4XFixedDecimalGroupingStrategy.Auto;
+ this.#fixedDecimal = null;
+ this.#updateFormatter()
+ }
+
+ setLocale(locid: string): void {
+ this.#locale = result(() => ICU4XLocale.create_from_string(locid));
+ this.#updateFormatter()
+ }
+
+ setGroupingStrategy(strategy: string): void {
+ this.#groupingStrategy = ICU4XFixedDecimalGroupingStrategy[strategy];
+ this.#updateFormatter()
+ }
+
+ setFixedDecimal(digits: string): void {
+ this.#fixedDecimal = digits === "" ? null : result(() => ICU4XFixedDecimal.create_from_string(digits));
+ this.#render();
+ }
+
+ #updateFormatter(): void {
+ this.#formatter = result(() => ICU4XFixedDecimalFormatter.create_with_grouping_strategy(
+ this.#dataProvider,
+ unwrap(this.#locale),
+ this.#groupingStrategy,
+ ));
+ this.#render();
+ }
+
+ #render(): void {
+ try {
+ const formatter = unwrap(this.#formatter);
+ if (this.#fixedDecimal !== null) {
+ const fixedDecimal = unwrap(this.#fixedDecimal);
+ this.#displayFn(formatter.format(fixedDecimal));
+ } else {
+ this.#displayFn("");
+ }
+ } catch (e) {
+ if (e.error_value) {
+ this.#displayFn(`ICU4X Error: ${e.error_value}`);
+ } else {
+ this.#displayFn(`Unexpected Error: ${e}`);
+ }
+ }
+ }
+}
+
+export function setup(dataProvider: ICU4XDataProvider): void {
+ const formattedDecimal = document.getElementById('fdf-formatted') as HTMLParagraphElement;
+ const fixedDecimalDemo = new FixedDecimalDemo((formatted) => {
+ formattedDecimal.innerText = formatted;
+ }, dataProvider);
+
+ const otherLocaleBtn = document.getElementById('fdf-locale-other') as HTMLInputElement | null;
+ otherLocaleBtn?.addEventListener('click', () => fixedDecimalDemo.setLocale(otherLocaleInput.value));
+
+ const otherLocaleInput = document.getElementById('fdf-locale-other-input') as HTMLInputElement | null;
+ otherLocaleInput?.addEventListener('input', () => {
+ if (otherLocaleBtn != null) {
+ otherLocaleBtn.checked = true;
+ fixedDecimalDemo.setLocale(otherLocaleInput.value);
+ }
+ });
+
+ for (let btn of document.querySelectorAll<HTMLInputElement | null>('input[name="fdf-locale"]')) {
+ if (btn?.value !== 'other') {
+ btn.addEventListener('click', () => fixedDecimalDemo.setLocale(btn.value));
+ }
+ }
+
+ for (let btn of document.querySelectorAll<HTMLInputElement | null>('input[name="fdf-grouping"]')) {
+ btn?.addEventListener('click', () => fixedDecimalDemo.setGroupingStrategy(btn.value));
+ }
+
+ const inputDecimal = document.getElementById('fdf-input') as HTMLTextAreaElement | null;
+ inputDecimal?.addEventListener('input', () => fixedDecimalDemo.setFixedDecimal(inputDecimal.value));
+}
diff --git a/intl/icu_capi/js/examples/wasm-demo/src/ts/index.ts b/intl/icu_capi/js/examples/wasm-demo/src/ts/index.ts
new file mode 100644
index 0000000000..9a5bed6eb3
--- /dev/null
+++ b/intl/icu_capi/js/examples/wasm-demo/src/ts/index.ts
@@ -0,0 +1,31 @@
+import { FFIError, ICU4XError } from "icu4x";
+
+export type Result<T> =
+ | { ok: true; value: T }
+ | { ok: false; error: FFIError<ICU4XError> };
+
+
+export function Ok<T>(value: T): Result<T> {
+ return { ok: true, value };
+}
+
+export function Err<T>(error: FFIError<ICU4XError>): Result<T> {
+ return { ok: false, error };
+}
+
+// Convert exceptions into a `Result`.
+export function result<T>(fn: () => T): Result<T> {
+ try {
+ return Ok(fn());
+ } catch (e) {
+ return Err(e);
+ }
+}
+
+// Convert a `Result` into an exception.
+export function unwrap<T>(result: Result<T>): T {
+ switch (result.ok) {
+ case true: return result.value;
+ case false: throw result.error;
+ }
+}
diff --git a/intl/icu_capi/js/examples/wasm-demo/src/ts/segmenter.ts b/intl/icu_capi/js/examples/wasm-demo/src/ts/segmenter.ts
new file mode 100644
index 0000000000..2a1efe6407
--- /dev/null
+++ b/intl/icu_capi/js/examples/wasm-demo/src/ts/segmenter.ts
@@ -0,0 +1,129 @@
+import { ICU4XDataProvider, ICU4XWordSegmenter } from "icu4x";
+
+export class SegmenterDemo {
+ #displayFn: (formatted: string) => void;
+ #dataProvider: ICU4XDataProvider;
+
+ #segmenter: ICU4XWordSegmenter;
+ #model: string;
+ #text: string;
+
+ constructor(displayFn: (formatted: string) => void, dataProvider: ICU4XDataProvider) {
+ this.#displayFn = displayFn;
+ this.#dataProvider = dataProvider;
+
+ this.#model = "Auto";
+ this.#text = "";
+ this.#updateSegmenter();
+ }
+
+ setModel(model: string): void {
+ this.#model = model;
+ this.#updateSegmenter();
+ }
+
+ setText(text: string): void {
+ this.#text = text;
+ this.#render();
+ }
+
+ #updateSegmenter(): void {
+ if (this.#model === "Auto") {
+ this.#segmenter = ICU4XWordSegmenter.create_auto(this.#dataProvider);
+ } else if (this.#model === "LSTM") {
+ this.#segmenter = ICU4XWordSegmenter.create_lstm(this.#dataProvider);
+ } else if (this.#model === "Dictionary") {
+ this.#segmenter = ICU4XWordSegmenter.create_dictionary(this.#dataProvider);
+ } else {
+ console.error("Unknown model: " + this.#model);
+ }
+ this.#render();
+ }
+
+ #render(): void {
+ const segments = [];
+
+ let utf8Index = 0;
+ let utf16Index = 0;
+ const iter8 = this.#segmenter.segment_utf8(this.#text);
+ while (true) {
+ const next = iter8.next();
+
+ if (next === -1) {
+ segments.push(this.#text.slice(utf16Index));
+ break;
+ } else {
+ const oldUtf16Index = utf16Index;
+ while (utf8Index < next) {
+ const codePoint = this.#text.codePointAt(utf16Index);
+ const utf8Len = (codePoint <= 0x7F) ? 1
+ : (codePoint <= 0x7FF) ? 2
+ : (codePoint <= 0xFFFF) ? 3
+ : 4;
+ const utf16Len = (codePoint <= 0xFFFF) ? 1
+ : 2;
+ utf8Index += utf8Len;
+ utf16Index += utf16Len;
+ }
+ segments.push(this.#text.slice(oldUtf16Index, utf16Index));
+ }
+ }
+
+ this.#displayFn(segments.join('<span class="seg-delim"> . </span>'));
+ }
+}
+
+export function setup(dataProvider: ICU4XDataProvider): void {
+ const segmentedText = document.getElementById('seg-segmented') as HTMLParagraphElement;
+ const segmenterDemo = new SegmenterDemo((formatted) => {
+ // Use innerHTML because we have actual HTML we want to display
+ segmentedText.innerHTML = formatted;
+ }, dataProvider);
+
+ for (let btn of document.querySelectorAll<HTMLInputElement | null>('input[name="segmenter-model"]')) {
+ btn?.addEventListener('click', () => segmenterDemo.setModel(btn.value));
+ }
+
+ const inputText = document.getElementById('seg-input') as HTMLTextAreaElement | null;
+ inputText?.addEventListener('input', () => segmenterDemo.setText(inputText.value));
+
+ const japaneseSamples = [
+ "全部の人間は、生まれながらにして自由であり、かつ、尊厳と権利と について平等である。人間は、理性と良心とを授けられており、互いに同 胞の精神をもって行動しなければならない。",
+ "全部の人は、人種、皮膚の色、性、言語、宗教、政治上その他の意見、国民的もしくは社会的出身、財産、門地その他の地位又はこれに類するいかなる自由による差別をも受けることなく、この宣言に掲げるすべての権利と自由とを享有することができる。",
+ "さらに、個人の属する国又は地域が独立国であると、信託統治地域であると、非自治地域であると、又は他のなんらかの主権制限の下にあるとを問わず、その国又は地域の政治上、管轄上又は国際上の地位に基ずくいかなる差別もしてはならない。",
+ "全部の人は、生命、自由と身体の安全に対する権利がある。",
+ "何人も、奴隷にされ、又は苦役に服することはない。奴隷制度と奴隷売買は、いかなる形においても禁止する。",
+ ];
+
+ const sampleJapaneseBtn = document.getElementById('seg-sample-japanese') as HTMLButtonElement | null;
+ sampleJapaneseBtn?.addEventListener('click', () => {
+ inputText.value = japaneseSamples[Math.floor(Math.random() * japaneseSamples.length)];
+ segmenterDemo.setText(inputText.value);
+ });
+
+ const chineseSamples = [
+ "人人生而自由,在尊严合权利上一律平等。因赋有脾胃合道行,并着以兄弟关系的精神相对待。",
+ "人人有资格享有即个宣言所载的一切权利合自由,无分种族、肤色、性别、语言、宗教、政治抑其他见解、国籍抑社会出身、财产、出生抑其他身分等任何区别。",
+ "并且勿会用因一人所属的国家抑地的政治的、行政的抑国际的地位之不同而有所区别,无论即个地是独立地、托管地、非自治地抑处于其他任何主权受限制的代志之下。",
+ "人人过过有权享有生命、自由合人身安全。",
+ "任何人勿会用互为奴隶抑奴役;一切形式的奴隶制度合奴隶买卖,过过着予以禁止。",
+ ];
+
+ const sampleChineseBtn = document.getElementById('seg-sample-chinese') as HTMLButtonElement | null;
+ sampleChineseBtn?.addEventListener('click', () => {
+ inputText.value = chineseSamples[Math.floor(Math.random() * chineseSamples.length)];
+ segmenterDemo.setText(inputText.value);
+ });
+
+ const thaiSamples = [
+ "โดยที่การยอมรับนับถือเกียรติศักดิ์ประจำตัว และสิทธิเท่าเทียมกันและโอนมิได้ของบรรดา สมาชิก ทั้ง หลายแห่งครอบครัว มนุษย์เป็นหลักมูลเหตุแห่งอิสรภาพ ความยุติธรรม และสันติภาพในโลก",
+ "โดยที่การไม่นำพาและการเหยียดหยามต่อสิทธิมนุษยชน ยังผลให้มีการหระทำอันป่าเถื่อน ซี่งเป็นการละเมิดมโนธรรมของมนุษยชาติอย่างร้ายแรง และใต้[ได้]มีการประกาศว่า ปณิธานสูงสุดของสามัญชนได้แก่ความต้องการให้มนุษย์มีชีวิตอยู่ในโลกด้วยอิสรภาพในการพูด และความเชื่อถือ และอิสรภาพพ้นจากความหวาดกลัวและความต้องการ",
+ "โดยที่เป็นการจำเป็นอย่างยิ่งที่สิทธิมนุษยชนควรได้รับความคุ้มครองโดยหลักบังคับของกฎหมาย ถ้าไม่ประสงค์จะให้คนตกอยู่ในบังคับให้หันเข้าหาการขบถขัดขืนต่อทรราชและการกดขี่เป็นวิถีทางสุดท้าย",
+ ];
+
+ const sampleThaiBtn = document.getElementById('seg-sample-thai') as HTMLButtonElement | null;
+ sampleThaiBtn?.addEventListener('click', () => {
+ inputText.value = thaiSamples[Math.floor(Math.random() * thaiSamples.length)];
+ segmenterDemo.setText(inputText.value);
+ });
+}
diff --git a/intl/icu_capi/js/examples/wasm-demo/tsconfig.json b/intl/icu_capi/js/examples/wasm-demo/tsconfig.json
new file mode 100644
index 0000000000..dce69a23bd
--- /dev/null
+++ b/intl/icu_capi/js/examples/wasm-demo/tsconfig.json
@@ -0,0 +1,9 @@
+{
+ "compilerOptions": {
+ "outDir": "./dist/",
+ "sourceMap": true,
+ "module": "es2020",
+ "target": "es2020",
+ "moduleResolution": "node"
+ },
+}
diff --git a/intl/icu_capi/js/examples/wasm-demo/webpack.config.js b/intl/icu_capi/js/examples/wasm-demo/webpack.config.js
new file mode 100644
index 0000000000..5e1f24040c
--- /dev/null
+++ b/intl/icu_capi/js/examples/wasm-demo/webpack.config.js
@@ -0,0 +1,69 @@
+export default {
+ entry: {
+ index: [
+ './src/ts/app.ts',
+ './src/scss/styles.scss',
+ ],
+ },
+ module: {
+ rules: [
+ {
+ test: /\.tsx?$/,
+ use: 'ts-loader',
+ exclude: /node_modules/,
+ },
+ {
+ test: /\.(scss)$/,
+ use: [
+ {
+ loader: 'style-loader',
+ },
+ {
+ loader: 'css-loader'
+ },
+ {
+ loader: 'postcss-loader',
+ options: {
+ postcssOptions: {
+ plugins: () => [
+ require('autoprefixer')
+ ]
+ }
+ }
+ },
+ {
+ loader: 'sass-loader'
+ }
+ ]
+ }
+ ]
+ },
+ resolve: {
+ extensions: ['.ts', '.js'],
+ fallback: {
+ "fs": false,
+ },
+ },
+ mode: "production",
+ // mode: "development",
+ output: {
+ filename: 'bundle.js',
+ path: new URL('dist', import.meta.url).pathname,
+ },
+ devServer: {
+ static: '.',
+ port: 8080,
+ hot: true,
+ headers: {
+ "Access-Control-Allow-Origin": "*",
+ "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
+ "Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
+ }
+ },
+ experiments: {
+ topLevelAwait: true,
+ },
+ optimization: {
+ minimize: false
+ },
+};
diff --git a/intl/icu_capi/js/package/Makefile b/intl/icu_capi/js/package/Makefile
new file mode 100644
index 0000000000..4fb31f252b
--- /dev/null
+++ b/intl/icu_capi/js/package/Makefile
@@ -0,0 +1,24 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := target/wasm32-unknown-unknown/release/icu_capi_cdylib.wasm
+FORCE:
+
+ICU4X_NIGHTLY_TOOLCHAIN ?= "nightly-2022-12-26"
+
+# 100 KiB, working around a bug in older rustc
+# https://github.com/unicode-org/icu4x/issues/2753
+WASM_STACK_SIZE := 100000
+
+target/wasm32-unknown-unknown/release/icu_capi_cdylib.wasm: FORCE
+ rustup toolchain install ${ICU4X_NIGHTLY_TOOLCHAIN}
+ rustup component add rust-src --toolchain ${ICU4X_NIGHTLY_TOOLCHAIN}
+ RUSTFLAGS="-Cpanic=abort -Copt-level=s -C link-args=-zstack-size=${WASM_STACK_SIZE} -Clto -Cembed-bitcode" \
+ CARGO_TARGET_DIR="target" \
+ cargo +${ICU4X_NIGHTLY_TOOLCHAIN} build \
+ -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort \
+ --target wasm32-unknown-unknown \
+ --release \
+ -p icu_capi_cdylib \
+ --features buffer_provider
diff --git a/intl/icu_capi/js/package/bench/all.mjs b/intl/icu_capi/js/package/bench/all.mjs
new file mode 100644
index 0000000000..76586772d4
--- /dev/null
+++ b/intl/icu_capi/js/package/bench/all.mjs
@@ -0,0 +1,2 @@
+import "./fixed-decimal.mjs";
+import "./fixed-decimal-format.mjs";
diff --git a/intl/icu_capi/js/package/bench/fixed-decimal-format.mjs b/intl/icu_capi/js/package/bench/fixed-decimal-format.mjs
new file mode 100644
index 0000000000..ac3b29203f
--- /dev/null
+++ b/intl/icu_capi/js/package/bench/fixed-decimal-format.mjs
@@ -0,0 +1,28 @@
+import Benchmark from 'benchmark';
+
+import { ICU4XFixedDecimal, ICU4XLocale, ICU4XFixedDecimalFormatter, ICU4XDataProvider, ICU4XFixedDecimalGroupingStrategy } from "../index.js"
+
+const locale = ICU4XLocale.create_from_string("bn");
+const dataProvider = ICU4XDataProvider.create_compiled();
+
+let suite = new Benchmark.Suite();
+
+suite = suite.add("ICU4XFixedDecimalFormatter.create", () => {
+ (ICU4XFixedDecimalFormatter.create(locale, dataProvider, {})).underlying > 0;
+});
+
+const format = ICU4XFixedDecimalFormatter.create_with_grouping_strategy(dataProvider, locale, ICU4XFixedDecimalGroupingStrategy.Auto);
+const decimal = ICU4XFixedDecimal.create_from_i64(BigInt(1234));
+decimal.multiply_pow10(-2);
+
+suite = suite.add("ICU4XFixedDecimalFormatter.format", () => {
+ format.format(decimal);
+});
+
+suite
+ .on('cycle', (event) => {
+ console.log(String(event.target));
+ console.log('μs/it:', event.target.stats.mean * 1000 * 1000);
+ console.log();
+ })
+ .run({ "async": false });
diff --git a/intl/icu_capi/js/package/bench/fixed-decimal.mjs b/intl/icu_capi/js/package/bench/fixed-decimal.mjs
new file mode 100644
index 0000000000..12256e180d
--- /dev/null
+++ b/intl/icu_capi/js/package/bench/fixed-decimal.mjs
@@ -0,0 +1,34 @@
+import Benchmark from 'benchmark';
+
+import { ICU4XFixedDecimal } from "../index.js"
+
+let suite = new Benchmark.Suite();
+
+suite = suite.add("ICU4XFixedDecimal.create_from_i64", () => {
+ (ICU4XFixedDecimal.create_from_i64(BigInt(1234))).underlying > 0;
+});
+
+const decimal = ICU4XFixedDecimal.create_from_i64(BigInt(1234));
+decimal.multiply_pow10(-2);
+
+suite = suite.add("ICU4XFixedDecimal.to_string", () => {
+ decimal.to_string();
+});
+
+suite = suite.add("ICU4XFixedDecimal.multiply_pow10", () => {
+ decimal.multiply_pow10(2);
+ decimal.multiply_pow10(-2);
+});
+
+suite = suite.add("ICU4XFixedDecimal.set_sign", () => {
+ decimal.set_sign("Negative");
+ decimal.set_sign("None");
+});
+
+suite
+ .on('cycle', (event) => {
+ console.log(String(event.target));
+ console.log('μs/it:', event.target.stats.mean * 1000 * 1000);
+ console.log();
+ })
+ .run({ "async": false });
diff --git a/intl/icu_capi/js/package/diplomat.config.js b/intl/icu_capi/js/package/diplomat.config.js
new file mode 100644
index 0000000000..6f2cf83c74
--- /dev/null
+++ b/intl/icu_capi/js/package/diplomat.config.js
@@ -0,0 +1,7 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+export default {
+ wasm_path: new URL('target/wasm32-unknown-unknown/release/icu_capi_cdylib.wasm', import.meta.url),
+};
diff --git a/intl/icu_capi/js/package/docs/.gitignore b/intl/icu_capi/js/package/docs/.gitignore
new file mode 100644
index 0000000000..c795b054e5
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/.gitignore
@@ -0,0 +1 @@
+build \ No newline at end of file
diff --git a/intl/icu_capi/js/package/docs/Makefile b/intl/icu_capi/js/package/docs/Makefile
new file mode 100644
index 0000000000..d0c3cbf102
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/Makefile
@@ -0,0 +1,20 @@
+# Minimal makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line, and also
+# from the environment for the first two.
+SPHINXOPTS ?=
+SPHINXBUILD ?= sphinx-build
+SOURCEDIR = source
+BUILDDIR = build
+
+# Put it first so that "make" without argument is like "make help".
+help:
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.PHONY: help Makefile
+
+# Catch-all target: route all unknown targets to Sphinx using the new
+# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
+%: Makefile
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff --git a/intl/icu_capi/js/package/docs/make.bat b/intl/icu_capi/js/package/docs/make.bat
new file mode 100644
index 0000000000..747ffb7b30
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/make.bat
@@ -0,0 +1,35 @@
+@ECHO OFF
+
+pushd %~dp0
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+set SOURCEDIR=source
+set BUILDDIR=build
+
+%SPHINXBUILD% >NUL 2>NUL
+if errorlevel 9009 (
+ echo.
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
+ echo.installed, then set the SPHINXBUILD environment variable to point
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
+ echo.may add the Sphinx directory to PATH.
+ echo.
+ echo.If you don't have Sphinx installed, grab it from
+ echo.https://www.sphinx-doc.org/
+ exit /b 1
+)
+
+if "%1" == "" goto help
+
+%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+goto end
+
+:help
+%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+
+:end
+popd
diff --git a/intl/icu_capi/js/package/docs/source/bidi_ffi.rst b/intl/icu_capi/js/package/docs/source/bidi_ffi.rst
new file mode 100644
index 0000000000..783fe70baa
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/bidi_ffi.rst
@@ -0,0 +1,177 @@
+``bidi::ffi``
+=============
+
+.. js:class:: ICU4XBidi
+
+ An ICU4X Bidi object, containing loaded bidi data
+
+ See the `Rust documentation for BidiClassAdapter <https://docs.rs/icu/latest/icu/properties/bidi/struct.BidiClassAdapter.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Creates a new :js:class:`ICU4XBidi` from locale data.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/properties/bidi/struct.BidiClassAdapter.html#method.new>`__ for more information.
+
+
+ .. js:method:: for_text(text, default_level)
+
+ Use the data loaded in this object to process a string and calculate bidi information
+
+ Takes in a Level for the default level, if it is an invalid value it will default to LTR
+
+ See the `Rust documentation for new_with_data_source <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html#method.new_with_data_source>`__ for more information.
+
+
+ .. js:method:: reorder_visual(levels)
+
+ Utility function for producing reorderings given a list of levels
+
+ Produces a map saying which visual index maps to which source index.
+
+ The levels array must not have values greater than 126 (this is the Bidi maximum explicit depth plus one). Failure to follow this invariant may lead to incorrect results, but is still safe.
+
+ See the `Rust documentation for reorder_visual <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html#method.reorder_visual>`__ for more information.
+
+ - Note: ``levels`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+
+ .. js:function:: level_is_rtl(level)
+
+ Check if a Level returned by level_at is an RTL level.
+
+ Invalid levels (numbers greater than 125) will be assumed LTR
+
+ See the `Rust documentation for is_rtl <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.is_rtl>`__ for more information.
+
+
+ .. js:function:: level_is_ltr(level)
+
+ Check if a Level returned by level_at is an LTR level.
+
+ Invalid levels (numbers greater than 125) will be assumed LTR
+
+ See the `Rust documentation for is_ltr <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.is_ltr>`__ for more information.
+
+
+ .. js:function:: level_rtl()
+
+ Get a basic RTL Level value
+
+ See the `Rust documentation for rtl <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.rtl>`__ for more information.
+
+
+ .. js:function:: level_ltr()
+
+ Get a simple LTR Level value
+
+ See the `Rust documentation for ltr <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.ltr>`__ for more information.
+
+
+.. js:class:: ICU4XBidiDirection
+
+.. js:class:: ICU4XBidiInfo
+
+ An object containing bidi information for a given string, produced by ``for_text()`` on ``ICU4XBidi``
+
+ See the `Rust documentation for BidiInfo <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html>`__ for more information.
+
+
+ .. js:method:: paragraph_count()
+
+ The number of paragraphs contained here
+
+
+ .. js:method:: paragraph_at(n)
+
+ Get the nth paragraph, returning ``None`` if out of bounds
+
+
+ .. js:method:: size()
+
+ The number of bytes in this full text
+
+
+ .. js:method:: level_at(pos)
+
+ Get the BIDI level at a particular byte index in the full text. This integer is conceptually a ``unicode_bidi::Level``, and can be further inspected using the static methods on ICU4XBidi.
+
+ Returns 0 (equivalent to ``Level::ltr()``) on error
+
+
+.. js:class:: ICU4XBidiParagraph
+
+ Bidi information for a single processed paragraph
+
+
+ .. js:method:: set_paragraph_in_text(n)
+
+ Given a paragraph index ``n`` within the surrounding text, this sets this object to the paragraph at that index. Returns ``ICU4XError::OutOfBoundsError`` when out of bounds.
+
+ This is equivalent to calling ``paragraph_at()`` on ``ICU4XBidiInfo`` but doesn't create a new object
+
+
+ .. js:method:: direction()
+
+ The primary direction of this paragraph
+
+ See the `Rust documentation for level_at <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at>`__ for more information.
+
+
+ .. js:method:: size()
+
+ The number of bytes in this paragraph
+
+ See the `Rust documentation for len <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.ParagraphInfo.html#method.len>`__ for more information.
+
+
+ .. js:method:: range_start()
+
+ The start index of this paragraph within the source text
+
+
+ .. js:method:: range_end()
+
+ The end index of this paragraph within the source text
+
+
+ .. js:method:: reorder_line(range_start, range_end)
+
+ Reorder a line based on display order. The ranges are specified relative to the source text and must be contained within this paragraph's range.
+
+ See the `Rust documentation for level_at <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at>`__ for more information.
+
+
+ .. js:method:: level_at(pos)
+
+ Get the BIDI level at a particular byte index in this paragraph. This integer is conceptually a ``unicode_bidi::Level``, and can be further inspected using the static methods on ICU4XBidi.
+
+ Returns 0 (equivalent to ``Level::ltr()``) on error
+
+ See the `Rust documentation for level_at <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at>`__ for more information.
+
+
+.. js:class:: ICU4XReorderedIndexMap
+
+ Thin wrapper around a vector that maps visual indices to source indices
+
+ ``map[visualIndex] = sourceIndex``
+
+ Produced by ``reorder_visual()`` on :js:class:`ICU4XBidi`.
+
+
+ .. js:method:: as_slice()
+
+ Get this as a slice/array of indices
+
+
+ .. js:method:: len()
+
+ The length of this map
+
+
+ .. js:method:: get(index)
+
+ Get element at ``index``. Returns 0 when out of bounds (note that 0 is also a valid in-bounds value, please use ``len()`` to avoid out-of-bounds)
+
diff --git a/intl/icu_capi/js/package/docs/source/calendar_ffi.rst b/intl/icu_capi/js/package/docs/source/calendar_ffi.rst
new file mode 100644
index 0000000000..7d787c0479
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/calendar_ffi.rst
@@ -0,0 +1,60 @@
+``calendar::ffi``
+=================
+
+.. js:class:: ICU4XAnyCalendarKind
+
+ The various calendar types currently supported by :js:class:`ICU4XCalendar`
+
+ See the `Rust documentation for AnyCalendarKind <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html>`__ for more information.
+
+
+ .. js:function:: get_for_locale(locale)
+
+ Read the calendar type off of the -u-ca- extension on a locale.
+
+ Errors if there is no calendar on the locale or if the locale's calendar is not known or supported.
+
+ See the `Rust documentation for get_for_locale <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html#method.get_for_locale>`__ for more information.
+
+
+ .. js:function:: get_for_bcp47(s)
+
+ Obtain the calendar type given a BCP-47 -u-ca- extension string.
+
+ Errors if the calendar is not known or supported.
+
+ See the `Rust documentation for get_for_bcp47_value <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html#method.get_for_bcp47_value>`__ for more information.
+
+
+ .. js:method:: bcp47()
+
+ Obtain the string suitable for use in the -u-ca- extension in a BCP47 locale.
+
+ See the `Rust documentation for as_bcp47_string <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html#method.as_bcp47_string>`__ for more information.
+
+
+.. js:class:: ICU4XCalendar
+
+ See the `Rust documentation for AnyCalendar <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html>`__ for more information.
+
+
+ .. js:function:: create_for_locale(provider, locale)
+
+ Creates a new :js:class:`ICU4XCalendar` from the specified date and time.
+
+ See the `Rust documentation for new_for_locale <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new_for_locale>`__ for more information.
+
+
+ .. js:function:: create_for_kind(provider, kind)
+
+ Creates a new :js:class:`ICU4XCalendar` from the specified date and time.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new>`__ for more information.
+
+
+ .. js:method:: kind()
+
+ Returns the kind of this calendar
+
+ See the `Rust documentation for kind <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.kind>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/casemap_ffi.rst b/intl/icu_capi/js/package/docs/source/casemap_ffi.rst
new file mode 100644
index 0000000000..7af7654d11
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/casemap_ffi.rst
@@ -0,0 +1,182 @@
+``casemap::ffi``
+================
+
+.. js:class:: ICU4XCaseMapCloser
+
+ See the `Rust documentation for CaseMapCloser <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct a new ICU4XCaseMapper instance
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.new>`__ for more information.
+
+
+ .. js:method:: add_case_closure_to(c, builder)
+
+ Adds all simple case mappings and the full case folding for ``c`` to ``builder``. Also adds special case closure mappings.
+
+ See the `Rust documentation for add_case_closure_to <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.add_case_closure_to>`__ for more information.
+
+
+ .. js:method:: add_string_case_closure_to(s, builder)
+
+ Finds all characters and strings which may casemap to ``s`` as their full case folding string and adds them to the set.
+
+ Returns true if the string was found
+
+ See the `Rust documentation for add_string_case_closure_to <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.add_string_case_closure_to>`__ for more information.
+
+
+.. js:class:: ICU4XCaseMapper
+
+ See the `Rust documentation for CaseMapper <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct a new ICU4XCaseMapper instance
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.new>`__ for more information.
+
+
+ .. js:method:: lowercase(s, locale)
+
+ Returns the full lowercase mapping of the given string
+
+ See the `Rust documentation for lowercase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.lowercase>`__ for more information.
+
+
+ .. js:method:: uppercase(s, locale)
+
+ Returns the full uppercase mapping of the given string
+
+ See the `Rust documentation for uppercase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.uppercase>`__ for more information.
+
+
+ .. js:method:: titlecase_segment_with_only_case_data_v1(s, locale, options)
+
+ Returns the full titlecase mapping of the given string, performing head adjustment without loading additional data. (if head adjustment is enabled in the options)
+
+ The ``v1`` refers to the version of the options struct, which may change as we add more options
+
+ See the `Rust documentation for titlecase_segment_with_only_case_data <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.titlecase_segment_with_only_case_data>`__ for more information.
+
+
+ .. js:method:: fold(s)
+
+ Case-folds the characters in the given string
+
+ See the `Rust documentation for fold <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold>`__ for more information.
+
+
+ .. js:method:: fold_turkic(s)
+
+ Case-folds the characters in the given string using Turkic (T) mappings for dotted/dotless I.
+
+ See the `Rust documentation for fold_turkic <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold_turkic>`__ for more information.
+
+
+ .. js:method:: add_case_closure_to(c, builder)
+
+ Adds all simple case mappings and the full case folding for ``c`` to ``builder``. Also adds special case closure mappings.
+
+ In other words, this adds all characters that this casemaps to, as well as all characters that may casemap to this one.
+
+ Note that since ICU4XCodePointSetBuilder does not contain strings, this will ignore string mappings.
+
+ Identical to the similarly named method on ``ICU4XCaseMapCloser``, use that if you plan on using string case closure mappings too.
+
+ See the `Rust documentation for add_case_closure_to <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.add_case_closure_to>`__ for more information.
+
+
+ .. js:method:: simple_lowercase(ch)
+
+ Returns the simple lowercase mapping of the given character.
+
+ This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use ``ICU4XCaseMapper::lowercase``.
+
+ See the `Rust documentation for simple_lowercase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_lowercase>`__ for more information.
+
+
+ .. js:method:: simple_uppercase(ch)
+
+ Returns the simple uppercase mapping of the given character.
+
+ This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use ``ICU4XCaseMapper::uppercase``.
+
+ See the `Rust documentation for simple_uppercase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_uppercase>`__ for more information.
+
+
+ .. js:method:: simple_titlecase(ch)
+
+ Returns the simple titlecase mapping of the given character.
+
+ This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use ``ICU4XCaseMapper::titlecase_segment``.
+
+ See the `Rust documentation for simple_titlecase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_titlecase>`__ for more information.
+
+
+ .. js:method:: simple_fold(ch)
+
+ Returns the simple casefolding of the given character.
+
+ This function only implements simple folding. For full folding, use ``ICU4XCaseMapper::fold``.
+
+ See the `Rust documentation for simple_fold <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_fold>`__ for more information.
+
+
+ .. js:method:: simple_fold_turkic(ch)
+
+ Returns the simple casefolding of the given character in the Turkic locale
+
+ This function only implements simple folding. For full folding, use ``ICU4XCaseMapper::fold_turkic``.
+
+ See the `Rust documentation for simple_fold_turkic <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_fold_turkic>`__ for more information.
+
+
+.. js:class:: ICU4XLeadingAdjustment
+
+ See the `Rust documentation for LeadingAdjustment <https://docs.rs/icu/latest/icu/casemap/titlecase/enum.LeadingAdjustment.html>`__ for more information.
+
+
+.. js:class:: ICU4XTitlecaseMapper
+
+ See the `Rust documentation for TitlecaseMapper <https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct a new ``ICU4XTitlecaseMapper`` instance
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.new>`__ for more information.
+
+
+ .. js:method:: titlecase_segment_v1(s, locale, options)
+
+ Returns the full titlecase mapping of the given string
+
+ The ``v1`` refers to the version of the options struct, which may change as we add more options
+
+ See the `Rust documentation for titlecase_segment <https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.titlecase_segment>`__ for more information.
+
+
+.. js:class:: ICU4XTitlecaseOptionsV1
+
+ See the `Rust documentation for TitlecaseOptions <https://docs.rs/icu/latest/icu/casemap/titlecase/struct.TitlecaseOptions.html>`__ for more information.
+
+
+ .. js:attribute:: leading_adjustment
+
+ .. js:attribute:: trailing_case
+
+ .. js:function:: default_options()
+
+ See the `Rust documentation for default <https://docs.rs/icu/latest/icu/casemap/titlecase/struct.TitlecaseOptions.html#method.default>`__ for more information.
+
+
+.. js:class:: ICU4XTrailingCase
+
+ See the `Rust documentation for TrailingCase <https://docs.rs/icu/latest/icu/casemap/titlecase/enum.TrailingCase.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/collator_ffi.rst b/intl/icu_capi/js/package/docs/source/collator_ffi.rst
new file mode 100644
index 0000000000..2127d2713d
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/collator_ffi.rst
@@ -0,0 +1,97 @@
+``collator::ffi``
+=================
+
+.. js:class:: ICU4XCollator
+
+ See the `Rust documentation for Collator <https://docs.rs/icu/latest/icu/collator/struct.Collator.html>`__ for more information.
+
+
+ .. js:function:: create_v1(provider, locale, options)
+
+ Construct a new Collator instance.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.try_new>`__ for more information.
+
+
+ .. js:method:: compare(left, right)
+
+ Compare potentially ill-formed UTF-8 strings.
+
+ Ill-formed input is compared as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
+
+ See the `Rust documentation for compare_utf8 <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf8>`__ for more information.
+
+
+ .. js:method:: compare_valid_utf8(left, right)
+
+ Compare guaranteed well-formed UTF-8 strings.
+
+ Note: In C++, passing ill-formed UTF-8 strings is undefined behavior (and may be memory-unsafe to do so, too).
+
+ See the `Rust documentation for compare <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare>`__ for more information.
+
+
+ .. js:method:: compare_utf16(left, right)
+
+ Compare potentially ill-formed UTF-16 strings, with unpaired surrogates compared as REPLACEMENT CHARACTER.
+
+ See the `Rust documentation for compare_utf16 <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf16>`__ for more information.
+
+ - Note: ``left`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+ - Note: ``right`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+
+.. js:class:: ICU4XCollatorAlternateHandling
+
+ See the `Rust documentation for AlternateHandling <https://docs.rs/icu/latest/icu/collator/enum.AlternateHandling.html>`__ for more information.
+
+
+.. js:class:: ICU4XCollatorBackwardSecondLevel
+
+ See the `Rust documentation for BackwardSecondLevel <https://docs.rs/icu/latest/icu/collator/enum.BackwardSecondLevel.html>`__ for more information.
+
+
+.. js:class:: ICU4XCollatorCaseFirst
+
+ See the `Rust documentation for CaseFirst <https://docs.rs/icu/latest/icu/collator/enum.CaseFirst.html>`__ for more information.
+
+
+.. js:class:: ICU4XCollatorCaseLevel
+
+ See the `Rust documentation for CaseLevel <https://docs.rs/icu/latest/icu/collator/enum.CaseLevel.html>`__ for more information.
+
+
+.. js:class:: ICU4XCollatorMaxVariable
+
+ See the `Rust documentation for MaxVariable <https://docs.rs/icu/latest/icu/collator/enum.MaxVariable.html>`__ for more information.
+
+
+.. js:class:: ICU4XCollatorNumeric
+
+ See the `Rust documentation for Numeric <https://docs.rs/icu/latest/icu/collator/enum.Numeric.html>`__ for more information.
+
+
+.. js:class:: ICU4XCollatorOptionsV1
+
+ See the `Rust documentation for CollatorOptions <https://docs.rs/icu/latest/icu/collator/struct.CollatorOptions.html>`__ for more information.
+
+
+ .. js:attribute:: strength
+
+ .. js:attribute:: alternate_handling
+
+ .. js:attribute:: case_first
+
+ .. js:attribute:: max_variable
+
+ .. js:attribute:: case_level
+
+ .. js:attribute:: numeric
+
+ .. js:attribute:: backward_second_level
+
+.. js:class:: ICU4XCollatorStrength
+
+ See the `Rust documentation for Strength <https://docs.rs/icu/latest/icu/collator/enum.Strength.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/collections_sets_ffi.rst b/intl/icu_capi/js/package/docs/source/collections_sets_ffi.rst
new file mode 100644
index 0000000000..464ffbd6f0
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/collections_sets_ffi.rst
@@ -0,0 +1,143 @@
+``collections_sets::ffi``
+=========================
+
+.. js:class:: ICU4XCodePointSetBuilder
+
+ See the `Rust documentation for CodePointInversionListBuilder <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html>`__ for more information.
+
+
+ .. js:function:: create()
+
+ Make a new set builder containing nothing
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.new>`__ for more information.
+
+
+ .. js:method:: build()
+
+ Build this into a set
+
+ This object is repopulated with an empty builder
+
+ See the `Rust documentation for build <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.build>`__ for more information.
+
+
+ .. js:method:: complement()
+
+ Complements this set
+
+ (Elements in this set are removed and vice versa)
+
+ See the `Rust documentation for complement <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement>`__ for more information.
+
+
+ .. js:method:: is_empty()
+
+ Returns whether this set is empty
+
+ See the `Rust documentation for is_empty <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.is_empty>`__ for more information.
+
+
+ .. js:method:: add_char(ch)
+
+ Add a single character to the set
+
+ See the `Rust documentation for add_char <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_char>`__ for more information.
+
+
+ .. js:method:: add_u32(ch)
+
+ Add a single u32 value to the set
+
+ See the `Rust documentation for add_u32 <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_u32>`__ for more information.
+
+
+ .. js:method:: add_inclusive_range(start, end)
+
+ Add an inclusive range of characters to the set
+
+ See the `Rust documentation for add_range <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_range>`__ for more information.
+
+
+ .. js:method:: add_inclusive_range_u32(start, end)
+
+ Add an inclusive range of u32s to the set
+
+ See the `Rust documentation for add_range_u32 <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_range_u32>`__ for more information.
+
+
+ .. js:method:: add_set(data)
+
+ Add all elements that belong to the provided set to the set
+
+ See the `Rust documentation for add_set <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_set>`__ for more information.
+
+
+ .. js:method:: remove_char(ch)
+
+ Remove a single character to the set
+
+ See the `Rust documentation for remove_char <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_char>`__ for more information.
+
+
+ .. js:method:: remove_inclusive_range(start, end)
+
+ Remove an inclusive range of characters from the set
+
+ See the `Rust documentation for remove_range <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_range>`__ for more information.
+
+
+ .. js:method:: remove_set(data)
+
+ Remove all elements that belong to the provided set from the set
+
+ See the `Rust documentation for remove_set <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_set>`__ for more information.
+
+
+ .. js:method:: retain_char(ch)
+
+ Removes all elements from the set except a single character
+
+ See the `Rust documentation for retain_char <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_char>`__ for more information.
+
+
+ .. js:method:: retain_inclusive_range(start, end)
+
+ Removes all elements from the set except an inclusive range of characters f
+
+ See the `Rust documentation for retain_range <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_range>`__ for more information.
+
+
+ .. js:method:: retain_set(data)
+
+ Removes all elements from the set except all elements in the provided set
+
+ See the `Rust documentation for retain_set <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_set>`__ for more information.
+
+
+ .. js:method:: complement_char(ch)
+
+ Complement a single character to the set
+
+ (Characters which are in this set are removed and vice versa)
+
+ See the `Rust documentation for complement_char <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_char>`__ for more information.
+
+
+ .. js:method:: complement_inclusive_range(start, end)
+
+ Complement an inclusive range of characters from the set
+
+ (Characters which are in this set are removed and vice versa)
+
+ See the `Rust documentation for complement_range <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_range>`__ for more information.
+
+
+ .. js:method:: complement_set(data)
+
+ Complement all elements that belong to the provided set from the set
+
+ (Characters which are in this set are removed and vice versa)
+
+ See the `Rust documentation for complement_set <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_set>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/common_ffi.rst b/intl/icu_capi/js/package/docs/source/common_ffi.rst
new file mode 100644
index 0000000000..aa630c3c42
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/common_ffi.rst
@@ -0,0 +1,7 @@
+``common::ffi``
+===============
+
+.. js:class:: ICU4XOrdering
+
+ See the `Rust documentation for Ordering <https://docs.rs/core/latest/core/cmp/enum.Ordering.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/conf.py b/intl/icu_capi/js/package/docs/source/conf.py
new file mode 100644
index 0000000000..6571e77e46
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/conf.py
@@ -0,0 +1,60 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+# Configuration file for the Sphinx documentation builder.
+#
+# This file only contains a selection of the most common options. For a full
+# list see the documentation:
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
+
+# -- Path setup --------------------------------------------------------------
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+# import os
+# import sys
+# sys.path.insert(0, os.path.abspath('.'))
+
+
+# -- Project information -----------------------------------------------------
+
+project = 'ICU4X'
+copyright = '2022, The ICU4X Developers'
+author = 'The ICU4X Developers'
+
+
+# -- General configuration ---------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = []
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path.
+exclude_patterns = []
+
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+#
+html_theme = 'sphinx_rtd_theme'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = []
+
+html_theme_options = {
+ 'navigation_depth': 4,
+}
diff --git a/intl/icu_capi/js/package/docs/source/data_struct_ffi.rst b/intl/icu_capi/js/package/docs/source/data_struct_ffi.rst
new file mode 100644
index 0000000000..ad9e71f821
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/data_struct_ffi.rst
@@ -0,0 +1,20 @@
+``data_struct::ffi``
+====================
+
+.. js:class:: ICU4XDataStruct
+
+ A generic data struct to be used by ICU4X
+
+ This can be used to construct a StructDataProvider.
+
+
+ .. js:function:: create_decimal_symbols_v1(plus_sign_prefix, plus_sign_suffix, minus_sign_prefix, minus_sign_suffix, decimal_separator, grouping_separator, primary_group_size, secondary_group_size, min_group_size, digits)
+
+ Construct a new DecimalSymbolsV1 data struct.
+
+ C++ users: All string arguments must be valid UTF8
+
+ See the `Rust documentation for DecimalSymbolsV1 <https://docs.rs/icu/latest/icu/decimal/provider/struct.DecimalSymbolsV1.html>`__ for more information.
+
+ - Note: ``digits`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
diff --git a/intl/icu_capi/js/package/docs/source/date_ffi.rst b/intl/icu_capi/js/package/docs/source/date_ffi.rst
new file mode 100644
index 0000000000..ef3936bdd9
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/date_ffi.rst
@@ -0,0 +1,234 @@
+``date::ffi``
+=============
+
+.. js:class:: ICU4XDate
+
+ An ICU4X Date object capable of containing a date and time for any calendar.
+
+ See the `Rust documentation for Date <https://docs.rs/icu/latest/icu/calendar/struct.Date.html>`__ for more information.
+
+
+ .. js:function:: create_from_iso_in_calendar(year, month, day, calendar)
+
+ Creates a new :js:class:`ICU4XDate` representing the ISO date and time given but in a given calendar
+
+ See the `Rust documentation for new_from_iso <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.new_from_iso>`__ for more information.
+
+
+ .. js:function:: create_from_codes_in_calendar(era_code, year, month_code, day, calendar)
+
+ Creates a new :js:class:`ICU4XDate` from the given codes, which are interpreted in the given calendar system
+
+ See the `Rust documentation for try_new_from_codes <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_from_codes>`__ for more information.
+
+
+ .. js:method:: to_calendar(calendar)
+
+ Convert this date to one in a different calendar
+
+ See the `Rust documentation for to_calendar <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_calendar>`__ for more information.
+
+
+ .. js:method:: to_iso()
+
+ Converts this date to ISO
+
+ See the `Rust documentation for to_iso <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_iso>`__ for more information.
+
+
+ .. js:method:: day_of_month()
+
+ Returns the 1-indexed day in the month for this date
+
+ See the `Rust documentation for day_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month>`__ for more information.
+
+
+ .. js:method:: day_of_week()
+
+ Returns the day in the week for this day
+
+ See the `Rust documentation for day_of_week <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week>`__ for more information.
+
+
+ .. js:method:: week_of_month(first_weekday)
+
+ Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ ``first_weekday`` can be obtained via ``first_weekday()`` on :js:class:`ICU4XWeekCalculator`
+
+ See the `Rust documentation for week_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month>`__ for more information.
+
+
+ .. js:method:: week_of_year(calculator)
+
+ Returns the week number in this year, using week data
+
+ See the `Rust documentation for week_of_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year>`__ for more information.
+
+
+ .. js:method:: ordinal_month()
+
+ Returns 1-indexed number of the month of this date in its year
+
+ Note that for lunar calendars this may not lead to the same month having the same ordinal month across years; use month_code if you care about month identity.
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. js:method:: month_code()
+
+ Returns the month code for this date. Typically something like "M01", "M02", but can be more complicated for lunar calendars.
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. js:method:: year_in_era()
+
+ Returns the year number in the current era for this date
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. js:method:: era()
+
+ Returns the era for this date,
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/struct.Date.html#method.year>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/types/struct.Era.html>`__
+
+
+ .. js:method:: months_in_year()
+
+ Returns the number of months in the year represented by this date
+
+ See the `Rust documentation for months_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year>`__ for more information.
+
+
+ .. js:method:: days_in_month()
+
+ Returns the number of days in the month represented by this date
+
+ See the `Rust documentation for days_in_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month>`__ for more information.
+
+
+ .. js:method:: days_in_year()
+
+ Returns the number of days in the year represented by this date
+
+ See the `Rust documentation for days_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year>`__ for more information.
+
+
+ .. js:method:: calendar()
+
+ Returns the :js:class:`ICU4XCalendar` object backing this date
+
+ See the `Rust documentation for calendar <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.calendar>`__ for more information.
+
+
+.. js:class:: ICU4XIsoDate
+
+ An ICU4X Date object capable of containing a ISO-8601 date
+
+ See the `Rust documentation for Date <https://docs.rs/icu/latest/icu/calendar/struct.Date.html>`__ for more information.
+
+
+ .. js:function:: create(year, month, day)
+
+ Creates a new :js:class:`ICU4XIsoDate` from the specified date and time.
+
+ See the `Rust documentation for try_new_iso_date <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_iso_date>`__ for more information.
+
+
+ .. js:function:: create_for_unix_epoch()
+
+ Creates a new :js:class:`ICU4XIsoDate` representing January 1, 1970.
+
+ See the `Rust documentation for unix_epoch <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.unix_epoch>`__ for more information.
+
+
+ .. js:method:: to_calendar(calendar)
+
+ Convert this date to one in a different calendar
+
+ See the `Rust documentation for to_calendar <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_calendar>`__ for more information.
+
+
+ .. js:method:: to_any()
+
+ See the `Rust documentation for to_any <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_any>`__ for more information.
+
+
+ .. js:method:: day_of_month()
+
+ Returns the 1-indexed day in the month for this date
+
+ See the `Rust documentation for day_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month>`__ for more information.
+
+
+ .. js:method:: day_of_week()
+
+ Returns the day in the week for this day
+
+ See the `Rust documentation for day_of_week <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week>`__ for more information.
+
+
+ .. js:method:: week_of_month(first_weekday)
+
+ Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ ``first_weekday`` can be obtained via ``first_weekday()`` on :js:class:`ICU4XWeekCalculator`
+
+ See the `Rust documentation for week_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month>`__ for more information.
+
+
+ .. js:method:: week_of_year(calculator)
+
+ Returns the week number in this year, using week data
+
+ See the `Rust documentation for week_of_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year>`__ for more information.
+
+
+ .. js:method:: month()
+
+ Returns 1-indexed number of the month of this date in its year
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. js:method:: year()
+
+ Returns the year number for this date
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. js:method:: is_in_leap_year()
+
+ Returns if the year is a leap year for this date
+
+ See the `Rust documentation for is_in_leap_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.is_in_leap_year>`__ for more information.
+
+
+ .. js:method:: months_in_year()
+
+ Returns the number of months in the year represented by this date
+
+ See the `Rust documentation for months_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year>`__ for more information.
+
+
+ .. js:method:: days_in_month()
+
+ Returns the number of days in the month represented by this date
+
+ See the `Rust documentation for days_in_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month>`__ for more information.
+
+
+ .. js:method:: days_in_year()
+
+ Returns the number of days in the year represented by this date
+
+ See the `Rust documentation for days_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year>`__ for more information.
+
+
+.. js:class:: ICU4XIsoWeekday
diff --git a/intl/icu_capi/js/package/docs/source/datetime_ffi.rst b/intl/icu_capi/js/package/docs/source/datetime_ffi.rst
new file mode 100644
index 0000000000..f1fc88d41b
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/datetime_ffi.rst
@@ -0,0 +1,337 @@
+``datetime::ffi``
+=================
+
+.. js:class:: ICU4XDateTime
+
+ An ICU4X DateTime object capable of containing a date and time for any calendar.
+
+ See the `Rust documentation for DateTime <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html>`__ for more information.
+
+
+ .. js:function:: create_from_iso_in_calendar(year, month, day, hour, minute, second, nanosecond, calendar)
+
+ Creates a new :js:class:`ICU4XDateTime` representing the ISO date and time given but in a given calendar
+
+ See the `Rust documentation for new_from_iso <https://docs.rs/icu/latest/icu/struct.DateTime.html#method.new_from_iso>`__ for more information.
+
+
+ .. js:function:: create_from_codes_in_calendar(era_code, year, month_code, day, hour, minute, second, nanosecond, calendar)
+
+ Creates a new :js:class:`ICU4XDateTime` from the given codes, which are interpreted in the given calendar system
+
+ See the `Rust documentation for try_new_from_codes <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_from_codes>`__ for more information.
+
+
+ .. js:function:: create_from_date_and_time(date, time)
+
+ Creates a new :js:class:`ICU4XDateTime` from an :js:class:`ICU4XDate` and :js:class:`ICU4XTime` object
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.new>`__ for more information.
+
+
+ .. js:method:: date()
+
+ Gets a copy of the date contained in this object
+
+ See the `Rust documentation for date <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.date>`__ for more information.
+
+
+ .. js:method:: time()
+
+ Gets the time contained in this object
+
+ See the `Rust documentation for time <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.time>`__ for more information.
+
+
+ .. js:method:: to_iso()
+
+ Converts this date to ISO
+
+ See the `Rust documentation for to_iso <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_iso>`__ for more information.
+
+
+ .. js:method:: to_calendar(calendar)
+
+ Convert this datetime to one in a different calendar
+
+ See the `Rust documentation for to_calendar <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_calendar>`__ for more information.
+
+
+ .. js:method:: hour()
+
+ Returns the hour in this time
+
+ See the `Rust documentation for hour <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour>`__ for more information.
+
+
+ .. js:method:: minute()
+
+ Returns the minute in this time
+
+ See the `Rust documentation for minute <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute>`__ for more information.
+
+
+ .. js:method:: second()
+
+ Returns the second in this time
+
+ See the `Rust documentation for second <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second>`__ for more information.
+
+
+ .. js:method:: nanosecond()
+
+ Returns the nanosecond in this time
+
+ See the `Rust documentation for nanosecond <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond>`__ for more information.
+
+
+ .. js:method:: day_of_month()
+
+ Returns the 1-indexed day in the month for this date
+
+ See the `Rust documentation for day_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month>`__ for more information.
+
+
+ .. js:method:: day_of_week()
+
+ Returns the day in the week for this day
+
+ See the `Rust documentation for day_of_week <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week>`__ for more information.
+
+
+ .. js:method:: week_of_month(first_weekday)
+
+ Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ ``first_weekday`` can be obtained via ``first_weekday()`` on :js:class:`ICU4XWeekCalculator`
+
+ See the `Rust documentation for week_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month>`__ for more information.
+
+
+ .. js:method:: week_of_year(calculator)
+
+ Returns the week number in this year, using week data
+
+ See the `Rust documentation for week_of_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year>`__ for more information.
+
+
+ .. js:method:: ordinal_month()
+
+ Returns 1-indexed number of the month of this date in its year
+
+ Note that for lunar calendars this may not lead to the same month having the same ordinal month across years; use month_code if you care about month identity.
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. js:method:: month_code()
+
+ Returns the month code for this date. Typically something like "M01", "M02", but can be more complicated for lunar calendars.
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. js:method:: year_in_era()
+
+ Returns the year number in the current era for this date
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. js:method:: era()
+
+ Returns the era for this date,
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. js:method:: months_in_year()
+
+ Returns the number of months in the year represented by this date
+
+ See the `Rust documentation for months_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year>`__ for more information.
+
+
+ .. js:method:: days_in_month()
+
+ Returns the number of days in the month represented by this date
+
+ See the `Rust documentation for days_in_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month>`__ for more information.
+
+
+ .. js:method:: days_in_year()
+
+ Returns the number of days in the year represented by this date
+
+ See the `Rust documentation for days_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year>`__ for more information.
+
+
+ .. js:method:: calendar()
+
+ Returns the :js:class:`ICU4XCalendar` object backing this date
+
+ See the `Rust documentation for calendar <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.calendar>`__ for more information.
+
+
+.. js:class:: ICU4XIsoDateTime
+
+ An ICU4X DateTime object capable of containing a ISO-8601 date and time.
+
+ See the `Rust documentation for DateTime <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html>`__ for more information.
+
+
+ .. js:function:: create(year, month, day, hour, minute, second, nanosecond)
+
+ Creates a new :js:class:`ICU4XIsoDateTime` from the specified date and time.
+
+ See the `Rust documentation for try_new_iso_datetime <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_iso_datetime>`__ for more information.
+
+
+ .. js:function:: crate_from_date_and_time(date, time)
+
+ Creates a new :js:class:`ICU4XIsoDateTime` from an :js:class:`ICU4XIsoDate` and :js:class:`ICU4XTime` object
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.new>`__ for more information.
+
+
+ .. js:function:: create_from_minutes_since_local_unix_epoch(minutes)
+
+ Construct from the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)
+
+ See the `Rust documentation for from_minutes_since_local_unix_epoch <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.from_minutes_since_local_unix_epoch>`__ for more information.
+
+
+ .. js:method:: date()
+
+ Gets the date contained in this object
+
+ See the `Rust documentation for date <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.date>`__ for more information.
+
+
+ .. js:method:: time()
+
+ Gets the time contained in this object
+
+ See the `Rust documentation for time <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.time>`__ for more information.
+
+
+ .. js:method:: to_any()
+
+ Converts this to an :js:class:`ICU4XDateTime` capable of being mixed with dates of other calendars
+
+ See the `Rust documentation for to_any <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_any>`__ for more information.
+
+
+ .. js:method:: minutes_since_local_unix_epoch()
+
+ Gets the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)
+
+ See the `Rust documentation for minutes_since_local_unix_epoch <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.minutes_since_local_unix_epoch>`__ for more information.
+
+
+ .. js:method:: to_calendar(calendar)
+
+ Convert this datetime to one in a different calendar
+
+ See the `Rust documentation for to_calendar <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_calendar>`__ for more information.
+
+
+ .. js:method:: hour()
+
+ Returns the hour in this time
+
+ See the `Rust documentation for hour <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour>`__ for more information.
+
+
+ .. js:method:: minute()
+
+ Returns the minute in this time
+
+ See the `Rust documentation for minute <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute>`__ for more information.
+
+
+ .. js:method:: second()
+
+ Returns the second in this time
+
+ See the `Rust documentation for second <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second>`__ for more information.
+
+
+ .. js:method:: nanosecond()
+
+ Returns the nanosecond in this time
+
+ See the `Rust documentation for nanosecond <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond>`__ for more information.
+
+
+ .. js:method:: day_of_month()
+
+ Returns the 1-indexed day in the month for this date
+
+ See the `Rust documentation for day_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month>`__ for more information.
+
+
+ .. js:method:: day_of_week()
+
+ Returns the day in the week for this day
+
+ See the `Rust documentation for day_of_week <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week>`__ for more information.
+
+
+ .. js:method:: week_of_month(first_weekday)
+
+ Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ ``first_weekday`` can be obtained via ``first_weekday()`` on :js:class:`ICU4XWeekCalculator`
+
+ See the `Rust documentation for week_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month>`__ for more information.
+
+
+ .. js:method:: week_of_year(calculator)
+
+ Returns the week number in this year, using week data
+
+ See the `Rust documentation for week_of_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year>`__ for more information.
+
+
+ .. js:method:: month()
+
+ Returns 1-indexed number of the month of this date in its year
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. js:method:: year()
+
+ Returns the year number for this date
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. js:method:: is_in_leap_year()
+
+ Returns whether this date is in a leap year
+
+ See the `Rust documentation for is_in_leap_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.is_in_leap_year>`__ for more information.
+
+
+ .. js:method:: months_in_year()
+
+ Returns the number of months in the year represented by this date
+
+ See the `Rust documentation for months_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year>`__ for more information.
+
+
+ .. js:method:: days_in_month()
+
+ Returns the number of days in the month represented by this date
+
+ See the `Rust documentation for days_in_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month>`__ for more information.
+
+
+ .. js:method:: days_in_year()
+
+ Returns the number of days in the year represented by this date
+
+ See the `Rust documentation for days_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/datetime_formatter_ffi.rst b/intl/icu_capi/js/package/docs/source/datetime_formatter_ffi.rst
new file mode 100644
index 0000000000..d9c6dce10f
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/datetime_formatter_ffi.rst
@@ -0,0 +1,172 @@
+``datetime_formatter::ffi``
+===========================
+
+.. js:class:: ICU4XDateFormatter
+
+ An ICU4X DateFormatter object capable of formatting a :js:class:`ICU4XDate` as a string, using some calendar specified at runtime in the locale.
+
+ See the `Rust documentation for DateFormatter <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_length(provider, locale, date_length)
+
+ Creates a new :js:class:`ICU4XDateFormatter` from locale data.
+
+ See the `Rust documentation for try_new_with_length <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.try_new_with_length>`__ for more information.
+
+
+ .. js:method:: format_date(value)
+
+ Formats a :js:class:`ICU4XDate` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_iso_date(value)
+
+ Formats a :js:class:`ICU4XIsoDate` to a string.
+
+ Will convert to this formatter's calendar first
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_datetime(value)
+
+ Formats a :js:class:`ICU4XDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_iso_datetime(value)
+
+ Formats a :js:class:`ICU4XIsoDateTime` to a string.
+
+ Will convert to this formatter's calendar first
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XDateLength
+
+ See the `Rust documentation for Date <https://docs.rs/icu/latest/icu/datetime/options/length/enum.Date.html>`__ for more information.
+
+
+.. js:class:: ICU4XDateTimeFormatter
+
+ An ICU4X DateFormatter object capable of formatting a :js:class:`ICU4XDateTime` as a string, using some calendar specified at runtime in the locale.
+
+ See the `Rust documentation for DateTimeFormatter <https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_lengths(provider, locale, date_length, time_length)
+
+ Creates a new :js:class:`ICU4XDateTimeFormatter` from locale data.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:method:: format_datetime(value)
+
+ Formats a :js:class:`ICU4XDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_iso_datetime(value)
+
+ Formats a :js:class:`ICU4XIsoDateTime` to a string.
+
+ Will convert to this formatter's calendar first
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XGregorianDateFormatter
+
+ An ICU4X TypedDateFormatter object capable of formatting a :js:class:`ICU4XIsoDateTime` as a string, using the Gregorian Calendar.
+
+ See the `Rust documentation for TypedDateFormatter <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_length(provider, locale, length)
+
+ Creates a new :js:class:`ICU4XGregorianDateFormatter` from locale data.
+
+ See the `Rust documentation for try_new_with_length <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.try_new_with_length>`__ for more information.
+
+
+ .. js:method:: format_iso_date(value)
+
+ Formats a :js:class:`ICU4XIsoDate` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_iso_datetime(value)
+
+ Formats a :js:class:`ICU4XIsoDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XGregorianDateTimeFormatter
+
+ An ICU4X TypedDateTimeFormatter object capable of formatting a :js:class:`ICU4XIsoDateTime` as a string, using the Gregorian Calendar.
+
+ See the `Rust documentation for TypedDateTimeFormatter <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_lengths(provider, locale, date_length, time_length)
+
+ Creates a new :js:class:`ICU4XGregorianDateFormatter` from locale data.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:method:: format_iso_datetime(value)
+
+ Formats a :js:class:`ICU4XIsoDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XTimeFormatter
+
+ An ICU4X TimeFormatter object capable of formatting an :js:class:`ICU4XTime` type (and others) as a string
+
+ See the `Rust documentation for TimeFormatter <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_length(provider, locale, length)
+
+ Creates a new :js:class:`ICU4XTimeFormatter` from locale data.
+
+ See the `Rust documentation for try_new_with_length <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.try_new_with_length>`__ for more information.
+
+
+ .. js:method:: format_time(value)
+
+ Formats a :js:class:`ICU4XTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_datetime(value)
+
+ Formats a :js:class:`ICU4XDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_iso_datetime(value)
+
+ Formats a :js:class:`ICU4XIsoDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XTimeLength
+
+ See the `Rust documentation for Time <https://docs.rs/icu/latest/icu/datetime/options/length/enum.Time.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/decimal_ffi.rst b/intl/icu_capi/js/package/docs/source/decimal_ffi.rst
new file mode 100644
index 0000000000..98fef76f5a
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/decimal_ffi.rst
@@ -0,0 +1,35 @@
+``decimal::ffi``
+================
+
+.. js:class:: ICU4XFixedDecimalFormatter
+
+ An ICU4X Fixed Decimal Format object, capable of formatting a :js:class:`ICU4XFixedDecimal` as a string.
+
+ See the `Rust documentation for FixedDecimalFormatter <https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_grouping_strategy(provider, locale, grouping_strategy)
+
+ Creates a new :js:class:`ICU4XFixedDecimalFormatter` from locale data.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:function:: create_with_decimal_symbols_v1(data_struct, grouping_strategy)
+
+ Creates a new :js:class:`ICU4XFixedDecimalFormatter` from preconstructed locale data in the form of an :js:class:`ICU4XDataStruct` constructed from ``ICU4XDataStruct::create_decimal_symbols()``.
+
+ The contents of the data struct will be consumed: if you wish to use the struct again it will have to be reconstructed. Passing a consumed struct to this method will return an error.
+
+
+ .. js:method:: format(value)
+
+ Formats a :js:class:`ICU4XFixedDecimal` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XFixedDecimalGroupingStrategy
+
+ See the `Rust documentation for GroupingStrategy <https://docs.rs/icu/latest/icu/decimal/options/enum.GroupingStrategy.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/displaynames_ffi.rst b/intl/icu_capi/js/package/docs/source/displaynames_ffi.rst
new file mode 100644
index 0000000000..97002eef7e
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/displaynames_ffi.rst
@@ -0,0 +1,75 @@
+``displaynames::ffi``
+=====================
+
+.. js:class:: ICU4XDisplayNamesFallback
+
+ See the `Rust documentation for Fallback <https://docs.rs/icu/latest/icu/displaynames/options/enum.Fallback.html>`__ for more information.
+
+
+.. js:class:: ICU4XDisplayNamesOptionsV1
+
+ See the `Rust documentation for DisplayNamesOptions <https://docs.rs/icu/latest/icu/displaynames/options/struct.DisplayNamesOptions.html>`__ for more information.
+
+
+ .. js:attribute:: style
+
+ The optional formatting style to use for display name.
+
+
+ .. js:attribute:: fallback
+
+ The fallback return when the system does not have the requested display name, defaults to "code".
+
+
+ .. js:attribute:: language_display
+
+ The language display kind, defaults to "dialect".
+
+
+.. js:class:: ICU4XDisplayNamesStyle
+
+ See the `Rust documentation for Style <https://docs.rs/icu/latest/icu/displaynames/options/enum.Style.html>`__ for more information.
+
+
+.. js:class:: ICU4XLanguageDisplay
+
+ See the `Rust documentation for LanguageDisplay <https://docs.rs/icu/latest/icu/displaynames/options/enum.LanguageDisplay.html>`__ for more information.
+
+
+.. js:class:: ICU4XLocaleDisplayNamesFormatter
+
+ See the `Rust documentation for LocaleDisplayNamesFormatter <https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html>`__ for more information.
+
+
+ .. js:function:: create(provider, locale, options)
+
+ Creates a new ``LocaleDisplayNamesFormatter`` from locale data and an options bag.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:method:: of(locale)
+
+ Returns the locale-specific display name of a locale.
+
+ See the `Rust documentation for of <https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.of>`__ for more information.
+
+
+.. js:class:: ICU4XRegionDisplayNames
+
+ See the `Rust documentation for RegionDisplayNames <https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html>`__ for more information.
+
+
+ .. js:function:: create(provider, locale)
+
+ Creates a new ``RegionDisplayNames`` from locale data and an options bag.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.try_new>`__ for more information.
+
+
+ .. js:method:: of(region)
+
+ Returns the locale specific display name of a region. Note that the funtion returns an empty string in case the display name for a given region code is not found.
+
+ See the `Rust documentation for of <https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.of>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/errors_ffi.rst b/intl/icu_capi/js/package/docs/source/errors_ffi.rst
new file mode 100644
index 0000000000..c05b848844
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/errors_ffi.rst
@@ -0,0 +1,11 @@
+``errors::ffi``
+===============
+
+.. js:class:: ICU4XError
+
+ A common enum for errors that ICU4X may return, organized by API
+
+ The error names are stable and can be checked against as strings in the JS API
+
+ Additional information: `1 <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FixedDecimalError.html>`__, `2 <https://docs.rs/icu/latest/icu/calendar/enum.CalendarError.html>`__, `3 <https://docs.rs/icu/latest/icu/collator/enum.CollatorError.html>`__, `4 <https://docs.rs/icu/latest/icu/datetime/enum.DateTimeError.html>`__, `5 <https://docs.rs/icu/latest/icu/decimal/enum.DecimalError.html>`__, `6 <https://docs.rs/icu/latest/icu/list/enum.ListError.html>`__, `7 <https://docs.rs/icu/latest/icu/locid/enum.ParserError.html>`__, `8 <https://docs.rs/icu/latest/icu/locid_transform/enum.LocaleTransformError.html>`__, `9 <https://docs.rs/icu/latest/icu/normalizer/enum.NormalizerError.html>`__, `10 <https://docs.rs/icu/latest/icu/plurals/enum.PluralsError.html>`__, `11 <https://docs.rs/icu/latest/icu/properties/enum.PropertiesError.html>`__, `12 <https://docs.rs/icu/latest/icu/provider/struct.DataError.html>`__, `13 <https://docs.rs/icu/latest/icu/provider/enum.DataErrorKind.html>`__, `14 <https://docs.rs/icu/latest/icu/segmenter/enum.SegmenterError.html>`__, `15 <https://docs.rs/icu/latest/icu/timezone/enum.TimeZoneError.html>`__
+
diff --git a/intl/icu_capi/js/package/docs/source/fallbacker_ffi.rst b/intl/icu_capi/js/package/docs/source/fallbacker_ffi.rst
new file mode 100644
index 0000000000..e3bd0ae2bb
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/fallbacker_ffi.rst
@@ -0,0 +1,103 @@
+``fallbacker::ffi``
+===================
+
+.. js:class:: ICU4XLocaleFallbackConfig
+
+ Collection of configurations for the ICU4X fallback algorithm.
+
+ See the `Rust documentation for LocaleFallbackConfig <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackConfig.html>`__ for more information.
+
+
+ .. js:attribute:: priority
+
+ Choice of priority mode.
+
+
+ .. js:attribute:: extension_key
+
+ An empty string is considered ``None``.
+
+
+ .. js:attribute:: fallback_supplement
+
+ Fallback supplement data key to customize fallback rules.
+
+
+.. js:class:: ICU4XLocaleFallbackIterator
+
+ An iterator over the locale under fallback.
+
+ See the `Rust documentation for LocaleFallbackIterator <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html>`__ for more information.
+
+
+ .. js:method:: get()
+
+ Gets a snapshot of the current state of the locale.
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html#method.get>`__ for more information.
+
+
+ .. js:method:: step()
+
+ Performs one step of the fallback algorithm, mutating the locale.
+
+ See the `Rust documentation for step <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html#method.step>`__ for more information.
+
+
+.. js:class:: ICU4XLocaleFallbackPriority
+
+ Priority mode for the ICU4X fallback algorithm.
+
+ See the `Rust documentation for LocaleFallbackPriority <https://docs.rs/icu/latest/icu/locid_transform/fallback/enum.LocaleFallbackPriority.html>`__ for more information.
+
+
+.. js:class:: ICU4XLocaleFallbackSupplement
+
+ What additional data is required to load when performing fallback.
+
+ See the `Rust documentation for LocaleFallbackSupplement <https://docs.rs/icu/latest/icu/locid_transform/fallback/enum.LocaleFallbackSupplement.html>`__ for more information.
+
+
+.. js:class:: ICU4XLocaleFallbacker
+
+ An object that runs the ICU4X locale fallback algorithm.
+
+ See the `Rust documentation for LocaleFallbacker <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Creates a new ``ICU4XLocaleFallbacker`` from a data provider.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.new>`__ for more information.
+
+
+ .. js:function:: create_without_data()
+
+ Creates a new ``ICU4XLocaleFallbacker`` without data for limited functionality.
+
+ See the `Rust documentation for new_without_data <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.new_without_data>`__ for more information.
+
+
+ .. js:method:: for_config(config)
+
+ Associates this ``ICU4XLocaleFallbacker`` with configuration options.
+
+ See the `Rust documentation for for_config <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.for_config>`__ for more information.
+
+
+.. js:class:: ICU4XLocaleFallbackerWithConfig
+
+ An object that runs the ICU4X locale fallback algorithm with specific configurations.
+
+ See the `Rust documentation for LocaleFallbacker <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html>`__ for more information.
+
+ See the `Rust documentation for LocaleFallbackerWithConfig <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackerWithConfig.html>`__ for more information.
+
+
+ .. js:method:: fallback_for_locale(locale)
+
+ Creates an iterator from a locale with each step of fallback.
+
+ See the `Rust documentation for fallback_for <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.fallback_for>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/fixed_decimal_ffi.rst b/intl/icu_capi/js/package/docs/source/fixed_decimal_ffi.rst
new file mode 100644
index 0000000000..354705dc5c
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/fixed_decimal_ffi.rst
@@ -0,0 +1,247 @@
+``fixed_decimal::ffi``
+======================
+
+.. js:class:: ICU4XFixedDecimal
+
+ See the `Rust documentation for FixedDecimal <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html>`__ for more information.
+
+
+ .. js:function:: create_from_i32(v)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an integer.
+
+ See the `Rust documentation for FixedDecimal <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html>`__ for more information.
+
+
+ .. js:function:: create_from_u32(v)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an integer.
+
+ See the `Rust documentation for FixedDecimal <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html>`__ for more information.
+
+
+ .. js:function:: create_from_i64(v)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an integer.
+
+ See the `Rust documentation for FixedDecimal <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html>`__ for more information.
+
+
+ .. js:function:: create_from_u64(v)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an integer.
+
+ See the `Rust documentation for FixedDecimal <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html>`__ for more information.
+
+
+ .. js:function:: create_from_f64_with_integer_precision(f)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an integer-valued float
+
+ See the `Rust documentation for try_from_f64 <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64>`__ for more information.
+
+ See the `Rust documentation for FloatPrecision <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html>`__ for more information.
+
+
+ .. js:function:: create_from_f64_with_lower_magnitude(f, magnitude)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an float, with a given power of 10 for the lower magnitude
+
+ See the `Rust documentation for try_from_f64 <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64>`__ for more information.
+
+ See the `Rust documentation for FloatPrecision <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html>`__ for more information.
+
+
+ .. js:function:: create_from_f64_with_significant_digits(f, digits)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an float, for a given number of significant digits
+
+ See the `Rust documentation for try_from_f64 <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64>`__ for more information.
+
+ See the `Rust documentation for FloatPrecision <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html>`__ for more information.
+
+
+ .. js:function:: create_from_f64_with_floating_precision(f)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an float, with enough digits to recover the original floating point in IEEE 754 without needing trailing zeros
+
+ See the `Rust documentation for try_from_f64 <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64>`__ for more information.
+
+ See the `Rust documentation for FloatPrecision <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html>`__ for more information.
+
+
+ .. js:function:: create_from_string(v)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from a string.
+
+ See the `Rust documentation for from_str <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.from_str>`__ for more information.
+
+
+ .. js:method:: digit_at(magnitude)
+
+ See the `Rust documentation for digit_at <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.digit_at>`__ for more information.
+
+
+ .. js:method:: magnitude_start()
+
+ See the `Rust documentation for magnitude_range <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.magnitude_range>`__ for more information.
+
+
+ .. js:method:: magnitude_end()
+
+ See the `Rust documentation for magnitude_range <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.magnitude_range>`__ for more information.
+
+
+ .. js:method:: nonzero_magnitude_start()
+
+ See the `Rust documentation for nonzero_magnitude_start <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.nonzero_magnitude_start>`__ for more information.
+
+
+ .. js:method:: nonzero_magnitude_end()
+
+ See the `Rust documentation for nonzero_magnitude_end <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.nonzero_magnitude_end>`__ for more information.
+
+
+ .. js:method:: is_zero()
+
+ See the `Rust documentation for is_zero <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.is_zero>`__ for more information.
+
+
+ .. js:method:: multiply_pow10(power)
+
+ Multiply the :js:class:`ICU4XFixedDecimal` by a given power of ten.
+
+ See the `Rust documentation for multiply_pow10 <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.multiply_pow10>`__ for more information.
+
+
+ .. js:method:: sign()
+
+ See the `Rust documentation for sign <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.sign>`__ for more information.
+
+
+ .. js:method:: set_sign(sign)
+
+ Set the sign of the :js:class:`ICU4XFixedDecimal`.
+
+ See the `Rust documentation for set_sign <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.set_sign>`__ for more information.
+
+
+ .. js:method:: apply_sign_display(sign_display)
+
+ See the `Rust documentation for apply_sign_display <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.apply_sign_display>`__ for more information.
+
+
+ .. js:method:: trim_start()
+
+ See the `Rust documentation for trim_start <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trim_start>`__ for more information.
+
+
+ .. js:method:: trim_end()
+
+ See the `Rust documentation for trim_end <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trim_end>`__ for more information.
+
+
+ .. js:method:: pad_start(position)
+
+ Zero-pad the :js:class:`ICU4XFixedDecimal` on the left to a particular position
+
+ See the `Rust documentation for pad_start <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.pad_start>`__ for more information.
+
+
+ .. js:method:: pad_end(position)
+
+ Zero-pad the :js:class:`ICU4XFixedDecimal` on the right to a particular position
+
+ See the `Rust documentation for pad_end <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.pad_end>`__ for more information.
+
+
+ .. js:method:: set_max_position(position)
+
+ Truncate the :js:class:`ICU4XFixedDecimal` on the left to a particular position, deleting digits if necessary. This is useful for, e.g. abbreviating years ("2022" -> "22")
+
+ See the `Rust documentation for set_max_position <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.set_max_position>`__ for more information.
+
+
+ .. js:method:: trunc(position)
+
+ See the `Rust documentation for trunc <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trunc>`__ for more information.
+
+
+ .. js:method:: half_trunc(position)
+
+ See the `Rust documentation for half_trunc <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_trunc>`__ for more information.
+
+
+ .. js:method:: expand(position)
+
+ See the `Rust documentation for expand <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.expand>`__ for more information.
+
+
+ .. js:method:: half_expand(position)
+
+ See the `Rust documentation for half_expand <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_expand>`__ for more information.
+
+
+ .. js:method:: ceil(position)
+
+ See the `Rust documentation for ceil <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.ceil>`__ for more information.
+
+
+ .. js:method:: half_ceil(position)
+
+ See the `Rust documentation for half_ceil <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_ceil>`__ for more information.
+
+
+ .. js:method:: floor(position)
+
+ See the `Rust documentation for floor <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.floor>`__ for more information.
+
+
+ .. js:method:: half_floor(position)
+
+ See the `Rust documentation for half_floor <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_floor>`__ for more information.
+
+
+ .. js:method:: half_even(position)
+
+ See the `Rust documentation for half_even <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_even>`__ for more information.
+
+
+ .. js:method:: concatenate_end(other)
+
+ Concatenates ``other`` to the end of ``self``.
+
+ If successful, ``other`` will be set to 0 and a successful status is returned.
+
+ If not successful, ``other`` will be unchanged and an error is returned.
+
+ See the `Rust documentation for concatenate_end <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.concatenate_end>`__ for more information.
+
+
+ .. js:method:: to_string()
+
+ Format the :js:class:`ICU4XFixedDecimal` as a string.
+
+ See the `Rust documentation for write_to <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.write_to>`__ for more information.
+
+
+.. js:class:: ICU4XFixedDecimalSign
+
+ The sign of a FixedDecimal, as shown in formatting.
+
+ See the `Rust documentation for Sign <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.Sign.html>`__ for more information.
+
+
+.. js:class:: ICU4XFixedDecimalSignDisplay
+
+ ECMA-402 compatible sign display preference.
+
+ See the `Rust documentation for SignDisplay <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.SignDisplay.html>`__ for more information.
+
+
+.. js:class:: ICU4XRoundingIncrement
+
+ Increment used in a rounding operation.
+
+ See the `Rust documentation for RoundingIncrement <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.RoundingIncrement.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/iana_bcp47_mapper_ffi.rst b/intl/icu_capi/js/package/docs/source/iana_bcp47_mapper_ffi.rst
new file mode 100644
index 0000000000..e9151aa50a
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/iana_bcp47_mapper_ffi.rst
@@ -0,0 +1,35 @@
+``iana_bcp47_mapper::ffi``
+==========================
+
+.. js:class:: ICU4XBcp47ToIanaMapper
+
+ An object capable of mapping from a BCP-47 time zone ID to an IANA ID.
+
+ See the `Rust documentation for IanaBcp47RoundTripMapper <https://docs.rs/icu/latest/icu/timezone/struct.IanaBcp47RoundTripMapper.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/timezone/struct.IanaBcp47RoundTripMapper.html#method.new>`__ for more information.
+
+
+ .. js:method:: get(value)
+
+ Writes out the canonical IANA time zone ID corresponding to the given BCP-47 ID.
+
+ See the `Rust documentation for bcp47_to_iana <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.IanaBcp47RoundTripMapper.html#method.bcp47_to_iana>`__ for more information.
+
+
+.. js:class:: ICU4XIanaToBcp47Mapper
+
+ An object capable of mapping from an IANA time zone ID to a BCP-47 ID.
+
+ This can be used via ``try_set_iana_time_zone_id()`` on ```ICU4XCustomTimeZone`` <crate::timezone::ffi::ICU4XCustomTimeZone>`__.
+
+ See the `Rust documentation for IanaToBcp47Mapper <https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47Mapper.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47Mapper.html#method.new>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/index.rst b/intl/icu_capi/js/package/docs/source/index.rst
new file mode 100644
index 0000000000..57e246325f
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/index.rst
@@ -0,0 +1,54 @@
+Documentation
+=============
+
+.. toctree::
+ :maxdepth: 3
+ :caption: Modules:
+
+ bidi_ffi
+ calendar_ffi
+ casemap_ffi
+ collator_ffi
+ collections_sets_ffi
+ common_ffi
+ data_struct_ffi
+ date_ffi
+ datetime_ffi
+ datetime_formatter_ffi
+ decimal_ffi
+ displaynames_ffi
+ errors_ffi
+ fallbacker_ffi
+ fixed_decimal_ffi
+ iana_bcp47_mapper_ffi
+ list_ffi
+ locale_ffi
+ locale_directionality_ffi
+ locid_transform_ffi
+ logging_ffi
+ metazone_calculator_ffi
+ normalizer_ffi
+ normalizer_properties_ffi
+ pluralrules_ffi
+ properties_iter_ffi
+ properties_maps_ffi
+ properties_names_ffi
+ properties_sets_ffi
+ properties_unisets_ffi
+ provider_ffi
+ script_ffi
+ segmenter_grapheme_ffi
+ segmenter_line_ffi
+ segmenter_sentence_ffi
+ segmenter_word_ffi
+ time_ffi
+ timezone_ffi
+ timezone_formatter_ffi
+ week_ffi
+ zoned_formatter_ffi
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`search`
diff --git a/intl/icu_capi/js/package/docs/source/list_ffi.rst b/intl/icu_capi/js/package/docs/source/list_ffi.rst
new file mode 100644
index 0000000000..2d78d7ad52
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/list_ffi.rst
@@ -0,0 +1,65 @@
+``list::ffi``
+=============
+
+.. js:class:: ICU4XList
+
+ A list of strings
+
+
+ .. js:function:: create()
+
+ Create a new list of strings
+
+
+ .. js:function:: create_with_capacity(capacity)
+
+ Create a new list of strings with preallocated space to hold at least ``capacity`` elements
+
+
+ .. js:method:: push(val)
+
+ Push a string to the list
+
+ For C++ users, potentially invalid UTF8 will be handled via REPLACEMENT CHARACTERs
+
+
+ .. js:method:: len()
+
+ The number of elements in this list
+
+
+.. js:class:: ICU4XListFormatter
+
+ See the `Rust documentation for ListFormatter <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_and_with_length(provider, locale, length)
+
+ Construct a new ICU4XListFormatter instance for And patterns
+
+ See the `Rust documentation for try_new_and_with_length <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_and_with_length>`__ for more information.
+
+
+ .. js:function:: create_or_with_length(provider, locale, length)
+
+ Construct a new ICU4XListFormatter instance for And patterns
+
+ See the `Rust documentation for try_new_or_with_length <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_or_with_length>`__ for more information.
+
+
+ .. js:function:: create_unit_with_length(provider, locale, length)
+
+ Construct a new ICU4XListFormatter instance for And patterns
+
+ See the `Rust documentation for try_new_unit_with_length <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_unit_with_length>`__ for more information.
+
+
+ .. js:method:: format(list)
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XListLength
+
+ See the `Rust documentation for ListLength <https://docs.rs/icu/latest/icu/list/enum.ListLength.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/locale_directionality_ffi.rst b/intl/icu_capi/js/package/docs/source/locale_directionality_ffi.rst
new file mode 100644
index 0000000000..546a899102
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/locale_directionality_ffi.rst
@@ -0,0 +1,41 @@
+``locale_directionality::ffi``
+==============================
+
+.. js:class:: ICU4XLocaleDirection
+
+ See the `Rust documentation for Direction <https://docs.rs/icu/latest/icu/locid_transform/enum.Direction.html>`__ for more information.
+
+
+.. js:class:: ICU4XLocaleDirectionality
+
+ See the `Rust documentation for LocaleDirectionality <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct a new ICU4XLocaleDirectionality instance
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.new>`__ for more information.
+
+
+ .. js:function:: create_with_expander(provider, expander)
+
+ Construct a new ICU4XLocaleDirectionality instance with a custom expander
+
+ See the `Rust documentation for new_with_expander <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.new_with_expander>`__ for more information.
+
+
+ .. js:method:: get(locale)
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.get>`__ for more information.
+
+
+ .. js:method:: is_left_to_right(locale)
+
+ See the `Rust documentation for is_left_to_right <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.is_left_to_right>`__ for more information.
+
+
+ .. js:method:: is_right_to_left(locale)
+
+ See the `Rust documentation for is_right_to_left <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.is_right_to_left>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/locale_ffi.rst b/intl/icu_capi/js/package/docs/source/locale_ffi.rst
new file mode 100644
index 0000000000..8c78097946
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/locale_ffi.rst
@@ -0,0 +1,128 @@
+``locale::ffi``
+===============
+
+.. js:class:: ICU4XLocale
+
+ An ICU4X Locale, capable of representing strings like ``"en-US"``.
+
+ See the `Rust documentation for Locale <https://docs.rs/icu/latest/icu/locid/struct.Locale.html>`__ for more information.
+
+
+ .. js:function:: create_from_string(name)
+
+ Construct an :js:class:`ICU4XLocale` from an locale identifier.
+
+ This will run the complete locale parsing algorithm. If code size and performance are critical and the locale is of a known shape (such as ``aa-BB``) use ``create_und``, ``set_language``, ``set_script``, and ``set_region``.
+
+ See the `Rust documentation for try_from_bytes <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes>`__ for more information.
+
+
+ .. js:function:: create_und()
+
+ Construct a default undefined :js:class:`ICU4XLocale` "und".
+
+ See the `Rust documentation for UND <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#associatedconstant.UND>`__ for more information.
+
+
+ .. js:method:: clone()
+
+ Clones the :js:class:`ICU4XLocale`.
+
+ See the `Rust documentation for Locale <https://docs.rs/icu/latest/icu/locid/struct.Locale.html>`__ for more information.
+
+
+ .. js:method:: basename()
+
+ Write a string representation of the ``LanguageIdentifier`` part of :js:class:`ICU4XLocale` to ``write``.
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. js:method:: get_unicode_extension(bytes)
+
+ Write a string representation of the unicode extension to ``write``
+
+ See the `Rust documentation for extensions <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.extensions>`__ for more information.
+
+
+ .. js:method:: language()
+
+ Write a string representation of :js:class:`ICU4XLocale` language to ``write``
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. js:method:: set_language(bytes)
+
+ Set the language part of the :js:class:`ICU4XLocale`.
+
+ See the `Rust documentation for try_from_bytes <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes>`__ for more information.
+
+
+ .. js:method:: region()
+
+ Write a string representation of :js:class:`ICU4XLocale` region to ``write``
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. js:method:: set_region(bytes)
+
+ Set the region part of the :js:class:`ICU4XLocale`.
+
+ See the `Rust documentation for try_from_bytes <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes>`__ for more information.
+
+
+ .. js:method:: script()
+
+ Write a string representation of :js:class:`ICU4XLocale` script to ``write``
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. js:method:: set_script(bytes)
+
+ Set the script part of the :js:class:`ICU4XLocale`. Pass an empty string to remove the script.
+
+ See the `Rust documentation for try_from_bytes <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes>`__ for more information.
+
+
+ .. js:function:: canonicalize(bytes)
+
+ Best effort locale canonicalizer that doesn't need any data
+
+ Use ICU4XLocaleCanonicalizer for better control and functionality
+
+ See the `Rust documentation for canonicalize <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.canonicalize>`__ for more information.
+
+
+ .. js:method:: to_string()
+
+ Write a string representation of :js:class:`ICU4XLocale` to ``write``
+
+ See the `Rust documentation for write_to <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.write_to>`__ for more information.
+
+
+ .. js:method:: normalizing_eq(other)
+
+ See the `Rust documentation for normalizing_eq <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.normalizing_eq>`__ for more information.
+
+
+ .. js:method:: strict_cmp(other)
+
+ See the `Rust documentation for strict_cmp <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.strict_cmp>`__ for more information.
+
+
+ .. js:function:: create_en()
+
+ Deprecated
+
+ Use `create_from_string("en").
+
+
+ .. js:function:: create_bn()
+
+ Deprecated
+
+ Use `create_from_string("bn").
+
diff --git a/intl/icu_capi/js/package/docs/source/locid_transform_ffi.rst b/intl/icu_capi/js/package/docs/source/locid_transform_ffi.rst
new file mode 100644
index 0000000000..27e3fff083
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/locid_transform_ffi.rst
@@ -0,0 +1,72 @@
+``locid_transform::ffi``
+========================
+
+.. js:class:: ICU4XLocaleCanonicalizer
+
+ A locale canonicalizer.
+
+ See the `Rust documentation for LocaleCanonicalizer <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Create a new :js:class:`ICU4XLocaleCanonicalizer`.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.new>`__ for more information.
+
+
+ .. js:function:: create_extended(provider)
+
+ Create a new :js:class:`ICU4XLocaleCanonicalizer` with extended data.
+
+ See the `Rust documentation for new_with_expander <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.new_with_expander>`__ for more information.
+
+
+ .. js:method:: canonicalize(locale)
+
+ FFI version of ``LocaleCanonicalizer::canonicalize()``.
+
+ See the `Rust documentation for canonicalize <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.canonicalize>`__ for more information.
+
+
+.. js:class:: ICU4XLocaleExpander
+
+ A locale expander.
+
+ See the `Rust documentation for LocaleExpander <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Create a new :js:class:`ICU4XLocaleExpander`.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.new>`__ for more information.
+
+
+ .. js:function:: create_extended(provider)
+
+ Create a new :js:class:`ICU4XLocaleExpander` with extended data.
+
+ See the `Rust documentation for new_extended <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.new_extended>`__ for more information.
+
+
+ .. js:method:: maximize(locale)
+
+ FFI version of ``LocaleExpander::maximize()``.
+
+ See the `Rust documentation for maximize <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.maximize>`__ for more information.
+
+
+ .. js:method:: minimize(locale)
+
+ FFI version of ``LocaleExpander::minimize()``.
+
+ See the `Rust documentation for minimize <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.minimize>`__ for more information.
+
+
+.. js:class:: ICU4XTransformResult
+
+ FFI version of ``TransformResult``.
+
+ See the `Rust documentation for TransformResult <https://docs.rs/icu/latest/icu/locid_transform/enum.TransformResult.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/logging_ffi.rst b/intl/icu_capi/js/package/docs/source/logging_ffi.rst
new file mode 100644
index 0000000000..450acc128b
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/logging_ffi.rst
@@ -0,0 +1,21 @@
+``logging::ffi``
+================
+
+.. js:class:: ICU4XLogger
+
+ An object allowing control over the logging used
+
+
+ .. js:function:: init_simple_logger()
+
+ Initialize the logger using ``simple_logger``
+
+ Requires the ``simple_logger`` Cargo feature.
+
+ Returns ``false`` if there was already a logger set.
+
+
+ .. js:function:: init_console_logger()
+
+ Deprecated: since ICU4X 1.4, this now happens automatically if the ``log`` feature is enabled.
+
diff --git a/intl/icu_capi/js/package/docs/source/metazone_calculator_ffi.rst b/intl/icu_capi/js/package/docs/source/metazone_calculator_ffi.rst
new file mode 100644
index 0000000000..e7704b8a85
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/metazone_calculator_ffi.rst
@@ -0,0 +1,16 @@
+``metazone_calculator::ffi``
+============================
+
+.. js:class:: ICU4XMetazoneCalculator
+
+ An object capable of computing the metazone from a timezone.
+
+ This can be used via ``maybe_calculate_metazone()`` on ```ICU4XCustomTimeZone`` <crate::timezone::ffi::ICU4XCustomTimeZone>`__.
+
+ See the `Rust documentation for MetazoneCalculator <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html#method.new>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/normalizer_ffi.rst b/intl/icu_capi/js/package/docs/source/normalizer_ffi.rst
new file mode 100644
index 0000000000..08e0889a0b
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/normalizer_ffi.rst
@@ -0,0 +1,76 @@
+``normalizer::ffi``
+===================
+
+.. js:class:: ICU4XComposingNormalizer
+
+ See the `Rust documentation for ComposingNormalizer <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html>`__ for more information.
+
+
+ .. js:function:: create_nfc(provider)
+
+ Construct a new ICU4XComposingNormalizer instance for NFC
+
+ See the `Rust documentation for new_nfc <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfc>`__ for more information.
+
+
+ .. js:function:: create_nfkc(provider)
+
+ Construct a new ICU4XComposingNormalizer instance for NFKC
+
+ See the `Rust documentation for new_nfkc <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfkc>`__ for more information.
+
+
+ .. js:method:: normalize(s)
+
+ Normalize a (potentially ill-formed) UTF8 string
+
+ Errors are mapped to REPLACEMENT CHARACTER
+
+ See the `Rust documentation for normalize_utf8 <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.normalize_utf8>`__ for more information.
+
+
+ .. js:method:: is_normalized(s)
+
+ Check if a (potentially ill-formed) UTF8 string is normalized
+
+ Errors are mapped to REPLACEMENT CHARACTER
+
+ See the `Rust documentation for is_normalized_utf8 <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.is_normalized_utf8>`__ for more information.
+
+
+.. js:class:: ICU4XDecomposingNormalizer
+
+ See the `Rust documentation for DecomposingNormalizer <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html>`__ for more information.
+
+
+ .. js:function:: create_nfd(provider)
+
+ Construct a new ICU4XDecomposingNormalizer instance for NFC
+
+ See the `Rust documentation for new_nfd <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfd>`__ for more information.
+
+
+ .. js:function:: create_nfkd(provider)
+
+ Construct a new ICU4XDecomposingNormalizer instance for NFKC
+
+ See the `Rust documentation for new_nfkd <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfkd>`__ for more information.
+
+
+ .. js:method:: normalize(s)
+
+ Normalize a (potentially ill-formed) UTF8 string
+
+ Errors are mapped to REPLACEMENT CHARACTER
+
+ See the `Rust documentation for normalize_utf8 <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.normalize_utf8>`__ for more information.
+
+
+ .. js:method:: is_normalized(s)
+
+ Check if a (potentially ill-formed) UTF8 string is normalized
+
+ Errors are mapped to REPLACEMENT CHARACTER
+
+ See the `Rust documentation for is_normalized_utf8 <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.is_normalized_utf8>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/normalizer_properties_ffi.rst b/intl/icu_capi/js/package/docs/source/normalizer_properties_ffi.rst
new file mode 100644
index 0000000000..b8b0a0265f
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/normalizer_properties_ffi.rst
@@ -0,0 +1,87 @@
+``normalizer_properties::ffi``
+==============================
+
+.. js:class:: ICU4XCanonicalCombiningClassMap
+
+ Lookup of the Canonical_Combining_Class Unicode property
+
+ See the `Rust documentation for CanonicalCombiningClassMap <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct a new ICU4XCanonicalCombiningClassMap instance for NFC
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.new>`__ for more information.
+
+
+ .. js:method:: get(ch)
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.get>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/properties/properties/struct.CanonicalCombiningClass.html>`__
+
+
+ .. js:method:: get32(ch)
+
+ See the `Rust documentation for get32 <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.get32>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/properties/properties/struct.CanonicalCombiningClass.html>`__
+
+
+.. js:class:: ICU4XCanonicalComposition
+
+ The raw canonical composition operation.
+
+ Callers should generally use ICU4XComposingNormalizer unless they specifically need raw composition operations
+
+ See the `Rust documentation for CanonicalComposition <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct a new ICU4XCanonicalComposition instance for NFC
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html#method.new>`__ for more information.
+
+
+ .. js:method:: compose(starter, second)
+
+ Performs canonical composition (including Hangul) on a pair of characters or returns NUL if these characters don’t compose. Composition exclusions are taken into account.
+
+ See the `Rust documentation for compose <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html#method.compose>`__ for more information.
+
+
+.. js:class:: ICU4XCanonicalDecomposition
+
+ The raw (non-recursive) canonical decomposition operation.
+
+ Callers should generally use ICU4XDecomposingNormalizer unless they specifically need raw composition operations
+
+ See the `Rust documentation for CanonicalDecomposition <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct a new ICU4XCanonicalDecomposition instance for NFC
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html#method.new>`__ for more information.
+
+
+ .. js:method:: decompose(c)
+
+ Performs non-recursive canonical decomposition (including for Hangul).
+
+ See the `Rust documentation for decompose <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html#method.decompose>`__ for more information.
+
+
+.. js:class:: ICU4XDecomposed
+
+ The outcome of non-recursive canonical decomposition of a character. ``second`` will be NUL when the decomposition expands to a single character (which may or may not be the original one)
+
+ See the `Rust documentation for Decomposed <https://docs.rs/icu/latest/icu/normalizer/properties/enum.Decomposed.html>`__ for more information.
+
+
+ .. js:attribute:: first
+
+ .. js:attribute:: second
diff --git a/intl/icu_capi/js/package/docs/source/pluralrules_ffi.rst b/intl/icu_capi/js/package/docs/source/pluralrules_ffi.rst
new file mode 100644
index 0000000000..ca29ec47e0
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/pluralrules_ffi.rst
@@ -0,0 +1,84 @@
+``pluralrules::ffi``
+====================
+
+.. js:class:: ICU4XPluralCategories
+
+ FFI version of ``PluralRules::categories()`` data.
+
+
+ .. js:attribute:: zero
+
+ .. js:attribute:: one
+
+ .. js:attribute:: two
+
+ .. js:attribute:: few
+
+ .. js:attribute:: many
+
+ .. js:attribute:: other
+
+.. js:class:: ICU4XPluralCategory
+
+ FFI version of ``PluralCategory``.
+
+ See the `Rust documentation for PluralCategory <https://docs.rs/icu/latest/icu/plurals/enum.PluralCategory.html>`__ for more information.
+
+
+ .. js:function:: get_for_cldr_string(s)
+
+ Construct from a string in the format `specified in TR35 <https://unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules>`__
+
+ See the `Rust documentation for get_for_cldr_string <https://docs.rs/icu/latest/icu/plurals/enum.PluralCategory.html#method.get_for_cldr_string>`__ for more information.
+
+ See the `Rust documentation for get_for_cldr_bytes <https://docs.rs/icu/latest/icu/plurals/enum.PluralCategory.html#method.get_for_cldr_bytes>`__ for more information.
+
+
+.. js:class:: ICU4XPluralOperands
+
+ FFI version of ``PluralOperands``.
+
+ See the `Rust documentation for PluralOperands <https://docs.rs/icu/latest/icu/plurals/struct.PluralOperands.html>`__ for more information.
+
+
+ .. js:function:: create_from_string(s)
+
+ Construct for a given string representing a number
+
+ See the `Rust documentation for from_str <https://docs.rs/icu/latest/icu/plurals/struct.PluralOperands.html#method.from_str>`__ for more information.
+
+
+.. js:class:: ICU4XPluralRules
+
+ FFI version of ``PluralRules``.
+
+ See the `Rust documentation for PluralRules <https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html>`__ for more information.
+
+
+ .. js:function:: create_cardinal(provider, locale)
+
+ Construct an :js:class:`ICU4XPluralRules` for the given locale, for cardinal numbers
+
+ See the `Rust documentation for try_new_cardinal <https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_cardinal>`__ for more information.
+
+
+ .. js:function:: create_ordinal(provider, locale)
+
+ Construct an :js:class:`ICU4XPluralRules` for the given locale, for ordinal numbers
+
+ See the `Rust documentation for try_new_ordinal <https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_ordinal>`__ for more information.
+
+
+ .. js:method:: category_for(op)
+
+ Get the category for a given number represented as operands
+
+ See the `Rust documentation for category_for <https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.category_for>`__ for more information.
+
+
+ .. js:method:: categories()
+
+ Get all of the categories needed in the current locale
+
+ See the `Rust documentation for categories <https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.categories>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/properties_iter_ffi.rst b/intl/icu_capi/js/package/docs/source/properties_iter_ffi.rst
new file mode 100644
index 0000000000..ee195fdf47
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/properties_iter_ffi.rst
@@ -0,0 +1,27 @@
+``properties_iter::ffi``
+========================
+
+.. js:class:: CodePointRangeIterator
+
+ An iterator over code point ranges, produced by ``ICU4XCodePointSetData`` or one of the ``ICU4XCodePointMapData`` types
+
+
+ .. js:method:: next()
+
+ Advance the iterator by one and return the next range.
+
+ If the iterator is out of items, ``done`` will be true
+
+
+.. js:class:: CodePointRangeIteratorResult
+
+ Result of a single iteration of :js:class:`CodePointRangeIterator`. Logically can be considered to be an ``Option<RangeInclusive<u32>>``,
+
+ ``start`` and ``end`` represent an inclusive range of code points start, end, and ``done`` will be true if the iterator has already finished. The last contentful iteration will NOT produce a range done=true, in other words ``start`` and ``end`` are useful values if and only if ``done=false``.
+
+
+ .. js:attribute:: start
+
+ .. js:attribute:: end
+
+ .. js:attribute:: done
diff --git a/intl/icu_capi/js/package/docs/source/properties_maps_ffi.rst b/intl/icu_capi/js/package/docs/source/properties_maps_ffi.rst
new file mode 100644
index 0000000000..8fc7c1625b
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/properties_maps_ffi.rst
@@ -0,0 +1,159 @@
+``properties_maps::ffi``
+========================
+
+.. js:class:: ICU4XCodePointMapData16
+
+ An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property.
+
+ For properties whose values fit into 16 bits.
+
+ See the `Rust documentation for properties <https://docs.rs/icu/latest/icu/properties/index.html>`__ for more information.
+
+ See the `Rust documentation for CodePointMapData <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapData.html>`__ for more information.
+
+ See the `Rust documentation for CodePointMapDataBorrowed <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html>`__ for more information.
+
+
+ .. js:method:: get(cp)
+
+ Gets the value for a code point.
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get>`__ for more information.
+
+
+ .. js:method:: get32(cp)
+
+ Gets the value for a code point (specified as a 32 bit integer, in UTF-32)
+
+
+ .. js:method:: iter_ranges_for_value(value)
+
+ Produces an iterator over ranges of code points that map to ``value``
+
+ See the `Rust documentation for iter_ranges_for_value <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value>`__ for more information.
+
+
+ .. js:method:: iter_ranges_for_value_complemented(value)
+
+ Produces an iterator over ranges of code points that do not map to ``value``
+
+ See the `Rust documentation for iter_ranges_for_value_complemented <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value_complemented>`__ for more information.
+
+
+ .. js:method:: get_set_for_value(value)
+
+ Gets a :js:class:`ICU4XCodePointSetData` representing all entries in this map that map to the given value
+
+ See the `Rust documentation for get_set_for_value <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get_set_for_value>`__ for more information.
+
+
+ .. js:function:: load_script(provider)
+
+ See the `Rust documentation for script <https://docs.rs/icu/latest/icu/properties/maps/fn.script.html>`__ for more information.
+
+
+.. js:class:: ICU4XCodePointMapData8
+
+ An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property.
+
+ For properties whose values fit into 8 bits.
+
+ See the `Rust documentation for properties <https://docs.rs/icu/latest/icu/properties/index.html>`__ for more information.
+
+ See the `Rust documentation for CodePointMapData <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapData.html>`__ for more information.
+
+ See the `Rust documentation for CodePointMapDataBorrowed <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html>`__ for more information.
+
+
+ .. js:method:: get(cp)
+
+ Gets the value for a code point.
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get>`__ for more information.
+
+
+ .. js:method:: get32(cp)
+
+ Gets the value for a code point (specified as a 32 bit integer, in UTF-32)
+
+
+ .. js:function:: general_category_to_mask(gc)
+
+ Converts a general category to its corresponding mask value
+
+ Nonexistant general categories will map to the empty mask
+
+ See the `Rust documentation for GeneralCategoryGroup <https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html>`__ for more information.
+
+
+ .. js:method:: iter_ranges_for_value(value)
+
+ Produces an iterator over ranges of code points that map to ``value``
+
+ See the `Rust documentation for iter_ranges_for_value <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value>`__ for more information.
+
+
+ .. js:method:: iter_ranges_for_value_complemented(value)
+
+ Produces an iterator over ranges of code points that do not map to ``value``
+
+ See the `Rust documentation for iter_ranges_for_value_complemented <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value_complemented>`__ for more information.
+
+
+ .. js:method:: iter_ranges_for_mask(mask)
+
+ Given a mask value (the nth bit marks property value = n), produce an iterator over ranges of code points whose property values are contained in the mask.
+
+ The main mask property supported is that for General_Category, which can be obtained via ``general_category_to_mask()`` or by using ``ICU4XGeneralCategoryNameToMaskMapper``
+
+ Should only be used on maps for properties with values less than 32 (like Generak_Category), other maps will have unpredictable results
+
+ See the `Rust documentation for iter_ranges_for_group <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_group>`__ for more information.
+
+
+ .. js:method:: get_set_for_value(value)
+
+ Gets a :js:class:`ICU4XCodePointSetData` representing all entries in this map that map to the given value
+
+ See the `Rust documentation for get_set_for_value <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get_set_for_value>`__ for more information.
+
+
+ .. js:function:: load_general_category(provider)
+
+ See the `Rust documentation for general_category <https://docs.rs/icu/latest/icu/properties/maps/fn.general_category.html>`__ for more information.
+
+
+ .. js:function:: load_bidi_class(provider)
+
+ See the `Rust documentation for bidi_class <https://docs.rs/icu/latest/icu/properties/maps/fn.bidi_class.html>`__ for more information.
+
+
+ .. js:function:: load_east_asian_width(provider)
+
+ See the `Rust documentation for east_asian_width <https://docs.rs/icu/latest/icu/properties/maps/fn.east_asian_width.html>`__ for more information.
+
+
+ .. js:function:: load_indic_syllabic_category(provider)
+
+ See the `Rust documentation for indic_syllabic_category <https://docs.rs/icu/latest/icu/properties/maps/fn.indic_syllabic_category.html>`__ for more information.
+
+
+ .. js:function:: load_line_break(provider)
+
+ See the `Rust documentation for line_break <https://docs.rs/icu/latest/icu/properties/maps/fn.line_break.html>`__ for more information.
+
+
+ .. js:function:: try_grapheme_cluster_break(provider)
+
+ See the `Rust documentation for grapheme_cluster_break <https://docs.rs/icu/latest/icu/properties/maps/fn.grapheme_cluster_break.html>`__ for more information.
+
+
+ .. js:function:: load_word_break(provider)
+
+ See the `Rust documentation for word_break <https://docs.rs/icu/latest/icu/properties/maps/fn.word_break.html>`__ for more information.
+
+
+ .. js:function:: load_sentence_break(provider)
+
+ See the `Rust documentation for sentence_break <https://docs.rs/icu/latest/icu/properties/maps/fn.sentence_break.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/properties_names_ffi.rst b/intl/icu_capi/js/package/docs/source/properties_names_ffi.rst
new file mode 100644
index 0000000000..b500224c46
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/properties_names_ffi.rst
@@ -0,0 +1,102 @@
+``properties_names::ffi``
+=========================
+
+.. js:class:: ICU4XGeneralCategoryNameToMaskMapper
+
+ A type capable of looking up General Category mask values from a string name.
+
+ See the `Rust documentation for get_name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html#method.get_name_to_enum_mapper>`__ for more information.
+
+ See the `Rust documentation for PropertyValueNameToEnumMapper <https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapper.html>`__ for more information.
+
+
+ .. js:method:: get_strict(name)
+
+ Get the mask value matching the given name, using strict matching
+
+ Returns 0 if the name is unknown for this property
+
+
+ .. js:method:: get_loose(name)
+
+ Get the mask value matching the given name, using loose matching
+
+ Returns 0 if the name is unknown for this property
+
+
+ .. js:function:: load(provider)
+
+ See the `Rust documentation for get_name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html#method.get_name_to_enum_mapper>`__ for more information.
+
+
+.. js:class:: ICU4XPropertyValueNameToEnumMapper
+
+ A type capable of looking up a property value from a string name.
+
+ See the `Rust documentation for PropertyValueNameToEnumMapper <https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapper.html>`__ for more information.
+
+ See the `Rust documentation for PropertyValueNameToEnumMapperBorrowed <https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html>`__ for more information.
+
+
+ .. js:method:: get_strict(name)
+
+ Get the property value matching the given name, using strict matching
+
+ Returns -1 if the name is unknown for this property
+
+ See the `Rust documentation for get_strict <https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html#method.get_strict>`__ for more information.
+
+
+ .. js:method:: get_loose(name)
+
+ Get the property value matching the given name, using loose matching
+
+ Returns -1 if the name is unknown for this property
+
+ See the `Rust documentation for get_loose <https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html#method.get_loose>`__ for more information.
+
+
+ .. js:function:: load_general_category(provider)
+
+ See the `Rust documentation for get_name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.GeneralCategory.html#method.get_name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_bidi_class(provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.BidiClass.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_east_asian_width(provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.EastAsianWidth.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_indic_syllabic_category(provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.IndicSyllabicCategory.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_line_break(provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.LineBreak.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_grapheme_cluster_break(provider)
+
+ See the `Rust documentation for get_name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.GraphemeClusterBreak.html#method.get_name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_word_break(provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.WordBreak.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_sentence_break(provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.SentenceBreak.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_script(provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.Script.html#method.name_to_enum_mapper>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/properties_sets_ffi.rst b/intl/icu_capi/js/package/docs/source/properties_sets_ffi.rst
new file mode 100644
index 0000000000..5238ce0b41
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/properties_sets_ffi.rst
@@ -0,0 +1,380 @@
+``properties_sets::ffi``
+========================
+
+.. js:class:: ICU4XCodePointSetData
+
+ An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property.
+
+ See the `Rust documentation for properties <https://docs.rs/icu/latest/icu/properties/index.html>`__ for more information.
+
+ See the `Rust documentation for CodePointSetData <https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetData.html>`__ for more information.
+
+ See the `Rust documentation for CodePointSetDataBorrowed <https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html>`__ for more information.
+
+
+ .. js:method:: contains(cp)
+
+ Checks whether the code point is in the set.
+
+ See the `Rust documentation for contains <https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.contains>`__ for more information.
+
+
+ .. js:method:: contains32(cp)
+
+ Checks whether the code point (specified as a 32 bit integer, in UTF-32) is in the set.
+
+
+ .. js:method:: iter_ranges()
+
+ Produces an iterator over ranges of code points contained in this set
+
+ See the `Rust documentation for iter_ranges <https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.iter_ranges>`__ for more information.
+
+
+ .. js:method:: iter_ranges_complemented()
+
+ Produces an iterator over ranges of code points not contained in this set
+
+ See the `Rust documentation for iter_ranges_complemented <https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.iter_ranges_complemented>`__ for more information.
+
+
+ .. js:function:: load_for_general_category_group(provider, group)
+
+ which is a mask with the same format as the ``U_GC_XX_MASK`` mask in ICU4C
+
+ See the `Rust documentation for for_general_category_group <https://docs.rs/icu/latest/icu/properties/sets/fn.for_general_category_group.html>`__ for more information.
+
+
+ .. js:function:: load_ascii_hex_digit(provider)
+
+ See the `Rust documentation for ascii_hex_digit <https://docs.rs/icu/latest/icu/properties/sets/fn.ascii_hex_digit.html>`__ for more information.
+
+
+ .. js:function:: load_alnum(provider)
+
+ See the `Rust documentation for alnum <https://docs.rs/icu/latest/icu/properties/sets/fn.alnum.html>`__ for more information.
+
+
+ .. js:function:: load_alphabetic(provider)
+
+ See the `Rust documentation for alphabetic <https://docs.rs/icu/latest/icu/properties/sets/fn.alphabetic.html>`__ for more information.
+
+
+ .. js:function:: load_bidi_control(provider)
+
+ See the `Rust documentation for bidi_control <https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_control.html>`__ for more information.
+
+
+ .. js:function:: load_bidi_mirrored(provider)
+
+ See the `Rust documentation for bidi_mirrored <https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_mirrored.html>`__ for more information.
+
+
+ .. js:function:: load_blank(provider)
+
+ See the `Rust documentation for blank <https://docs.rs/icu/latest/icu/properties/sets/fn.blank.html>`__ for more information.
+
+
+ .. js:function:: load_cased(provider)
+
+ See the `Rust documentation for cased <https://docs.rs/icu/latest/icu/properties/sets/fn.cased.html>`__ for more information.
+
+
+ .. js:function:: load_case_ignorable(provider)
+
+ See the `Rust documentation for case_ignorable <https://docs.rs/icu/latest/icu/properties/sets/fn.case_ignorable.html>`__ for more information.
+
+
+ .. js:function:: load_full_composition_exclusion(provider)
+
+ See the `Rust documentation for full_composition_exclusion <https://docs.rs/icu/latest/icu/properties/sets/fn.full_composition_exclusion.html>`__ for more information.
+
+
+ .. js:function:: load_changes_when_casefolded(provider)
+
+ See the `Rust documentation for changes_when_casefolded <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casefolded.html>`__ for more information.
+
+
+ .. js:function:: load_changes_when_casemapped(provider)
+
+ See the `Rust documentation for changes_when_casemapped <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casemapped.html>`__ for more information.
+
+
+ .. js:function:: load_changes_when_nfkc_casefolded(provider)
+
+ See the `Rust documentation for changes_when_nfkc_casefolded <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_nfkc_casefolded.html>`__ for more information.
+
+
+ .. js:function:: load_changes_when_lowercased(provider)
+
+ See the `Rust documentation for changes_when_lowercased <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_lowercased.html>`__ for more information.
+
+
+ .. js:function:: load_changes_when_titlecased(provider)
+
+ See the `Rust documentation for changes_when_titlecased <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_titlecased.html>`__ for more information.
+
+
+ .. js:function:: load_changes_when_uppercased(provider)
+
+ See the `Rust documentation for changes_when_uppercased <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_uppercased.html>`__ for more information.
+
+
+ .. js:function:: load_dash(provider)
+
+ See the `Rust documentation for dash <https://docs.rs/icu/latest/icu/properties/sets/fn.dash.html>`__ for more information.
+
+
+ .. js:function:: load_deprecated(provider)
+
+ See the `Rust documentation for deprecated <https://docs.rs/icu/latest/icu/properties/sets/fn.deprecated.html>`__ for more information.
+
+
+ .. js:function:: load_default_ignorable_code_point(provider)
+
+ See the `Rust documentation for default_ignorable_code_point <https://docs.rs/icu/latest/icu/properties/sets/fn.default_ignorable_code_point.html>`__ for more information.
+
+
+ .. js:function:: load_diacritic(provider)
+
+ See the `Rust documentation for diacritic <https://docs.rs/icu/latest/icu/properties/sets/fn.diacritic.html>`__ for more information.
+
+
+ .. js:function:: load_emoji_modifier_base(provider)
+
+ See the `Rust documentation for emoji_modifier_base <https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier_base.html>`__ for more information.
+
+
+ .. js:function:: load_emoji_component(provider)
+
+ See the `Rust documentation for emoji_component <https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_component.html>`__ for more information.
+
+
+ .. js:function:: load_emoji_modifier(provider)
+
+ See the `Rust documentation for emoji_modifier <https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier.html>`__ for more information.
+
+
+ .. js:function:: load_emoji(provider)
+
+ See the `Rust documentation for emoji <https://docs.rs/icu/latest/icu/properties/sets/fn.emoji.html>`__ for more information.
+
+
+ .. js:function:: load_emoji_presentation(provider)
+
+ See the `Rust documentation for emoji_presentation <https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_presentation.html>`__ for more information.
+
+
+ .. js:function:: load_extender(provider)
+
+ See the `Rust documentation for extender <https://docs.rs/icu/latest/icu/properties/sets/fn.extender.html>`__ for more information.
+
+
+ .. js:function:: load_extended_pictographic(provider)
+
+ See the `Rust documentation for extended_pictographic <https://docs.rs/icu/latest/icu/properties/sets/fn.extended_pictographic.html>`__ for more information.
+
+
+ .. js:function:: load_graph(provider)
+
+ See the `Rust documentation for graph <https://docs.rs/icu/latest/icu/properties/sets/fn.graph.html>`__ for more information.
+
+
+ .. js:function:: load_grapheme_base(provider)
+
+ See the `Rust documentation for grapheme_base <https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_base.html>`__ for more information.
+
+
+ .. js:function:: load_grapheme_extend(provider)
+
+ See the `Rust documentation for grapheme_extend <https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_extend.html>`__ for more information.
+
+
+ .. js:function:: load_grapheme_link(provider)
+
+ See the `Rust documentation for grapheme_link <https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_link.html>`__ for more information.
+
+
+ .. js:function:: load_hex_digit(provider)
+
+ See the `Rust documentation for hex_digit <https://docs.rs/icu/latest/icu/properties/sets/fn.hex_digit.html>`__ for more information.
+
+
+ .. js:function:: load_hyphen(provider)
+
+ See the `Rust documentation for hyphen <https://docs.rs/icu/latest/icu/properties/sets/fn.hyphen.html>`__ for more information.
+
+
+ .. js:function:: load_id_continue(provider)
+
+ See the `Rust documentation for id_continue <https://docs.rs/icu/latest/icu/properties/sets/fn.id_continue.html>`__ for more information.
+
+
+ .. js:function:: load_ideographic(provider)
+
+ See the `Rust documentation for ideographic <https://docs.rs/icu/latest/icu/properties/sets/fn.ideographic.html>`__ for more information.
+
+
+ .. js:function:: load_id_start(provider)
+
+ See the `Rust documentation for id_start <https://docs.rs/icu/latest/icu/properties/sets/fn.id_start.html>`__ for more information.
+
+
+ .. js:function:: load_ids_binary_operator(provider)
+
+ See the `Rust documentation for ids_binary_operator <https://docs.rs/icu/latest/icu/properties/sets/fn.ids_binary_operator.html>`__ for more information.
+
+
+ .. js:function:: load_ids_trinary_operator(provider)
+
+ See the `Rust documentation for ids_trinary_operator <https://docs.rs/icu/latest/icu/properties/sets/fn.ids_trinary_operator.html>`__ for more information.
+
+
+ .. js:function:: load_join_control(provider)
+
+ See the `Rust documentation for join_control <https://docs.rs/icu/latest/icu/properties/sets/fn.join_control.html>`__ for more information.
+
+
+ .. js:function:: load_logical_order_exception(provider)
+
+ See the `Rust documentation for logical_order_exception <https://docs.rs/icu/latest/icu/properties/sets/fn.logical_order_exception.html>`__ for more information.
+
+
+ .. js:function:: load_lowercase(provider)
+
+ See the `Rust documentation for lowercase <https://docs.rs/icu/latest/icu/properties/sets/fn.lowercase.html>`__ for more information.
+
+
+ .. js:function:: load_math(provider)
+
+ See the `Rust documentation for math <https://docs.rs/icu/latest/icu/properties/sets/fn.math.html>`__ for more information.
+
+
+ .. js:function:: load_noncharacter_code_point(provider)
+
+ See the `Rust documentation for noncharacter_code_point <https://docs.rs/icu/latest/icu/properties/sets/fn.noncharacter_code_point.html>`__ for more information.
+
+
+ .. js:function:: load_nfc_inert(provider)
+
+ See the `Rust documentation for nfc_inert <https://docs.rs/icu/latest/icu/properties/sets/fn.nfc_inert.html>`__ for more information.
+
+
+ .. js:function:: load_nfd_inert(provider)
+
+ See the `Rust documentation for nfd_inert <https://docs.rs/icu/latest/icu/properties/sets/fn.nfd_inert.html>`__ for more information.
+
+
+ .. js:function:: load_nfkc_inert(provider)
+
+ See the `Rust documentation for nfkc_inert <https://docs.rs/icu/latest/icu/properties/sets/fn.nfkc_inert.html>`__ for more information.
+
+
+ .. js:function:: load_nfkd_inert(provider)
+
+ See the `Rust documentation for nfkd_inert <https://docs.rs/icu/latest/icu/properties/sets/fn.nfkd_inert.html>`__ for more information.
+
+
+ .. js:function:: load_pattern_syntax(provider)
+
+ See the `Rust documentation for pattern_syntax <https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_syntax.html>`__ for more information.
+
+
+ .. js:function:: load_pattern_white_space(provider)
+
+ See the `Rust documentation for pattern_white_space <https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_white_space.html>`__ for more information.
+
+
+ .. js:function:: load_prepended_concatenation_mark(provider)
+
+ See the `Rust documentation for prepended_concatenation_mark <https://docs.rs/icu/latest/icu/properties/sets/fn.prepended_concatenation_mark.html>`__ for more information.
+
+
+ .. js:function:: load_print(provider)
+
+ See the `Rust documentation for print <https://docs.rs/icu/latest/icu/properties/sets/fn.print.html>`__ for more information.
+
+
+ .. js:function:: load_quotation_mark(provider)
+
+ See the `Rust documentation for quotation_mark <https://docs.rs/icu/latest/icu/properties/sets/fn.quotation_mark.html>`__ for more information.
+
+
+ .. js:function:: load_radical(provider)
+
+ See the `Rust documentation for radical <https://docs.rs/icu/latest/icu/properties/sets/fn.radical.html>`__ for more information.
+
+
+ .. js:function:: load_regional_indicator(provider)
+
+ See the `Rust documentation for regional_indicator <https://docs.rs/icu/latest/icu/properties/sets/fn.regional_indicator.html>`__ for more information.
+
+
+ .. js:function:: load_soft_dotted(provider)
+
+ See the `Rust documentation for soft_dotted <https://docs.rs/icu/latest/icu/properties/sets/fn.soft_dotted.html>`__ for more information.
+
+
+ .. js:function:: load_segment_starter(provider)
+
+ See the `Rust documentation for segment_starter <https://docs.rs/icu/latest/icu/properties/sets/fn.segment_starter.html>`__ for more information.
+
+
+ .. js:function:: load_case_sensitive(provider)
+
+ See the `Rust documentation for case_sensitive <https://docs.rs/icu/latest/icu/properties/sets/fn.case_sensitive.html>`__ for more information.
+
+
+ .. js:function:: load_sentence_terminal(provider)
+
+ See the `Rust documentation for sentence_terminal <https://docs.rs/icu/latest/icu/properties/sets/fn.sentence_terminal.html>`__ for more information.
+
+
+ .. js:function:: load_terminal_punctuation(provider)
+
+ See the `Rust documentation for terminal_punctuation <https://docs.rs/icu/latest/icu/properties/sets/fn.terminal_punctuation.html>`__ for more information.
+
+
+ .. js:function:: load_unified_ideograph(provider)
+
+ See the `Rust documentation for unified_ideograph <https://docs.rs/icu/latest/icu/properties/sets/fn.unified_ideograph.html>`__ for more information.
+
+
+ .. js:function:: load_uppercase(provider)
+
+ See the `Rust documentation for uppercase <https://docs.rs/icu/latest/icu/properties/sets/fn.uppercase.html>`__ for more information.
+
+
+ .. js:function:: load_variation_selector(provider)
+
+ See the `Rust documentation for variation_selector <https://docs.rs/icu/latest/icu/properties/sets/fn.variation_selector.html>`__ for more information.
+
+
+ .. js:function:: load_white_space(provider)
+
+ See the `Rust documentation for white_space <https://docs.rs/icu/latest/icu/properties/sets/fn.white_space.html>`__ for more information.
+
+
+ .. js:function:: load_xdigit(provider)
+
+ See the `Rust documentation for xdigit <https://docs.rs/icu/latest/icu/properties/sets/fn.xdigit.html>`__ for more information.
+
+
+ .. js:function:: load_xid_continue(provider)
+
+ See the `Rust documentation for xid_continue <https://docs.rs/icu/latest/icu/properties/sets/fn.xid_continue.html>`__ for more information.
+
+
+ .. js:function:: load_xid_start(provider)
+
+ See the `Rust documentation for xid_start <https://docs.rs/icu/latest/icu/properties/sets/fn.xid_start.html>`__ for more information.
+
+
+ .. js:function:: load_for_ecma262(provider, property_name)
+
+ Loads data for a property specified as a string as long as it is one of the `ECMA-262 binary properties <https://tc39.es/ecma262/#table-binary-unicode-properties>`__ (not including Any, ASCII, and Assigned pseudoproperties).
+
+ Returns ``ICU4XError::PropertyUnexpectedPropertyNameError`` in case the string does not match any property in the list
+
+ See the `Rust documentation for for_ecma262 <https://docs.rs/icu/latest/icu/properties/sets/fn.for_ecma262.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/properties_unisets_ffi.rst b/intl/icu_capi/js/package/docs/source/properties_unisets_ffi.rst
new file mode 100644
index 0000000000..235ef21756
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/properties_unisets_ffi.rst
@@ -0,0 +1,62 @@
+``properties_unisets::ffi``
+===========================
+
+.. js:class:: ICU4XUnicodeSetData
+
+ An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property.
+
+ See the `Rust documentation for properties <https://docs.rs/icu/latest/icu/properties/index.html>`__ for more information.
+
+ See the `Rust documentation for UnicodeSetData <https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetData.html>`__ for more information.
+
+ See the `Rust documentation for UnicodeSetDataBorrowed <https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html>`__ for more information.
+
+
+ .. js:method:: contains(s)
+
+ Checks whether the string is in the set.
+
+ See the `Rust documentation for contains <https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html#method.contains>`__ for more information.
+
+
+ .. js:method:: contains_char(cp)
+
+ Checks whether the code point is in the set.
+
+ See the `Rust documentation for contains_char <https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html#method.contains_char>`__ for more information.
+
+
+ .. js:method:: contains32(cp)
+
+ Checks whether the code point (specified as a 32 bit integer, in UTF-32) is in the set.
+
+
+ .. js:function:: load_basic_emoji(provider)
+
+ See the `Rust documentation for basic_emoji <https://docs.rs/icu/latest/icu/properties/sets/fn.basic_emoji.html>`__ for more information.
+
+
+ .. js:function:: load_exemplars_main(provider, locale)
+
+ See the `Rust documentation for exemplars_main <https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_main.html>`__ for more information.
+
+
+ .. js:function:: load_exemplars_auxiliary(provider, locale)
+
+ See the `Rust documentation for exemplars_auxiliary <https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_auxiliary.html>`__ for more information.
+
+
+ .. js:function:: load_exemplars_punctuation(provider, locale)
+
+ See the `Rust documentation for exemplars_punctuation <https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_punctuation.html>`__ for more information.
+
+
+ .. js:function:: load_exemplars_numbers(provider, locale)
+
+ See the `Rust documentation for exemplars_numbers <https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_numbers.html>`__ for more information.
+
+
+ .. js:function:: load_exemplars_index(provider, locale)
+
+ See the `Rust documentation for exemplars_index <https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_index.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/provider_ffi.rst b/intl/icu_capi/js/package/docs/source/provider_ffi.rst
new file mode 100644
index 0000000000..50c7d5e717
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/provider_ffi.rst
@@ -0,0 +1,86 @@
+``provider::ffi``
+=================
+
+.. js:class:: ICU4XDataProvider
+
+ An ICU4X data provider, capable of loading ICU4X data keys from some source.
+
+ See the `Rust documentation for icu_provider <https://docs.rs/icu_provider/latest/icu_provider/index.html>`__ for more information.
+
+
+ .. js:function:: create_compiled()
+
+ Constructs an :js:class:`ICU4XDataProvider` that uses compiled data.
+
+ Requires the ``compiled_data`` feature.
+
+ This provider cannot be modified or combined with other providers, so ``enable_fallback``, ``enabled_fallback_with``, ``fork_by_locale``, and ``fork_by_key`` will return ``Err``s.
+
+
+ .. js:function:: create_fs(path)
+
+ Constructs an ``FsDataProvider`` and returns it as an :js:class:`ICU4XDataProvider`. Requires the ``provider_fs`` Cargo feature. Not supported in WASM.
+
+ See the `Rust documentation for FsDataProvider <https://docs.rs/icu_provider_fs/latest/icu_provider_fs/struct.FsDataProvider.html>`__ for more information.
+
+
+ .. js:function:: create_test()
+
+ Deprecated
+
+ Use ``create_compiled()``.
+
+
+ .. js:function:: create_from_byte_slice(blob)
+
+ Constructs a ``BlobDataProvider`` and returns it as an :js:class:`ICU4XDataProvider`.
+
+ See the `Rust documentation for BlobDataProvider <https://docs.rs/icu_provider_blob/latest/icu_provider_blob/struct.BlobDataProvider.html>`__ for more information.
+
+ - Note: ``blob`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+ - Warning: This method leaks memory. The parameter `blob` will not be freed as it is required to live for the duration of the program.
+
+
+ .. js:function:: create_empty()
+
+ Constructs an empty :js:class:`ICU4XDataProvider`.
+
+ See the `Rust documentation for EmptyDataProvider <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/empty/struct.EmptyDataProvider.html>`__ for more information.
+
+
+ .. js:method:: fork_by_key(other)
+
+ Creates a provider that tries the current provider and then, if the current provider doesn't support the data key, another provider ``other``.
+
+ This takes ownership of the ``other`` provider, leaving an empty provider in its place.
+
+ The providers must be the same type (Any or Buffer). This condition is satisfied if both providers originate from the same constructor, such as ``create_from_byte_slice`` or ``create_fs``. If the condition is not upheld, a runtime error occurs.
+
+ See the `Rust documentation for ForkByKeyProvider <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/type.ForkByKeyProvider.html>`__ for more information.
+
+
+ .. js:method:: fork_by_locale(other)
+
+ Same as ``fork_by_key`` but forks by locale instead of key.
+
+ See the `Rust documentation for MissingLocalePredicate <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/predicates/struct.MissingLocalePredicate.html>`__ for more information.
+
+
+ .. js:method:: enable_locale_fallback()
+
+ Enables locale fallbacking for data requests made to this provider.
+
+ Note that the test provider (from ``create_test``) already has fallbacking enabled.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.try_new>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html>`__
+
+
+ .. js:method:: enable_locale_fallback_with(fallbacker)
+
+ See the `Rust documentation for new_with_fallbacker <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.new_with_fallbacker>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html>`__
+
diff --git a/intl/icu_capi/js/package/docs/source/script_ffi.rst b/intl/icu_capi/js/package/docs/source/script_ffi.rst
new file mode 100644
index 0000000000..23a94bdb19
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/script_ffi.rst
@@ -0,0 +1,105 @@
+``script::ffi``
+===============
+
+.. js:class:: ICU4XScriptExtensionsSet
+
+ An object that represents the Script_Extensions property for a single character
+
+ See the `Rust documentation for ScriptExtensionsSet <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html>`__ for more information.
+
+
+ .. js:method:: contains(script)
+
+ Check if the Script_Extensions property of the given code point covers the given script
+
+ See the `Rust documentation for contains <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.contains>`__ for more information.
+
+
+ .. js:method:: count()
+
+ Get the number of scripts contained in here
+
+ See the `Rust documentation for iter <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.iter>`__ for more information.
+
+
+ .. js:method:: script_at(index)
+
+ Get script at index, returning an error if out of bounds
+
+ See the `Rust documentation for iter <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.iter>`__ for more information.
+
+
+.. js:class:: ICU4XScriptWithExtensions
+
+ An ICU4X ScriptWithExtensions map object, capable of holding a map of codepoints to scriptextensions values
+
+ See the `Rust documentation for ScriptWithExtensions <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ See the `Rust documentation for script_with_extensions <https://docs.rs/icu/latest/icu/properties/script/fn.script_with_extensions.html>`__ for more information.
+
+
+ .. js:method:: get_script_val(code_point)
+
+ Get the Script property value for a code point
+
+ See the `Rust documentation for get_script_val <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_val>`__ for more information.
+
+
+ .. js:method:: has_script(code_point, script)
+
+ Check if the Script_Extensions property of the given code point covers the given script
+
+ See the `Rust documentation for has_script <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.has_script>`__ for more information.
+
+
+ .. js:method:: as_borrowed()
+
+ Borrow this object for a slightly faster variant with more operations
+
+ See the `Rust documentation for as_borrowed <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html#method.as_borrowed>`__ for more information.
+
+
+ .. js:method:: iter_ranges_for_script(script)
+
+ Get a list of ranges of code points that contain this script in their Script_Extensions values
+
+ See the `Rust documentation for get_script_extensions_ranges <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_ranges>`__ for more information.
+
+
+.. js:class:: ICU4XScriptWithExtensionsBorrowed
+
+ A slightly faster ICU4XScriptWithExtensions object
+
+ See the `Rust documentation for ScriptWithExtensionsBorrowed <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html>`__ for more information.
+
+
+ .. js:method:: get_script_val(code_point)
+
+ Get the Script property value for a code point
+
+ See the `Rust documentation for get_script_val <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_val>`__ for more information.
+
+
+ .. js:method:: get_script_extensions_val(code_point)
+
+ Get the Script property value for a code point
+
+ See the `Rust documentation for get_script_extensions_val <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_val>`__ for more information.
+
+
+ .. js:method:: has_script(code_point, script)
+
+ Check if the Script_Extensions property of the given code point covers the given script
+
+ See the `Rust documentation for has_script <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.has_script>`__ for more information.
+
+
+ .. js:method:: get_script_extensions_set(script)
+
+ Build the CodePointSetData corresponding to a codepoints matching a particular script in their Script_Extensions
+
+ See the `Rust documentation for get_script_extensions_set <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_set>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/segmenter_grapheme_ffi.rst b/intl/icu_capi/js/package/docs/source/segmenter_grapheme_ffi.rst
new file mode 100644
index 0000000000..be0fd9192e
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/segmenter_grapheme_ffi.rst
@@ -0,0 +1,77 @@
+``segmenter_grapheme::ffi``
+===========================
+
+.. js:class:: ICU4XGraphemeClusterBreakIteratorLatin1
+
+ See the `Rust documentation for GraphemeClusterBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XGraphemeClusterBreakIteratorUtf16
+
+ See the `Rust documentation for GraphemeClusterBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XGraphemeClusterBreakIteratorUtf8
+
+ See the `Rust documentation for GraphemeClusterBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XGraphemeClusterSegmenter
+
+ An ICU4X grapheme-cluster-break segmenter, capable of finding grapheme cluster breakpoints in strings.
+
+ See the `Rust documentation for GraphemeClusterSegmenter <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct an :js:class:`ICU4XGraphemeClusterSegmenter`.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.new>`__ for more information.
+
+
+ .. js:method:: segment_utf8(input)
+
+ Segments a (potentially ill-formed) UTF-8 string.
+
+ See the `Rust documentation for segment_utf8 <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_utf8>`__ for more information.
+
+
+ .. js:method:: segment_utf16(input)
+
+ Segments a UTF-16 string.
+
+ See the `Rust documentation for segment_utf16 <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_utf16>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+
+ .. js:method:: segment_latin1(input)
+
+ Segments a Latin-1 string.
+
+ See the `Rust documentation for segment_latin1 <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_latin1>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
diff --git a/intl/icu_capi/js/package/docs/source/segmenter_line_ffi.rst b/intl/icu_capi/js/package/docs/source/segmenter_line_ffi.rst
new file mode 100644
index 0000000000..9a991deb83
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/segmenter_line_ffi.rst
@@ -0,0 +1,139 @@
+``segmenter_line::ffi``
+=======================
+
+.. js:class:: ICU4XLineBreakIteratorLatin1
+
+ See the `Rust documentation for LineBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorLatin1.html>`__
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XLineBreakIteratorUtf16
+
+ See the `Rust documentation for LineBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorUtf16.html>`__
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XLineBreakIteratorUtf8
+
+ See the `Rust documentation for LineBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorPotentiallyIllFormedUtf8.html>`__
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XLineBreakOptionsV1
+
+ See the `Rust documentation for LineBreakOptions <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakOptions.html>`__ for more information.
+
+
+ .. js:attribute:: strictness
+
+ .. js:attribute:: word_option
+
+ .. js:attribute:: ja_zh
+
+.. js:class:: ICU4XLineBreakStrictness
+
+ See the `Rust documentation for LineBreakStrictness <https://docs.rs/icu/latest/icu/segmenter/enum.LineBreakStrictness.html>`__ for more information.
+
+
+.. js:class:: ICU4XLineBreakWordOption
+
+ See the `Rust documentation for LineBreakWordOption <https://docs.rs/icu/latest/icu/segmenter/enum.LineBreakWordOption.html>`__ for more information.
+
+
+.. js:class:: ICU4XLineSegmenter
+
+ An ICU4X line-break segmenter, capable of finding breakpoints in strings.
+
+ See the `Rust documentation for LineSegmenter <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html>`__ for more information.
+
+
+ .. js:function:: create_auto(provider)
+
+ Construct a :js:class:`ICU4XLineSegmenter` with default options. It automatically loads the best available payload data for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_auto <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto>`__ for more information.
+
+
+ .. js:function:: create_lstm(provider)
+
+ Construct a :js:class:`ICU4XLineSegmenter` with default options and LSTM payload data for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_lstm <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm>`__ for more information.
+
+
+ .. js:function:: create_dictionary(provider)
+
+ Construct a :js:class:`ICU4XLineSegmenter` with default options and dictionary payload data for Burmese, Khmer, Lao, and Thai..
+
+ See the `Rust documentation for new_dictionary <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary>`__ for more information.
+
+
+ .. js:function:: create_auto_with_options_v1(provider, options)
+
+ Construct a :js:class:`ICU4XLineSegmenter` with custom options. It automatically loads the best available payload data for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_auto_with_options <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto_with_options>`__ for more information.
+
+
+ .. js:function:: create_lstm_with_options_v1(provider, options)
+
+ Construct a :js:class:`ICU4XLineSegmenter` with custom options and LSTM payload data for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_lstm_with_options <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm_with_options>`__ for more information.
+
+
+ .. js:function:: create_dictionary_with_options_v1(provider, options)
+
+ Construct a :js:class:`ICU4XLineSegmenter` with custom options and dictionary payload data for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_dictionary_with_options <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary_with_options>`__ for more information.
+
+
+ .. js:method:: segment_utf8(input)
+
+ Segments a (potentially ill-formed) UTF-8 string.
+
+ See the `Rust documentation for segment_utf8 <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_utf8>`__ for more information.
+
+
+ .. js:method:: segment_utf16(input)
+
+ Segments a UTF-16 string.
+
+ See the `Rust documentation for segment_utf16 <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_utf16>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+
+ .. js:method:: segment_latin1(input)
+
+ Segments a Latin-1 string.
+
+ See the `Rust documentation for segment_latin1 <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_latin1>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
diff --git a/intl/icu_capi/js/package/docs/source/segmenter_sentence_ffi.rst b/intl/icu_capi/js/package/docs/source/segmenter_sentence_ffi.rst
new file mode 100644
index 0000000000..b1f15a2868
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/segmenter_sentence_ffi.rst
@@ -0,0 +1,77 @@
+``segmenter_sentence::ffi``
+===========================
+
+.. js:class:: ICU4XSentenceBreakIteratorLatin1
+
+ See the `Rust documentation for SentenceBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XSentenceBreakIteratorUtf16
+
+ See the `Rust documentation for SentenceBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XSentenceBreakIteratorUtf8
+
+ See the `Rust documentation for SentenceBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XSentenceSegmenter
+
+ An ICU4X sentence-break segmenter, capable of finding sentence breakpoints in strings.
+
+ See the `Rust documentation for SentenceSegmenter <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct an :js:class:`ICU4XSentenceSegmenter`.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.new>`__ for more information.
+
+
+ .. js:method:: segment_utf8(input)
+
+ Segments a (potentially ill-formed) UTF-8 string.
+
+ See the `Rust documentation for segment_utf8 <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_utf8>`__ for more information.
+
+
+ .. js:method:: segment_utf16(input)
+
+ Segments a UTF-16 string.
+
+ See the `Rust documentation for segment_utf16 <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_utf16>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+
+ .. js:method:: segment_latin1(input)
+
+ Segments a Latin-1 string.
+
+ See the `Rust documentation for segment_latin1 <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_latin1>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
diff --git a/intl/icu_capi/js/package/docs/source/segmenter_word_ffi.rst b/intl/icu_capi/js/package/docs/source/segmenter_word_ffi.rst
new file mode 100644
index 0000000000..913ef3479e
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/segmenter_word_ffi.rst
@@ -0,0 +1,142 @@
+``segmenter_word::ffi``
+=======================
+
+.. js:class:: ICU4XSegmenterWordType
+
+ See the `Rust documentation for WordType <https://docs.rs/icu/latest/icu/segmenter/enum.WordType.html>`__ for more information.
+
+
+.. js:class:: ICU4XWordBreakIteratorLatin1
+
+ See the `Rust documentation for WordBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next>`__ for more information.
+
+
+ .. js:method:: word_type()
+
+ Return the status value of break boundary.
+
+ See the `Rust documentation for word_type <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type>`__ for more information.
+
+
+ .. js:method:: is_word_like()
+
+ Return true when break boundary is word-like such as letter/number/CJK
+
+ See the `Rust documentation for is_word_like <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like>`__ for more information.
+
+
+.. js:class:: ICU4XWordBreakIteratorUtf16
+
+ See the `Rust documentation for WordBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next>`__ for more information.
+
+
+ .. js:method:: word_type()
+
+ Return the status value of break boundary.
+
+ See the `Rust documentation for word_type <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type>`__ for more information.
+
+
+ .. js:method:: is_word_like()
+
+ Return true when break boundary is word-like such as letter/number/CJK
+
+ See the `Rust documentation for is_word_like <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like>`__ for more information.
+
+
+.. js:class:: ICU4XWordBreakIteratorUtf8
+
+ See the `Rust documentation for WordBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next>`__ for more information.
+
+
+ .. js:method:: word_type()
+
+ Return the status value of break boundary.
+
+ See the `Rust documentation for word_type <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type>`__ for more information.
+
+
+ .. js:method:: is_word_like()
+
+ Return true when break boundary is word-like such as letter/number/CJK
+
+ See the `Rust documentation for is_word_like <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like>`__ for more information.
+
+
+.. js:class:: ICU4XWordSegmenter
+
+ An ICU4X word-break segmenter, capable of finding word breakpoints in strings.
+
+ See the `Rust documentation for WordSegmenter <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html>`__ for more information.
+
+
+ .. js:function:: create_auto(provider)
+
+ Construct an :js:class:`ICU4XWordSegmenter` with automatically selecting the best available LSTM or dictionary payload data.
+
+ Note: currently, it uses dictionary for Chinese and Japanese, and LSTM for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_auto <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_auto>`__ for more information.
+
+
+ .. js:function:: create_lstm(provider)
+
+ Construct an :js:class:`ICU4XWordSegmenter` with LSTM payload data for Burmese, Khmer, Lao, and Thai.
+
+ Warning: :js:class:`ICU4XWordSegmenter` created by this function doesn't handle Chinese or Japanese.
+
+ See the `Rust documentation for new_lstm <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_lstm>`__ for more information.
+
+
+ .. js:function:: create_dictionary(provider)
+
+ Construct an :js:class:`ICU4XWordSegmenter` with dictionary payload data for Chinese, Japanese, Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_dictionary <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_dictionary>`__ for more information.
+
+
+ .. js:method:: segment_utf8(input)
+
+ Segments a (potentially ill-formed) UTF-8 string.
+
+ See the `Rust documentation for segment_utf8 <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_utf8>`__ for more information.
+
+
+ .. js:method:: segment_utf16(input)
+
+ Segments a UTF-16 string.
+
+ See the `Rust documentation for segment_utf16 <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_utf16>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+
+ .. js:method:: segment_latin1(input)
+
+ Segments a Latin-1 string.
+
+ See the `Rust documentation for segment_latin1 <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_latin1>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
diff --git a/intl/icu_capi/js/package/docs/source/time_ffi.rst b/intl/icu_capi/js/package/docs/source/time_ffi.rst
new file mode 100644
index 0000000000..dff1373031
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/time_ffi.rst
@@ -0,0 +1,51 @@
+``time::ffi``
+=============
+
+.. js:class:: ICU4XTime
+
+ An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond
+
+ See the `Rust documentation for Time <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html>`__ for more information.
+
+
+ .. js:function:: create(hour, minute, second, nanosecond)
+
+ Creates a new :js:class:`ICU4XTime` given field values
+
+ See the `Rust documentation for Time <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html>`__ for more information.
+
+
+ .. js:function:: create_midnight()
+
+ Creates a new :js:class:`ICU4XTime` representing midnight (00:00.000).
+
+ See the `Rust documentation for Time <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html>`__ for more information.
+
+
+ .. js:method:: hour()
+
+ Returns the hour in this time
+
+ See the `Rust documentation for hour <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour>`__ for more information.
+
+
+ .. js:method:: minute()
+
+ Returns the minute in this time
+
+ See the `Rust documentation for minute <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute>`__ for more information.
+
+
+ .. js:method:: second()
+
+ Returns the second in this time
+
+ See the `Rust documentation for second <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second>`__ for more information.
+
+
+ .. js:method:: nanosecond()
+
+ Returns the nanosecond in this time
+
+ See the `Rust documentation for nanosecond <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/timezone_ffi.rst b/intl/icu_capi/js/package/docs/source/timezone_ffi.rst
new file mode 100644
index 0000000000..aaad8de786
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/timezone_ffi.rst
@@ -0,0 +1,246 @@
+``timezone::ffi``
+=================
+
+.. js:class:: ICU4XCustomTimeZone
+
+ See the `Rust documentation for CustomTimeZone <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html>`__ for more information.
+
+
+ .. js:function:: create_from_string(s)
+
+ Creates a time zone from an offset string.
+
+ See the `Rust documentation for from_str <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.from_str>`__ for more information.
+
+
+ .. js:function:: create_empty()
+
+ Creates a time zone with no information.
+
+ See the `Rust documentation for new_empty <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.new_empty>`__ for more information.
+
+
+ .. js:function:: create_utc()
+
+ Creates a time zone for UTC.
+
+ See the `Rust documentation for utc <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.utc>`__ for more information.
+
+
+ .. js:method:: try_set_gmt_offset_seconds(offset_seconds)
+
+ Sets the ``gmt_offset`` field from offset seconds.
+
+ Errors if the offset seconds are out of range.
+
+ See the `Rust documentation for try_from_offset_seconds <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.try_from_offset_seconds>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html>`__
+
+
+ .. js:method:: clear_gmt_offset()
+
+ Clears the ``gmt_offset`` field.
+
+ See the `Rust documentation for offset_seconds <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.offset_seconds>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html>`__
+
+
+ .. js:method:: gmt_offset_seconds()
+
+ Returns the value of the ``gmt_offset`` field as offset seconds.
+
+ Errors if the ``gmt_offset`` field is empty.
+
+ See the `Rust documentation for offset_seconds <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.offset_seconds>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html>`__
+
+
+ .. js:method:: is_gmt_offset_positive()
+
+ Returns whether the ``gmt_offset`` field is positive.
+
+ Errors if the ``gmt_offset`` field is empty.
+
+ See the `Rust documentation for is_positive <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.is_positive>`__ for more information.
+
+
+ .. js:method:: is_gmt_offset_zero()
+
+ Returns whether the ``gmt_offset`` field is zero.
+
+ Errors if the ``gmt_offset`` field is empty (which is not the same as zero).
+
+ See the `Rust documentation for is_zero <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.is_zero>`__ for more information.
+
+
+ .. js:method:: gmt_offset_has_minutes()
+
+ Returns whether the ``gmt_offset`` field has nonzero minutes.
+
+ Errors if the ``gmt_offset`` field is empty.
+
+ See the `Rust documentation for has_minutes <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.has_minutes>`__ for more information.
+
+
+ .. js:method:: gmt_offset_has_seconds()
+
+ Returns whether the ``gmt_offset`` field has nonzero seconds.
+
+ Errors if the ``gmt_offset`` field is empty.
+
+ See the `Rust documentation for has_seconds <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.has_seconds>`__ for more information.
+
+
+ .. js:method:: try_set_time_zone_id(id)
+
+ Sets the ``time_zone_id`` field from a BCP-47 string.
+
+ Errors if the string is not a valid BCP-47 time zone ID.
+
+ See the `Rust documentation for time_zone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html>`__
+
+
+ .. js:method:: try_set_iana_time_zone_id(mapper, id)
+
+ Sets the ``time_zone_id`` field from an IANA string by looking up the corresponding BCP-47 string.
+
+ Errors if the string is not a valid BCP-47 time zone ID.
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47MapperBorrowed.html#method.get>`__ for more information.
+
+
+ .. js:method:: clear_time_zone_id()
+
+ Clears the ``time_zone_id`` field.
+
+ See the `Rust documentation for time_zone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html>`__
+
+
+ .. js:method:: time_zone_id()
+
+ Writes the value of the ``time_zone_id`` field as a string.
+
+ Errors if the ``time_zone_id`` field is empty.
+
+ See the `Rust documentation for time_zone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html>`__
+
+
+ .. js:method:: try_set_metazone_id(id)
+
+ Sets the ``metazone_id`` field from a string.
+
+ Errors if the string is not a valid BCP-47 metazone ID.
+
+ See the `Rust documentation for metazone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html>`__
+
+
+ .. js:method:: clear_metazone_id()
+
+ Clears the ``metazone_id`` field.
+
+ See the `Rust documentation for metazone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html>`__
+
+
+ .. js:method:: metazone_id()
+
+ Writes the value of the ``metazone_id`` field as a string.
+
+ Errors if the ``metazone_id`` field is empty.
+
+ See the `Rust documentation for metazone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html>`__
+
+
+ .. js:method:: try_set_zone_variant(id)
+
+ Sets the ``zone_variant`` field from a string.
+
+ Errors if the string is not a valid zone variant.
+
+ See the `Rust documentation for zone_variant <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html>`__
+
+
+ .. js:method:: clear_zone_variant()
+
+ Clears the ``zone_variant`` field.
+
+ See the `Rust documentation for zone_variant <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html>`__
+
+
+ .. js:method:: zone_variant()
+
+ Writes the value of the ``zone_variant`` field as a string.
+
+ Errors if the ``zone_variant`` field is empty.
+
+ See the `Rust documentation for zone_variant <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html>`__
+
+
+ .. js:method:: set_standard_time()
+
+ Sets the ``zone_variant`` field to standard time.
+
+ See the `Rust documentation for standard <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.standard>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__
+
+
+ .. js:method:: set_daylight_time()
+
+ Sets the ``zone_variant`` field to daylight time.
+
+ See the `Rust documentation for daylight <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.daylight>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__
+
+
+ .. js:method:: is_standard_time()
+
+ Returns whether the ``zone_variant`` field is standard time.
+
+ Errors if the ``zone_variant`` field is empty.
+
+ See the `Rust documentation for standard <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.standard>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__
+
+
+ .. js:method:: is_daylight_time()
+
+ Returns whether the ``zone_variant`` field is daylight time.
+
+ Errors if the ``zone_variant`` field is empty.
+
+ See the `Rust documentation for daylight <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.daylight>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__
+
+
+ .. js:method:: maybe_calculate_metazone(metazone_calculator, local_datetime)
+
+ Sets the metazone based on the time zone and the local timestamp.
+
+ See the `Rust documentation for maybe_calculate_metazone <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.maybe_calculate_metazone>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html#method.compute_metazone_from_time_zone>`__
+
diff --git a/intl/icu_capi/js/package/docs/source/timezone_formatter_ffi.rst b/intl/icu_capi/js/package/docs/source/timezone_formatter_ffi.rst
new file mode 100644
index 0000000000..434cf7c162
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/timezone_formatter_ffi.rst
@@ -0,0 +1,112 @@
+``timezone_formatter::ffi``
+===========================
+
+.. js:class:: ICU4XIsoTimeZoneFormat
+
+ See the `Rust documentation for IsoFormat <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoFormat.html>`__ for more information.
+
+
+.. js:class:: ICU4XIsoTimeZoneMinuteDisplay
+
+ See the `Rust documentation for IsoMinutes <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoMinutes.html>`__ for more information.
+
+
+.. js:class:: ICU4XIsoTimeZoneOptions
+
+ .. js:attribute:: format
+
+ .. js:attribute:: minutes
+
+ .. js:attribute:: seconds
+
+.. js:class:: ICU4XIsoTimeZoneSecondDisplay
+
+ See the `Rust documentation for IsoSeconds <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoSeconds.html>`__ for more information.
+
+
+.. js:class:: ICU4XTimeZoneFormatter
+
+ An ICU4X TimeZoneFormatter object capable of formatting an :js:class:`ICU4XCustomTimeZone` type (and others) as a string
+
+ See the `Rust documentation for TimeZoneFormatter <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_localized_gmt_fallback(provider, locale)
+
+ Creates a new :js:class:`ICU4XTimeZoneFormatter` from locale data.
+
+ Uses localized GMT as the fallback format.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.try_new>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.FallbackFormat.html>`__
+
+
+ .. js:function:: create_with_iso_8601_fallback(provider, locale, options)
+
+ Creates a new :js:class:`ICU4XTimeZoneFormatter` from locale data.
+
+ Uses ISO-8601 as the fallback format.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.try_new>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.FallbackFormat.html>`__
+
+
+ .. js:method:: load_generic_non_location_long(provider)
+
+ Loads generic non-location long format. Example: "Pacific Time"
+
+ See the `Rust documentation for include_generic_non_location_long <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_non_location_long>`__ for more information.
+
+
+ .. js:method:: load_generic_non_location_short(provider)
+
+ Loads generic non-location short format. Example: "PT"
+
+ See the `Rust documentation for include_generic_non_location_short <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_non_location_short>`__ for more information.
+
+
+ .. js:method:: load_specific_non_location_long(provider)
+
+ Loads specific non-location long format. Example: "Pacific Standard Time"
+
+ See the `Rust documentation for include_specific_non_location_long <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_specific_non_location_long>`__ for more information.
+
+
+ .. js:method:: load_specific_non_location_short(provider)
+
+ Loads specific non-location short format. Example: "PST"
+
+ See the `Rust documentation for include_specific_non_location_short <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_specific_non_location_short>`__ for more information.
+
+
+ .. js:method:: load_generic_location_format(provider)
+
+ Loads generic location format. Example: "Los Angeles Time"
+
+ See the `Rust documentation for include_generic_location_format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_location_format>`__ for more information.
+
+
+ .. js:method:: include_localized_gmt_format()
+
+ Loads localized GMT format. Example: "GMT-07:00"
+
+ See the `Rust documentation for include_localized_gmt_format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_localized_gmt_format>`__ for more information.
+
+
+ .. js:method:: load_iso_8601_format(options)
+
+ Loads ISO-8601 format. Example: "-07:00"
+
+ See the `Rust documentation for include_iso_8601_format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_iso_8601_format>`__ for more information.
+
+
+ .. js:method:: format_custom_time_zone(value)
+
+ Formats a :js:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format>`__ for more information.
+
+ See the `Rust documentation for format_to_string <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format_to_string>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/week_ffi.rst b/intl/icu_capi/js/package/docs/source/week_ffi.rst
new file mode 100644
index 0000000000..3bb2f146e8
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/week_ffi.rst
@@ -0,0 +1,49 @@
+``week::ffi``
+=============
+
+.. js:class:: ICU4XWeekCalculator
+
+ A Week calculator, useful to be passed in to ``week_of_year()`` on Date and DateTime types
+
+ See the `Rust documentation for WeekCalculator <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html>`__ for more information.
+
+
+ .. js:function:: create(provider, locale)
+
+ Creates a new :js:class:`ICU4XWeekCalculator` from locale data.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#method.try_new>`__ for more information.
+
+
+ .. js:function:: create_from_first_day_of_week_and_min_week_days(first_weekday, min_week_days)
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.first_weekday>`__, `2 <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.min_week_days>`__
+
+
+ .. js:method:: first_weekday()
+
+ Returns the weekday that starts the week for this object's locale
+
+ See the `Rust documentation for first_weekday <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.first_weekday>`__ for more information.
+
+
+ .. js:method:: min_week_days()
+
+ The minimum number of days overlapping a year required for a week to be considered part of that year
+
+ See the `Rust documentation for min_week_days <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.min_week_days>`__ for more information.
+
+
+.. js:class:: ICU4XWeekOf
+
+ See the `Rust documentation for WeekOf <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekOf.html>`__ for more information.
+
+
+ .. js:attribute:: week
+
+ .. js:attribute:: unit
+
+.. js:class:: ICU4XWeekRelativeUnit
+
+ See the `Rust documentation for RelativeUnit <https://docs.rs/icu/latest/icu/calendar/week/enum.RelativeUnit.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/zoned_formatter_ffi.rst b/intl/icu_capi/js/package/docs/source/zoned_formatter_ffi.rst
new file mode 100644
index 0000000000..ad0790047a
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/zoned_formatter_ffi.rst
@@ -0,0 +1,73 @@
+``zoned_formatter::ffi``
+========================
+
+.. js:class:: ICU4XGregorianZonedDateTimeFormatter
+
+ An object capable of formatting a date time with time zone to a string.
+
+ See the `Rust documentation for TypedZonedDateTimeFormatter <https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_lengths(provider, locale, date_length, time_length)
+
+ Creates a new :js:class:`ICU4XGregorianZonedDateTimeFormatter` from locale data.
+
+ This function has ``date_length`` and ``time_length`` arguments and uses default options for the time zone.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:function:: create_with_lengths_and_iso_8601_time_zone_fallback(provider, locale, date_length, time_length, zone_options)
+
+ Creates a new :js:class:`ICU4XGregorianZonedDateTimeFormatter` from locale data.
+
+ This function has ``date_length`` and ``time_length`` arguments and uses an ISO-8601 style fallback for the time zone with the given configurations.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:method:: format_iso_datetime_with_custom_time_zone(datetime, time_zone)
+
+ Formats a :js:class:`ICU4XIsoDateTime` and :js:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XZonedDateTimeFormatter
+
+ An object capable of formatting a date time with time zone to a string.
+
+ See the `Rust documentation for ZonedDateTimeFormatter <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_lengths(provider, locale, date_length, time_length)
+
+ Creates a new :js:class:`ICU4XZonedDateTimeFormatter` from locale data.
+
+ This function has ``date_length`` and ``time_length`` arguments and uses default options for the time zone.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:function:: create_with_lengths_and_iso_8601_time_zone_fallback(provider, locale, date_length, time_length, zone_options)
+
+ Creates a new :js:class:`ICU4XZonedDateTimeFormatter` from locale data.
+
+ This function has ``date_length`` and ``time_length`` arguments and uses an ISO-8601 style fallback for the time zone with the given configurations.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:method:: format_datetime_with_custom_time_zone(datetime, time_zone)
+
+ Formats a :js:class:`ICU4XDateTime` and :js:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_iso_datetime_with_custom_time_zone(datetime, time_zone)
+
+ Formats a :js:class:`ICU4XIsoDateTime` and :js:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/index.js b/intl/icu_capi/js/package/index.js
new file mode 100644
index 0000000000..4eb60931a4
--- /dev/null
+++ b/intl/icu_capi/js/package/index.js
@@ -0,0 +1 @@
+export * from './lib/index.js'
diff --git a/intl/icu_capi/js/package/lib/CodePointRangeIterator.d.ts b/intl/icu_capi/js/package/lib/CodePointRangeIterator.d.ts
new file mode 100644
index 0000000000..25d3076bc8
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/CodePointRangeIterator.d.ts
@@ -0,0 +1,16 @@
+import { CodePointRangeIteratorResult } from "./CodePointRangeIteratorResult";
+
+/**
+
+ * An iterator over code point ranges, produced by `ICU4XCodePointSetData` or one of the `ICU4XCodePointMapData` types
+ */
+export class CodePointRangeIterator {
+
+ /**
+
+ * Advance the iterator by one and return the next range.
+
+ * If the iterator is out of items, `done` will be true
+ */
+ next(): CodePointRangeIteratorResult;
+}
diff --git a/intl/icu_capi/js/package/lib/CodePointRangeIterator.js b/intl/icu_capi/js/package/lib/CodePointRangeIterator.js
new file mode 100644
index 0000000000..7fe654a93d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/CodePointRangeIterator.js
@@ -0,0 +1,28 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { CodePointRangeIteratorResult } from "./CodePointRangeIteratorResult.js"
+
+const CodePointRangeIterator_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.CodePointRangeIterator_destroy(underlying);
+});
+
+export class CodePointRangeIterator {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ CodePointRangeIterator_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(9, 4);
+ wasm.CodePointRangeIterator_next(diplomat_receive_buffer, this.underlying);
+ const out = new CodePointRangeIteratorResult(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ return out;
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.d.ts b/intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.d.ts
new file mode 100644
index 0000000000..bcc72a65a6
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.d.ts
@@ -0,0 +1,13 @@
+import { u32 } from "./diplomat-runtime"
+
+/**
+
+ * Result of a single iteration of {@link CodePointRangeIterator `CodePointRangeIterator`}. Logically can be considered to be an `Option<RangeInclusive<u32>>`,
+
+ * `start` and `end` represent an inclusive range of code points start, end, and `done` will be true if the iterator has already finished. The last contentful iteration will NOT produce a range done=true, in other words `start` and `end` are useful values if and only if `done=false`.
+ */
+export class CodePointRangeIteratorResult {
+ start: u32;
+ end: u32;
+ done: boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.js b/intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.js
new file mode 100644
index 0000000000..f544e085fa
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.js
@@ -0,0 +1,10 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export class CodePointRangeIteratorResult {
+ constructor(underlying) {
+ this.start = (new Uint32Array(wasm.memory.buffer, underlying, 1))[0];
+ this.end = (new Uint32Array(wasm.memory.buffer, underlying + 4, 1))[0];
+ this.done = (new Uint8Array(wasm.memory.buffer, underlying + 8, 1))[0] == 1;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.d.ts b/intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.d.ts
new file mode 100644
index 0000000000..dad3e5fc59
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.d.ts
@@ -0,0 +1,102 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * The various calendar types currently supported by {@link ICU4XCalendar `ICU4XCalendar`}
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html Rust documentation for `AnyCalendarKind`} for more information.
+ */
+export enum ICU4XAnyCalendarKind {
+ /**
+
+ * The kind of an Iso calendar
+ */
+ Iso = 'Iso',
+ /**
+
+ * The kind of a Gregorian calendar
+ */
+ Gregorian = 'Gregorian',
+ /**
+
+ * The kind of a Buddhist calendar
+ */
+ Buddhist = 'Buddhist',
+ /**
+
+ * The kind of a Japanese calendar with modern eras
+ */
+ Japanese = 'Japanese',
+ /**
+
+ * The kind of a Japanese calendar with modern and historic eras
+ */
+ JapaneseExtended = 'JapaneseExtended',
+ /**
+
+ * The kind of an Ethiopian calendar, with Amete Mihret era
+ */
+ Ethiopian = 'Ethiopian',
+ /**
+
+ * The kind of an Ethiopian calendar, with Amete Alem era
+ */
+ EthiopianAmeteAlem = 'EthiopianAmeteAlem',
+ /**
+
+ * The kind of a Indian calendar
+ */
+ Indian = 'Indian',
+ /**
+
+ * The kind of a Coptic calendar
+ */
+ Coptic = 'Coptic',
+ /**
+
+ * The kind of a Dangi calendar
+ */
+ Dangi = 'Dangi',
+ /**
+
+ * The kind of a Chinese calendar
+ */
+ Chinese = 'Chinese',
+ /**
+
+ * The kind of a Hebrew calendar
+ */
+ Hebrew = 'Hebrew',
+ /**
+
+ * The kind of a Islamic civil calendar
+ */
+ IslamicCivil = 'IslamicCivil',
+ /**
+
+ * The kind of a Islamic observational calendar
+ */
+ IslamicObservational = 'IslamicObservational',
+ /**
+
+ * The kind of a Islamic tabular calendar
+ */
+ IslamicTabular = 'IslamicTabular',
+ /**
+
+ * The kind of a Islamic Umm al-Qura calendar
+ */
+ IslamicUmmAlQura = 'IslamicUmmAlQura',
+ /**
+
+ * The kind of a Persian calendar
+ */
+ Persian = 'Persian',
+ /**
+
+ * The kind of a Roc calendar
+ */
+ Roc = 'Roc',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.js b/intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.js
new file mode 100644
index 0000000000..64cd2d608b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.js
@@ -0,0 +1,66 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+export const ICU4XAnyCalendarKind_js_to_rust = {
+ "Iso": 0,
+ "Gregorian": 1,
+ "Buddhist": 2,
+ "Japanese": 3,
+ "JapaneseExtended": 4,
+ "Ethiopian": 5,
+ "EthiopianAmeteAlem": 6,
+ "Indian": 7,
+ "Coptic": 8,
+ "Dangi": 9,
+ "Chinese": 10,
+ "Hebrew": 11,
+ "IslamicCivil": 12,
+ "IslamicObservational": 13,
+ "IslamicTabular": 14,
+ "IslamicUmmAlQura": 15,
+ "Persian": 16,
+ "Roc": 17,
+};
+
+export const ICU4XAnyCalendarKind_rust_to_js = {
+ [0]: "Iso",
+ [1]: "Gregorian",
+ [2]: "Buddhist",
+ [3]: "Japanese",
+ [4]: "JapaneseExtended",
+ [5]: "Ethiopian",
+ [6]: "EthiopianAmeteAlem",
+ [7]: "Indian",
+ [8]: "Coptic",
+ [9]: "Dangi",
+ [10]: "Chinese",
+ [11]: "Hebrew",
+ [12]: "IslamicCivil",
+ [13]: "IslamicObservational",
+ [14]: "IslamicTabular",
+ [15]: "IslamicUmmAlQura",
+ [16]: "Persian",
+ [17]: "Roc",
+};
+
+export const ICU4XAnyCalendarKind = {
+ "Iso": "Iso",
+ "Gregorian": "Gregorian",
+ "Buddhist": "Buddhist",
+ "Japanese": "Japanese",
+ "JapaneseExtended": "JapaneseExtended",
+ "Ethiopian": "Ethiopian",
+ "EthiopianAmeteAlem": "EthiopianAmeteAlem",
+ "Indian": "Indian",
+ "Coptic": "Coptic",
+ "Dangi": "Dangi",
+ "Chinese": "Chinese",
+ "Hebrew": "Hebrew",
+ "IslamicCivil": "IslamicCivil",
+ "IslamicObservational": "IslamicObservational",
+ "IslamicTabular": "IslamicTabular",
+ "IslamicUmmAlQura": "IslamicUmmAlQura",
+ "Persian": "Persian",
+ "Roc": "Roc",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.d.ts b/intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.d.ts
new file mode 100644
index 0000000000..17eb632b74
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.d.ts
@@ -0,0 +1,28 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * An object capable of mapping from a BCP-47 time zone ID to an IANA ID.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.IanaBcp47RoundTripMapper.html Rust documentation for `IanaBcp47RoundTripMapper`} for more information.
+ */
+export class ICU4XBcp47ToIanaMapper {
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.IanaBcp47RoundTripMapper.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XBcp47ToIanaMapper | never;
+
+ /**
+
+ * Writes out the canonical IANA time zone ID corresponding to the given BCP-47 ID.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.IanaBcp47RoundTripMapper.html#method.bcp47_to_iana Rust documentation for `bcp47_to_iana`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ get(value: string): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.js b/intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.js
new file mode 100644
index 0000000000..bca64227b9
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.js
@@ -0,0 +1,57 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XBcp47ToIanaMapper_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XBcp47ToIanaMapper_destroy(underlying);
+});
+
+export class ICU4XBcp47ToIanaMapper {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XBcp47ToIanaMapper_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XBcp47ToIanaMapper_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XBcp47ToIanaMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ get(arg_value) {
+ const buf_arg_value = diplomatRuntime.DiplomatBuf.str(wasm, arg_value);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XBcp47ToIanaMapper_get(diplomat_receive_buffer, this.underlying, buf_arg_value.ptr, buf_arg_value.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_value.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidi.d.ts b/intl/icu_capi/js/package/lib/ICU4XBidi.d.ts
new file mode 100644
index 0000000000..96806c7479
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidi.d.ts
@@ -0,0 +1,82 @@
+import { u8 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XBidiInfo } from "./ICU4XBidiInfo";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XReorderedIndexMap } from "./ICU4XReorderedIndexMap";
+
+/**
+
+ * An ICU4X Bidi object, containing loaded bidi data
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/bidi/struct.BidiClassAdapter.html Rust documentation for `BidiClassAdapter`} for more information.
+ */
+export class ICU4XBidi {
+
+ /**
+
+ * Creates a new {@link ICU4XBidi `ICU4XBidi`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/bidi/struct.BidiClassAdapter.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XBidi | never;
+
+ /**
+
+ * Use the data loaded in this object to process a string and calculate bidi information
+
+ * Takes in a Level for the default level, if it is an invalid value it will default to LTR
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html#method.new_with_data_source Rust documentation for `new_with_data_source`} for more information.
+ */
+ for_text(text: string, default_level: u8): ICU4XBidiInfo;
+
+ /**
+
+ * Utility function for producing reorderings given a list of levels
+
+ * Produces a map saying which visual index maps to which source index.
+
+ * The levels array must not have values greater than 126 (this is the Bidi maximum explicit depth plus one). Failure to follow this invariant may lead to incorrect results, but is still safe.
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html#method.reorder_visual Rust documentation for `reorder_visual`} for more information.
+ */
+ reorder_visual(levels: Uint8Array): ICU4XReorderedIndexMap;
+
+ /**
+
+ * Check if a Level returned by level_at is an RTL level.
+
+ * Invalid levels (numbers greater than 125) will be assumed LTR
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.is_rtl Rust documentation for `is_rtl`} for more information.
+ */
+ static level_is_rtl(level: u8): boolean;
+
+ /**
+
+ * Check if a Level returned by level_at is an LTR level.
+
+ * Invalid levels (numbers greater than 125) will be assumed LTR
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.is_ltr Rust documentation for `is_ltr`} for more information.
+ */
+ static level_is_ltr(level: u8): boolean;
+
+ /**
+
+ * Get a basic RTL Level value
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.rtl Rust documentation for `rtl`} for more information.
+ */
+ static level_rtl(): u8;
+
+ /**
+
+ * Get a simple LTR Level value
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.ltr Rust documentation for `ltr`} for more information.
+ */
+ static level_ltr(): u8;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidi.js b/intl/icu_capi/js/package/lib/ICU4XBidi.js
new file mode 100644
index 0000000000..18676b8874
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidi.js
@@ -0,0 +1,65 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XBidiInfo } from "./ICU4XBidiInfo.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XReorderedIndexMap } from "./ICU4XReorderedIndexMap.js"
+
+const ICU4XBidi_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XBidi_destroy(underlying);
+});
+
+export class ICU4XBidi {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XBidi_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XBidi_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XBidi(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ for_text(arg_text, arg_default_level) {
+ const buf_arg_text = diplomatRuntime.DiplomatBuf.str(wasm, arg_text);
+ return new ICU4XBidiInfo(wasm.ICU4XBidi_for_text(this.underlying, buf_arg_text.ptr, buf_arg_text.size, arg_default_level), true, [buf_arg_text]);
+ }
+
+ reorder_visual(arg_levels) {
+ const buf_arg_levels = diplomatRuntime.DiplomatBuf.slice(wasm, arg_levels, 1);
+ const diplomat_out = new ICU4XReorderedIndexMap(wasm.ICU4XBidi_reorder_visual(this.underlying, buf_arg_levels.ptr, buf_arg_levels.size), true, []);
+ buf_arg_levels.free();
+ return diplomat_out;
+ }
+
+ static level_is_rtl(arg_level) {
+ return wasm.ICU4XBidi_level_is_rtl(arg_level);
+ }
+
+ static level_is_ltr(arg_level) {
+ return wasm.ICU4XBidi_level_is_ltr(arg_level);
+ }
+
+ static level_rtl() {
+ return wasm.ICU4XBidi_level_rtl();
+ }
+
+ static level_ltr() {
+ return wasm.ICU4XBidi_level_ltr();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidiDirection.d.ts b/intl/icu_capi/js/package/lib/ICU4XBidiDirection.d.ts
new file mode 100644
index 0000000000..2c406601d6
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidiDirection.d.ts
@@ -0,0 +1,14 @@
+
+/**
+ */
+export enum ICU4XBidiDirection {
+ /**
+ */
+ Ltr = 'Ltr',
+ /**
+ */
+ Rtl = 'Rtl',
+ /**
+ */
+ Mixed = 'Mixed',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidiDirection.js b/intl/icu_capi/js/package/lib/ICU4XBidiDirection.js
new file mode 100644
index 0000000000..6e68a91598
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidiDirection.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XBidiDirection_js_to_rust = {
+ "Ltr": 0,
+ "Rtl": 1,
+ "Mixed": 2,
+};
+
+export const ICU4XBidiDirection_rust_to_js = {
+ [0]: "Ltr",
+ [1]: "Rtl",
+ [2]: "Mixed",
+};
+
+export const ICU4XBidiDirection = {
+ "Ltr": "Ltr",
+ "Rtl": "Rtl",
+ "Mixed": "Mixed",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidiInfo.d.ts b/intl/icu_capi/js/package/lib/ICU4XBidiInfo.d.ts
new file mode 100644
index 0000000000..bdbb3f43ef
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidiInfo.d.ts
@@ -0,0 +1,37 @@
+import { u8, usize } from "./diplomat-runtime"
+import { ICU4XBidiParagraph } from "./ICU4XBidiParagraph";
+
+/**
+
+ * An object containing bidi information for a given string, produced by `for_text()` on `ICU4XBidi`
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html Rust documentation for `BidiInfo`} for more information.
+ */
+export class ICU4XBidiInfo {
+
+ /**
+
+ * The number of paragraphs contained here
+ */
+ paragraph_count(): usize;
+
+ /**
+
+ * Get the nth paragraph, returning `None` if out of bounds
+ */
+ paragraph_at(n: usize): ICU4XBidiParagraph | undefined;
+
+ /**
+
+ * The number of bytes in this full text
+ */
+ size(): usize;
+
+ /**
+
+ * Get the BIDI level at a particular byte index in the full text. This integer is conceptually a `unicode_bidi::Level`, and can be further inspected using the static methods on ICU4XBidi.
+
+ * Returns 0 (equivalent to `Level::ltr()`) on error
+ */
+ level_at(pos: usize): u8;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidiInfo.js b/intl/icu_capi/js/package/lib/ICU4XBidiInfo.js
new file mode 100644
index 0000000000..dcdc78390f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidiInfo.js
@@ -0,0 +1,37 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XBidiParagraph } from "./ICU4XBidiParagraph.js"
+
+const ICU4XBidiInfo_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XBidiInfo_destroy(underlying);
+});
+
+export class ICU4XBidiInfo {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XBidiInfo_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ paragraph_count() {
+ return wasm.ICU4XBidiInfo_paragraph_count(this.underlying);
+ }
+
+ paragraph_at(arg_n) {
+ return (() => {
+ const option_ptr = wasm.ICU4XBidiInfo_paragraph_at(this.underlying, arg_n);
+ return (option_ptr == 0) ? null : new ICU4XBidiParagraph(option_ptr, true, [this]);
+ })();
+ }
+
+ size() {
+ return wasm.ICU4XBidiInfo_size(this.underlying);
+ }
+
+ level_at(arg_pos) {
+ return wasm.ICU4XBidiInfo_level_at(this.underlying, arg_pos);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidiParagraph.d.ts b/intl/icu_capi/js/package/lib/ICU4XBidiParagraph.d.ts
new file mode 100644
index 0000000000..94d29baa42
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidiParagraph.d.ts
@@ -0,0 +1,67 @@
+import { u8, usize } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XBidiDirection } from "./ICU4XBidiDirection";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * Bidi information for a single processed paragraph
+ */
+export class ICU4XBidiParagraph {
+
+ /**
+
+ * Given a paragraph index `n` within the surrounding text, this sets this object to the paragraph at that index. Returns `ICU4XError::OutOfBoundsError` when out of bounds.
+
+ * This is equivalent to calling `paragraph_at()` on `ICU4XBidiInfo` but doesn't create a new object
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ set_paragraph_in_text(n: usize): void | never;
+
+ /**
+
+ * The primary direction of this paragraph
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at Rust documentation for `level_at`} for more information.
+ */
+ direction(): ICU4XBidiDirection;
+
+ /**
+
+ * The number of bytes in this paragraph
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.ParagraphInfo.html#method.len Rust documentation for `len`} for more information.
+ */
+ size(): usize;
+
+ /**
+
+ * The start index of this paragraph within the source text
+ */
+ range_start(): usize;
+
+ /**
+
+ * The end index of this paragraph within the source text
+ */
+ range_end(): usize;
+
+ /**
+
+ * Reorder a line based on display order. The ranges are specified relative to the source text and must be contained within this paragraph's range.
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at Rust documentation for `level_at`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ reorder_line(range_start: usize, range_end: usize): string | never;
+
+ /**
+
+ * Get the BIDI level at a particular byte index in this paragraph. This integer is conceptually a `unicode_bidi::Level`, and can be further inspected using the static methods on ICU4XBidi.
+
+ * Returns 0 (equivalent to `Level::ltr()`) on error
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at Rust documentation for `level_at`} for more information.
+ */
+ level_at(pos: usize): u8;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidiParagraph.js b/intl/icu_capi/js/package/lib/ICU4XBidiParagraph.js
new file mode 100644
index 0000000000..2037650134
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidiParagraph.js
@@ -0,0 +1,75 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XBidiDirection_js_to_rust, ICU4XBidiDirection_rust_to_js } from "./ICU4XBidiDirection.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XBidiParagraph_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XBidiParagraph_destroy(underlying);
+});
+
+export class ICU4XBidiParagraph {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XBidiParagraph_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ set_paragraph_in_text(arg_n) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XBidiParagraph_set_paragraph_in_text(diplomat_receive_buffer, this.underlying, arg_n);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ direction() {
+ return ICU4XBidiDirection_rust_to_js[wasm.ICU4XBidiParagraph_direction(this.underlying)];
+ }
+
+ size() {
+ return wasm.ICU4XBidiParagraph_size(this.underlying);
+ }
+
+ range_start() {
+ return wasm.ICU4XBidiParagraph_range_start(this.underlying);
+ }
+
+ range_end() {
+ return wasm.ICU4XBidiParagraph_range_end(this.underlying);
+ }
+
+ reorder_line(arg_range_start, arg_range_end) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XBidiParagraph_reorder_line(diplomat_receive_buffer, this.underlying, arg_range_start, arg_range_end, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ level_at(arg_pos) {
+ return wasm.ICU4XBidiParagraph_level_at(this.underlying, arg_pos);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCalendar.d.ts b/intl/icu_capi/js/package/lib/ICU4XCalendar.d.ts
new file mode 100644
index 0000000000..e1662c9cad
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCalendar.d.ts
@@ -0,0 +1,38 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XAnyCalendarKind } from "./ICU4XAnyCalendarKind";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html Rust documentation for `AnyCalendar`} for more information.
+ */
+export class ICU4XCalendar {
+
+ /**
+
+ * Creates a new {@link ICU4XCalendar `ICU4XCalendar`} from the specified date and time.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new_for_locale Rust documentation for `new_for_locale`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_for_locale(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XCalendar | never;
+
+ /**
+
+ * Creates a new {@link ICU4XCalendar `ICU4XCalendar`} from the specified date and time.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_for_kind(provider: ICU4XDataProvider, kind: ICU4XAnyCalendarKind): ICU4XCalendar | never;
+
+ /**
+
+ * Returns the kind of this calendar
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.kind Rust documentation for `kind`} for more information.
+ */
+ kind(): ICU4XAnyCalendarKind;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCalendar.js b/intl/icu_capi/js/package/lib/ICU4XCalendar.js
new file mode 100644
index 0000000000..03c5f882b8
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCalendar.js
@@ -0,0 +1,57 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XAnyCalendarKind_js_to_rust, ICU4XAnyCalendarKind_rust_to_js } from "./ICU4XAnyCalendarKind.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCalendar_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCalendar_destroy(underlying);
+});
+
+export class ICU4XCalendar {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCalendar_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_for_locale(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCalendar_create_for_locale(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCalendar(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_for_kind(arg_provider, arg_kind) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCalendar_create_for_kind(diplomat_receive_buffer, arg_provider.underlying, ICU4XAnyCalendarKind_js_to_rust[arg_kind]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCalendar(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ kind() {
+ return ICU4XAnyCalendarKind_rust_to_js[wasm.ICU4XCalendar_kind(this.underlying)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.d.ts b/intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.d.ts
new file mode 100644
index 0000000000..ffe64f3541
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.d.ts
@@ -0,0 +1,38 @@
+import { u8, u32, char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * Lookup of the Canonical_Combining_Class Unicode property
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html Rust documentation for `CanonicalCombiningClassMap`} for more information.
+ */
+export class ICU4XCanonicalCombiningClassMap {
+
+ /**
+
+ * Construct a new ICU4XCanonicalCombiningClassMap instance for NFC
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XCanonicalCombiningClassMap | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.get Rust documentation for `get`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/properties/properties/struct.CanonicalCombiningClass.html 1}
+ */
+ get(ch: char): u8;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.get32 Rust documentation for `get32`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/properties/properties/struct.CanonicalCombiningClass.html 1}
+ */
+ get32(ch: u32): u8;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.js b/intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.js
new file mode 100644
index 0000000000..9bdb959134
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.js
@@ -0,0 +1,43 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCanonicalCombiningClassMap_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCanonicalCombiningClassMap_destroy(underlying);
+});
+
+export class ICU4XCanonicalCombiningClassMap {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCanonicalCombiningClassMap_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCanonicalCombiningClassMap_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCanonicalCombiningClassMap(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ get(arg_ch) {
+ return wasm.ICU4XCanonicalCombiningClassMap_get(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ get32(arg_ch) {
+ return wasm.ICU4XCanonicalCombiningClassMap_get32(this.underlying, arg_ch);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.d.ts b/intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.d.ts
new file mode 100644
index 0000000000..1459a47f7d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.d.ts
@@ -0,0 +1,32 @@
+import { char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * The raw canonical composition operation.
+
+ * Callers should generally use ICU4XComposingNormalizer unless they specifically need raw composition operations
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html Rust documentation for `CanonicalComposition`} for more information.
+ */
+export class ICU4XCanonicalComposition {
+
+ /**
+
+ * Construct a new ICU4XCanonicalComposition instance for NFC
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XCanonicalComposition | never;
+
+ /**
+
+ * Performs canonical composition (including Hangul) on a pair of characters or returns NUL if these characters don’t compose. Composition exclusions are taken into account.
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html#method.compose Rust documentation for `compose`} for more information.
+ */
+ compose(starter: char, second: char): char;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.js b/intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.js
new file mode 100644
index 0000000000..ae217cafe9
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.js
@@ -0,0 +1,39 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCanonicalComposition_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCanonicalComposition_destroy(underlying);
+});
+
+export class ICU4XCanonicalComposition {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCanonicalComposition_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCanonicalComposition_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCanonicalComposition(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ compose(arg_starter, arg_second) {
+ return wasm.ICU4XCanonicalComposition_compose(this.underlying, diplomatRuntime.extractCodePoint(arg_starter, 'arg_starter'), diplomatRuntime.extractCodePoint(arg_second, 'arg_second'));
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.d.ts b/intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.d.ts
new file mode 100644
index 0000000000..debadba0ab
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.d.ts
@@ -0,0 +1,33 @@
+import { char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDecomposed } from "./ICU4XDecomposed";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * The raw (non-recursive) canonical decomposition operation.
+
+ * Callers should generally use ICU4XDecomposingNormalizer unless they specifically need raw composition operations
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html Rust documentation for `CanonicalDecomposition`} for more information.
+ */
+export class ICU4XCanonicalDecomposition {
+
+ /**
+
+ * Construct a new ICU4XCanonicalDecomposition instance for NFC
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XCanonicalDecomposition | never;
+
+ /**
+
+ * Performs non-recursive canonical decomposition (including for Hangul).
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html#method.decompose Rust documentation for `decompose`} for more information.
+ */
+ decompose(c: char): ICU4XDecomposed;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.js b/intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.js
new file mode 100644
index 0000000000..249a09d540
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.js
@@ -0,0 +1,46 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDecomposed } from "./ICU4XDecomposed.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCanonicalDecomposition_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCanonicalDecomposition_destroy(underlying);
+});
+
+export class ICU4XCanonicalDecomposition {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCanonicalDecomposition_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCanonicalDecomposition_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCanonicalDecomposition(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ decompose(arg_c) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(8, 4);
+ wasm.ICU4XCanonicalDecomposition_decompose(diplomat_receive_buffer, this.underlying, diplomatRuntime.extractCodePoint(arg_c, 'arg_c'));
+ const out = new ICU4XDecomposed(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 8, 4);
+ return out;
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.d.ts b/intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.d.ts
new file mode 100644
index 0000000000..61af474e1f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.d.ts
@@ -0,0 +1,39 @@
+import { char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCodePointSetBuilder } from "./ICU4XCodePointSetBuilder";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html Rust documentation for `CaseMapCloser`} for more information.
+ */
+export class ICU4XCaseMapCloser {
+
+ /**
+
+ * Construct a new ICU4XCaseMapper instance
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XCaseMapCloser | never;
+
+ /**
+
+ * Adds all simple case mappings and the full case folding for `c` to `builder`. Also adds special case closure mappings.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.add_case_closure_to Rust documentation for `add_case_closure_to`} for more information.
+ */
+ add_case_closure_to(c: char, builder: ICU4XCodePointSetBuilder): void;
+
+ /**
+
+ * Finds all characters and strings which may casemap to `s` as their full case folding string and adds them to the set.
+
+ * Returns true if the string was found
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.add_string_case_closure_to Rust documentation for `add_string_case_closure_to`} for more information.
+ */
+ add_string_case_closure_to(s: string, builder: ICU4XCodePointSetBuilder): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.js b/intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.js
new file mode 100644
index 0000000000..1d908278be
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.js
@@ -0,0 +1,46 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCaseMapCloser_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCaseMapCloser_destroy(underlying);
+});
+
+export class ICU4XCaseMapCloser {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCaseMapCloser_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCaseMapCloser_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCaseMapCloser(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ add_case_closure_to(arg_c, arg_builder) {
+ wasm.ICU4XCaseMapCloser_add_case_closure_to(this.underlying, diplomatRuntime.extractCodePoint(arg_c, 'arg_c'), arg_builder.underlying);
+ }
+
+ add_string_case_closure_to(arg_s, arg_builder) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = wasm.ICU4XCaseMapCloser_add_string_case_closure_to(this.underlying, buf_arg_s.ptr, buf_arg_s.size, arg_builder.underlying);
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCaseMapper.d.ts b/intl/icu_capi/js/package/lib/ICU4XCaseMapper.d.ts
new file mode 100644
index 0000000000..eb472c809b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCaseMapper.d.ts
@@ -0,0 +1,134 @@
+import { char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCodePointSetBuilder } from "./ICU4XCodePointSetBuilder";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTitlecaseOptionsV1 } from "./ICU4XTitlecaseOptionsV1";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html Rust documentation for `CaseMapper`} for more information.
+ */
+export class ICU4XCaseMapper {
+
+ /**
+
+ * Construct a new ICU4XCaseMapper instance
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XCaseMapper | never;
+
+ /**
+
+ * Returns the full lowercase mapping of the given string
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.lowercase Rust documentation for `lowercase`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ lowercase(s: string, locale: ICU4XLocale): string | never;
+
+ /**
+
+ * Returns the full uppercase mapping of the given string
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.uppercase Rust documentation for `uppercase`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ uppercase(s: string, locale: ICU4XLocale): string | never;
+
+ /**
+
+ * Returns the full titlecase mapping of the given string, performing head adjustment without loading additional data. (if head adjustment is enabled in the options)
+
+ * The `v1` refers to the version of the options struct, which may change as we add more options
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.titlecase_segment_with_only_case_data Rust documentation for `titlecase_segment_with_only_case_data`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ titlecase_segment_with_only_case_data_v1(s: string, locale: ICU4XLocale, options: ICU4XTitlecaseOptionsV1): string | never;
+
+ /**
+
+ * Case-folds the characters in the given string
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold Rust documentation for `fold`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ fold(s: string): string | never;
+
+ /**
+
+ * Case-folds the characters in the given string using Turkic (T) mappings for dotted/dotless I.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold_turkic Rust documentation for `fold_turkic`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ fold_turkic(s: string): string | never;
+
+ /**
+
+ * Adds all simple case mappings and the full case folding for `c` to `builder`. Also adds special case closure mappings.
+
+ * In other words, this adds all characters that this casemaps to, as well as all characters that may casemap to this one.
+
+ * Note that since ICU4XCodePointSetBuilder does not contain strings, this will ignore string mappings.
+
+ * Identical to the similarly named method on `ICU4XCaseMapCloser`, use that if you plan on using string case closure mappings too.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.add_case_closure_to Rust documentation for `add_case_closure_to`} for more information.
+ */
+ add_case_closure_to(c: char, builder: ICU4XCodePointSetBuilder): void;
+
+ /**
+
+ * Returns the simple lowercase mapping of the given character.
+
+ * This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use `ICU4XCaseMapper::lowercase`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_lowercase Rust documentation for `simple_lowercase`} for more information.
+ */
+ simple_lowercase(ch: char): char;
+
+ /**
+
+ * Returns the simple uppercase mapping of the given character.
+
+ * This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use `ICU4XCaseMapper::uppercase`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_uppercase Rust documentation for `simple_uppercase`} for more information.
+ */
+ simple_uppercase(ch: char): char;
+
+ /**
+
+ * Returns the simple titlecase mapping of the given character.
+
+ * This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use `ICU4XCaseMapper::titlecase_segment`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_titlecase Rust documentation for `simple_titlecase`} for more information.
+ */
+ simple_titlecase(ch: char): char;
+
+ /**
+
+ * Returns the simple casefolding of the given character.
+
+ * This function only implements simple folding. For full folding, use `ICU4XCaseMapper::fold`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_fold Rust documentation for `simple_fold`} for more information.
+ */
+ simple_fold(ch: char): char;
+
+ /**
+
+ * Returns the simple casefolding of the given character in the Turkic locale
+
+ * This function only implements simple folding. For full folding, use `ICU4XCaseMapper::fold_turkic`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_fold_turkic Rust documentation for `simple_fold_turkic`} for more information.
+ */
+ simple_fold_turkic(ch: char): char;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCaseMapper.js b/intl/icu_capi/js/package/lib/ICU4XCaseMapper.js
new file mode 100644
index 0000000000..b6bf60bdda
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCaseMapper.js
@@ -0,0 +1,173 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XLeadingAdjustment_js_to_rust, ICU4XLeadingAdjustment_rust_to_js } from "./ICU4XLeadingAdjustment.js"
+import { ICU4XTrailingCase_js_to_rust, ICU4XTrailingCase_rust_to_js } from "./ICU4XTrailingCase.js"
+
+const ICU4XCaseMapper_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCaseMapper_destroy(underlying);
+});
+
+export class ICU4XCaseMapper {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCaseMapper_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCaseMapper_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCaseMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ lowercase(arg_s, arg_locale) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCaseMapper_lowercase(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, arg_locale.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ uppercase(arg_s, arg_locale) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCaseMapper_uppercase(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, arg_locale.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ titlecase_segment_with_only_case_data_v1(arg_s, arg_locale, arg_options) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const field_leading_adjustment_arg_options = arg_options["leading_adjustment"];
+ const field_trailing_case_arg_options = arg_options["trailing_case"];
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCaseMapper_titlecase_segment_with_only_case_data_v1(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, arg_locale.underlying, ICU4XLeadingAdjustment_js_to_rust[field_leading_adjustment_arg_options], ICU4XTrailingCase_js_to_rust[field_trailing_case_arg_options], writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ fold(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCaseMapper_fold(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ fold_turkic(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCaseMapper_fold_turkic(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ add_case_closure_to(arg_c, arg_builder) {
+ wasm.ICU4XCaseMapper_add_case_closure_to(this.underlying, diplomatRuntime.extractCodePoint(arg_c, 'arg_c'), arg_builder.underlying);
+ }
+
+ simple_lowercase(arg_ch) {
+ return wasm.ICU4XCaseMapper_simple_lowercase(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ simple_uppercase(arg_ch) {
+ return wasm.ICU4XCaseMapper_simple_uppercase(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ simple_titlecase(arg_ch) {
+ return wasm.ICU4XCaseMapper_simple_titlecase(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ simple_fold(arg_ch) {
+ return wasm.ICU4XCaseMapper_simple_fold(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ simple_fold_turkic(arg_ch) {
+ return wasm.ICU4XCaseMapper_simple_fold_turkic(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.d.ts b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.d.ts
new file mode 100644
index 0000000000..2f6f39fa81
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.d.ts
@@ -0,0 +1,66 @@
+import { u16, u32, char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { CodePointRangeIterator } from "./CodePointRangeIterator";
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property.
+
+ * For properties whose values fit into 16 bits.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/index.html Rust documentation for `properties`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapData.html Rust documentation for `CodePointMapData`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html Rust documentation for `CodePointMapDataBorrowed`} for more information.
+ */
+export class ICU4XCodePointMapData16 {
+
+ /**
+
+ * Gets the value for a code point.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get Rust documentation for `get`} for more information.
+ */
+ get(cp: char): u16;
+
+ /**
+
+ * Gets the value for a code point (specified as a 32 bit integer, in UTF-32)
+ */
+ get32(cp: u32): u16;
+
+ /**
+
+ * Produces an iterator over ranges of code points that map to `value`
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value Rust documentation for `iter_ranges_for_value`} for more information.
+ */
+ iter_ranges_for_value(value: u16): CodePointRangeIterator;
+
+ /**
+
+ * Produces an iterator over ranges of code points that do not map to `value`
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value_complemented Rust documentation for `iter_ranges_for_value_complemented`} for more information.
+ */
+ iter_ranges_for_value_complemented(value: u16): CodePointRangeIterator;
+
+ /**
+
+ * Gets a {@link ICU4XCodePointSetData `ICU4XCodePointSetData`} representing all entries in this map that map to the given value
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get_set_for_value Rust documentation for `get_set_for_value`} for more information.
+ */
+ get_set_for_value(value: u16): ICU4XCodePointSetData;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.script.html Rust documentation for `script`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_script(provider: ICU4XDataProvider): ICU4XCodePointMapData16 | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.js b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.js
new file mode 100644
index 0000000000..cbdb61da45
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.js
@@ -0,0 +1,57 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { CodePointRangeIterator } from "./CodePointRangeIterator.js"
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCodePointMapData16_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCodePointMapData16_destroy(underlying);
+});
+
+export class ICU4XCodePointMapData16 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCodePointMapData16_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ get(arg_cp) {
+ return wasm.ICU4XCodePointMapData16_get(this.underlying, diplomatRuntime.extractCodePoint(arg_cp, 'arg_cp'));
+ }
+
+ get32(arg_cp) {
+ return wasm.ICU4XCodePointMapData16_get32(this.underlying, arg_cp);
+ }
+
+ iter_ranges_for_value(arg_value) {
+ return new CodePointRangeIterator(wasm.ICU4XCodePointMapData16_iter_ranges_for_value(this.underlying, arg_value), true, [this]);
+ }
+
+ iter_ranges_for_value_complemented(arg_value) {
+ return new CodePointRangeIterator(wasm.ICU4XCodePointMapData16_iter_ranges_for_value_complemented(this.underlying, arg_value), true, [this]);
+ }
+
+ get_set_for_value(arg_value) {
+ return new ICU4XCodePointSetData(wasm.ICU4XCodePointMapData16_get_set_for_value(this.underlying, arg_value), true, []);
+ }
+
+ static load_script(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData16_load_script(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData16(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.d.ts b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.d.ts
new file mode 100644
index 0000000000..700695044e
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.d.ts
@@ -0,0 +1,137 @@
+import { u8, u32, char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { CodePointRangeIterator } from "./CodePointRangeIterator";
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property.
+
+ * For properties whose values fit into 8 bits.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/index.html Rust documentation for `properties`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapData.html Rust documentation for `CodePointMapData`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html Rust documentation for `CodePointMapDataBorrowed`} for more information.
+ */
+export class ICU4XCodePointMapData8 {
+
+ /**
+
+ * Gets the value for a code point.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get Rust documentation for `get`} for more information.
+ */
+ get(cp: char): u8;
+
+ /**
+
+ * Gets the value for a code point (specified as a 32 bit integer, in UTF-32)
+ */
+ get32(cp: u32): u8;
+
+ /**
+
+ * Converts a general category to its corresponding mask value
+
+ * Nonexistant general categories will map to the empty mask
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html Rust documentation for `GeneralCategoryGroup`} for more information.
+ */
+ static general_category_to_mask(gc: u8): u32;
+
+ /**
+
+ * Produces an iterator over ranges of code points that map to `value`
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value Rust documentation for `iter_ranges_for_value`} for more information.
+ */
+ iter_ranges_for_value(value: u8): CodePointRangeIterator;
+
+ /**
+
+ * Produces an iterator over ranges of code points that do not map to `value`
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value_complemented Rust documentation for `iter_ranges_for_value_complemented`} for more information.
+ */
+ iter_ranges_for_value_complemented(value: u8): CodePointRangeIterator;
+
+ /**
+
+ * Given a mask value (the nth bit marks property value = n), produce an iterator over ranges of code points whose property values are contained in the mask.
+
+ * The main mask property supported is that for General_Category, which can be obtained via `general_category_to_mask()` or by using `ICU4XGeneralCategoryNameToMaskMapper`
+
+ * Should only be used on maps for properties with values less than 32 (like Generak_Category), other maps will have unpredictable results
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_group Rust documentation for `iter_ranges_for_group`} for more information.
+ */
+ iter_ranges_for_mask(mask: u32): CodePointRangeIterator;
+
+ /**
+
+ * Gets a {@link ICU4XCodePointSetData `ICU4XCodePointSetData`} representing all entries in this map that map to the given value
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get_set_for_value Rust documentation for `get_set_for_value`} for more information.
+ */
+ get_set_for_value(value: u8): ICU4XCodePointSetData;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.general_category.html Rust documentation for `general_category`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_general_category(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.bidi_class.html Rust documentation for `bidi_class`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_bidi_class(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.east_asian_width.html Rust documentation for `east_asian_width`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_east_asian_width(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.indic_syllabic_category.html Rust documentation for `indic_syllabic_category`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_indic_syllabic_category(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.line_break.html Rust documentation for `line_break`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_line_break(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.grapheme_cluster_break.html Rust documentation for `grapheme_cluster_break`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static try_grapheme_cluster_break(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.word_break.html Rust documentation for `word_break`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_word_break(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.sentence_break.html Rust documentation for `sentence_break`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_sentence_break(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.js b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.js
new file mode 100644
index 0000000000..4af999f4be
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.js
@@ -0,0 +1,184 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { CodePointRangeIterator } from "./CodePointRangeIterator.js"
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCodePointMapData8_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCodePointMapData8_destroy(underlying);
+});
+
+export class ICU4XCodePointMapData8 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCodePointMapData8_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ get(arg_cp) {
+ return wasm.ICU4XCodePointMapData8_get(this.underlying, diplomatRuntime.extractCodePoint(arg_cp, 'arg_cp'));
+ }
+
+ get32(arg_cp) {
+ return wasm.ICU4XCodePointMapData8_get32(this.underlying, arg_cp);
+ }
+
+ static general_category_to_mask(arg_gc) {
+ return wasm.ICU4XCodePointMapData8_general_category_to_mask(arg_gc);
+ }
+
+ iter_ranges_for_value(arg_value) {
+ return new CodePointRangeIterator(wasm.ICU4XCodePointMapData8_iter_ranges_for_value(this.underlying, arg_value), true, [this]);
+ }
+
+ iter_ranges_for_value_complemented(arg_value) {
+ return new CodePointRangeIterator(wasm.ICU4XCodePointMapData8_iter_ranges_for_value_complemented(this.underlying, arg_value), true, [this]);
+ }
+
+ iter_ranges_for_mask(arg_mask) {
+ return new CodePointRangeIterator(wasm.ICU4XCodePointMapData8_iter_ranges_for_mask(this.underlying, arg_mask), true, [this]);
+ }
+
+ get_set_for_value(arg_value) {
+ return new ICU4XCodePointSetData(wasm.ICU4XCodePointMapData8_get_set_for_value(this.underlying, arg_value), true, []);
+ }
+
+ static load_general_category(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_load_general_category(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_bidi_class(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_load_bidi_class(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_east_asian_width(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_load_east_asian_width(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_indic_syllabic_category(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_load_indic_syllabic_category(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_line_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_load_line_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static try_grapheme_cluster_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_try_grapheme_cluster_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_word_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_load_word_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_sentence_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_load_sentence_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.d.ts b/intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.d.ts
new file mode 100644
index 0000000000..16dd9c829c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.d.ts
@@ -0,0 +1,163 @@
+import { u32, char } from "./diplomat-runtime"
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html Rust documentation for `CodePointInversionListBuilder`} for more information.
+ */
+export class ICU4XCodePointSetBuilder {
+
+ /**
+
+ * Make a new set builder containing nothing
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.new Rust documentation for `new`} for more information.
+ */
+ static create(): ICU4XCodePointSetBuilder;
+
+ /**
+
+ * Build this into a set
+
+ * This object is repopulated with an empty builder
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.build Rust documentation for `build`} for more information.
+ */
+ build(): ICU4XCodePointSetData;
+
+ /**
+
+ * Complements this set
+
+ * (Elements in this set are removed and vice versa)
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement Rust documentation for `complement`} for more information.
+ */
+ complement(): void;
+
+ /**
+
+ * Returns whether this set is empty
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.is_empty Rust documentation for `is_empty`} for more information.
+ */
+ is_empty(): boolean;
+
+ /**
+
+ * Add a single character to the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_char Rust documentation for `add_char`} for more information.
+ */
+ add_char(ch: char): void;
+
+ /**
+
+ * Add a single u32 value to the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_u32 Rust documentation for `add_u32`} for more information.
+ */
+ add_u32(ch: u32): void;
+
+ /**
+
+ * Add an inclusive range of characters to the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_range Rust documentation for `add_range`} for more information.
+ */
+ add_inclusive_range(start: char, end: char): void;
+
+ /**
+
+ * Add an inclusive range of u32s to the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_range_u32 Rust documentation for `add_range_u32`} for more information.
+ */
+ add_inclusive_range_u32(start: u32, end: u32): void;
+
+ /**
+
+ * Add all elements that belong to the provided set to the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_set Rust documentation for `add_set`} for more information.
+ */
+ add_set(data: ICU4XCodePointSetData): void;
+
+ /**
+
+ * Remove a single character to the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_char Rust documentation for `remove_char`} for more information.
+ */
+ remove_char(ch: char): void;
+
+ /**
+
+ * Remove an inclusive range of characters from the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_range Rust documentation for `remove_range`} for more information.
+ */
+ remove_inclusive_range(start: char, end: char): void;
+
+ /**
+
+ * Remove all elements that belong to the provided set from the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_set Rust documentation for `remove_set`} for more information.
+ */
+ remove_set(data: ICU4XCodePointSetData): void;
+
+ /**
+
+ * Removes all elements from the set except a single character
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_char Rust documentation for `retain_char`} for more information.
+ */
+ retain_char(ch: char): void;
+
+ /**
+
+ * Removes all elements from the set except an inclusive range of characters f
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_range Rust documentation for `retain_range`} for more information.
+ */
+ retain_inclusive_range(start: char, end: char): void;
+
+ /**
+
+ * Removes all elements from the set except all elements in the provided set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_set Rust documentation for `retain_set`} for more information.
+ */
+ retain_set(data: ICU4XCodePointSetData): void;
+
+ /**
+
+ * Complement a single character to the set
+
+ * (Characters which are in this set are removed and vice versa)
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_char Rust documentation for `complement_char`} for more information.
+ */
+ complement_char(ch: char): void;
+
+ /**
+
+ * Complement an inclusive range of characters from the set
+
+ * (Characters which are in this set are removed and vice versa)
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_range Rust documentation for `complement_range`} for more information.
+ */
+ complement_inclusive_range(start: char, end: char): void;
+
+ /**
+
+ * Complement all elements that belong to the provided set from the set
+
+ * (Characters which are in this set are removed and vice versa)
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_set Rust documentation for `complement_set`} for more information.
+ */
+ complement_set(data: ICU4XCodePointSetData): void;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.js b/intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.js
new file mode 100644
index 0000000000..0b4f7a1751
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.js
@@ -0,0 +1,90 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData.js"
+
+const ICU4XCodePointSetBuilder_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCodePointSetBuilder_destroy(underlying);
+});
+
+export class ICU4XCodePointSetBuilder {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCodePointSetBuilder_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create() {
+ return new ICU4XCodePointSetBuilder(wasm.ICU4XCodePointSetBuilder_create(), true, []);
+ }
+
+ build() {
+ return new ICU4XCodePointSetData(wasm.ICU4XCodePointSetBuilder_build(this.underlying), true, []);
+ }
+
+ complement() {
+ wasm.ICU4XCodePointSetBuilder_complement(this.underlying);
+ }
+
+ is_empty() {
+ return wasm.ICU4XCodePointSetBuilder_is_empty(this.underlying);
+ }
+
+ add_char(arg_ch) {
+ wasm.ICU4XCodePointSetBuilder_add_char(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ add_u32(arg_ch) {
+ wasm.ICU4XCodePointSetBuilder_add_u32(this.underlying, arg_ch);
+ }
+
+ add_inclusive_range(arg_start, arg_end) {
+ wasm.ICU4XCodePointSetBuilder_add_inclusive_range(this.underlying, diplomatRuntime.extractCodePoint(arg_start, 'arg_start'), diplomatRuntime.extractCodePoint(arg_end, 'arg_end'));
+ }
+
+ add_inclusive_range_u32(arg_start, arg_end) {
+ wasm.ICU4XCodePointSetBuilder_add_inclusive_range_u32(this.underlying, arg_start, arg_end);
+ }
+
+ add_set(arg_data) {
+ wasm.ICU4XCodePointSetBuilder_add_set(this.underlying, arg_data.underlying);
+ }
+
+ remove_char(arg_ch) {
+ wasm.ICU4XCodePointSetBuilder_remove_char(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ remove_inclusive_range(arg_start, arg_end) {
+ wasm.ICU4XCodePointSetBuilder_remove_inclusive_range(this.underlying, diplomatRuntime.extractCodePoint(arg_start, 'arg_start'), diplomatRuntime.extractCodePoint(arg_end, 'arg_end'));
+ }
+
+ remove_set(arg_data) {
+ wasm.ICU4XCodePointSetBuilder_remove_set(this.underlying, arg_data.underlying);
+ }
+
+ retain_char(arg_ch) {
+ wasm.ICU4XCodePointSetBuilder_retain_char(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ retain_inclusive_range(arg_start, arg_end) {
+ wasm.ICU4XCodePointSetBuilder_retain_inclusive_range(this.underlying, diplomatRuntime.extractCodePoint(arg_start, 'arg_start'), diplomatRuntime.extractCodePoint(arg_end, 'arg_end'));
+ }
+
+ retain_set(arg_data) {
+ wasm.ICU4XCodePointSetBuilder_retain_set(this.underlying, arg_data.underlying);
+ }
+
+ complement_char(arg_ch) {
+ wasm.ICU4XCodePointSetBuilder_complement_char(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ complement_inclusive_range(arg_start, arg_end) {
+ wasm.ICU4XCodePointSetBuilder_complement_inclusive_range(this.underlying, diplomatRuntime.extractCodePoint(arg_start, 'arg_start'), diplomatRuntime.extractCodePoint(arg_end, 'arg_end'));
+ }
+
+ complement_set(arg_data) {
+ wasm.ICU4XCodePointSetBuilder_complement_set(this.underlying, arg_data.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointSetData.d.ts b/intl/icu_capi/js/package/lib/ICU4XCodePointSetData.d.ts
new file mode 100644
index 0000000000..38e9818426
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointSetData.d.ts
@@ -0,0 +1,523 @@
+import { u32, char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { CodePointRangeIterator } from "./CodePointRangeIterator";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/index.html Rust documentation for `properties`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetData.html Rust documentation for `CodePointSetData`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html Rust documentation for `CodePointSetDataBorrowed`} for more information.
+ */
+export class ICU4XCodePointSetData {
+
+ /**
+
+ * Checks whether the code point is in the set.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.contains Rust documentation for `contains`} for more information.
+ */
+ contains(cp: char): boolean;
+
+ /**
+
+ * Checks whether the code point (specified as a 32 bit integer, in UTF-32) is in the set.
+ */
+ contains32(cp: u32): boolean;
+
+ /**
+
+ * Produces an iterator over ranges of code points contained in this set
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.iter_ranges Rust documentation for `iter_ranges`} for more information.
+ */
+ iter_ranges(): CodePointRangeIterator;
+
+ /**
+
+ * Produces an iterator over ranges of code points not contained in this set
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.iter_ranges_complemented Rust documentation for `iter_ranges_complemented`} for more information.
+ */
+ iter_ranges_complemented(): CodePointRangeIterator;
+
+ /**
+
+ * which is a mask with the same format as the `U_GC_XX_MASK` mask in ICU4C
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.for_general_category_group.html Rust documentation for `for_general_category_group`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_for_general_category_group(provider: ICU4XDataProvider, group: u32): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.ascii_hex_digit.html Rust documentation for `ascii_hex_digit`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_ascii_hex_digit(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.alnum.html Rust documentation for `alnum`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_alnum(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.alphabetic.html Rust documentation for `alphabetic`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_alphabetic(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_control.html Rust documentation for `bidi_control`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_bidi_control(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_mirrored.html Rust documentation for `bidi_mirrored`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_bidi_mirrored(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.blank.html Rust documentation for `blank`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_blank(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.cased.html Rust documentation for `cased`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_cased(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.case_ignorable.html Rust documentation for `case_ignorable`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_case_ignorable(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.full_composition_exclusion.html Rust documentation for `full_composition_exclusion`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_full_composition_exclusion(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casefolded.html Rust documentation for `changes_when_casefolded`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_changes_when_casefolded(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casemapped.html Rust documentation for `changes_when_casemapped`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_changes_when_casemapped(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_nfkc_casefolded.html Rust documentation for `changes_when_nfkc_casefolded`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_changes_when_nfkc_casefolded(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_lowercased.html Rust documentation for `changes_when_lowercased`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_changes_when_lowercased(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_titlecased.html Rust documentation for `changes_when_titlecased`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_changes_when_titlecased(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_uppercased.html Rust documentation for `changes_when_uppercased`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_changes_when_uppercased(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.dash.html Rust documentation for `dash`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_dash(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.deprecated.html Rust documentation for `deprecated`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_deprecated(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.default_ignorable_code_point.html Rust documentation for `default_ignorable_code_point`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_default_ignorable_code_point(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.diacritic.html Rust documentation for `diacritic`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_diacritic(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier_base.html Rust documentation for `emoji_modifier_base`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_emoji_modifier_base(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_component.html Rust documentation for `emoji_component`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_emoji_component(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier.html Rust documentation for `emoji_modifier`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_emoji_modifier(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.emoji.html Rust documentation for `emoji`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_emoji(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_presentation.html Rust documentation for `emoji_presentation`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_emoji_presentation(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.extender.html Rust documentation for `extender`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_extender(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.extended_pictographic.html Rust documentation for `extended_pictographic`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_extended_pictographic(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.graph.html Rust documentation for `graph`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_graph(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_base.html Rust documentation for `grapheme_base`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_grapheme_base(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_extend.html Rust documentation for `grapheme_extend`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_grapheme_extend(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_link.html Rust documentation for `grapheme_link`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_grapheme_link(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.hex_digit.html Rust documentation for `hex_digit`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_hex_digit(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.hyphen.html Rust documentation for `hyphen`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_hyphen(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.id_continue.html Rust documentation for `id_continue`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_id_continue(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.ideographic.html Rust documentation for `ideographic`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_ideographic(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.id_start.html Rust documentation for `id_start`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_id_start(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.ids_binary_operator.html Rust documentation for `ids_binary_operator`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_ids_binary_operator(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.ids_trinary_operator.html Rust documentation for `ids_trinary_operator`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_ids_trinary_operator(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.join_control.html Rust documentation for `join_control`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_join_control(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.logical_order_exception.html Rust documentation for `logical_order_exception`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_logical_order_exception(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.lowercase.html Rust documentation for `lowercase`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_lowercase(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.math.html Rust documentation for `math`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_math(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.noncharacter_code_point.html Rust documentation for `noncharacter_code_point`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_noncharacter_code_point(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.nfc_inert.html Rust documentation for `nfc_inert`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_nfc_inert(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.nfd_inert.html Rust documentation for `nfd_inert`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_nfd_inert(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.nfkc_inert.html Rust documentation for `nfkc_inert`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_nfkc_inert(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.nfkd_inert.html Rust documentation for `nfkd_inert`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_nfkd_inert(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_syntax.html Rust documentation for `pattern_syntax`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_pattern_syntax(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_white_space.html Rust documentation for `pattern_white_space`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_pattern_white_space(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.prepended_concatenation_mark.html Rust documentation for `prepended_concatenation_mark`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_prepended_concatenation_mark(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.print.html Rust documentation for `print`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_print(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.quotation_mark.html Rust documentation for `quotation_mark`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_quotation_mark(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.radical.html Rust documentation for `radical`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_radical(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.regional_indicator.html Rust documentation for `regional_indicator`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_regional_indicator(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.soft_dotted.html Rust documentation for `soft_dotted`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_soft_dotted(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.segment_starter.html Rust documentation for `segment_starter`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_segment_starter(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.case_sensitive.html Rust documentation for `case_sensitive`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_case_sensitive(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.sentence_terminal.html Rust documentation for `sentence_terminal`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_sentence_terminal(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.terminal_punctuation.html Rust documentation for `terminal_punctuation`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_terminal_punctuation(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.unified_ideograph.html Rust documentation for `unified_ideograph`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_unified_ideograph(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.uppercase.html Rust documentation for `uppercase`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_uppercase(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.variation_selector.html Rust documentation for `variation_selector`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_variation_selector(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.white_space.html Rust documentation for `white_space`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_white_space(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.xdigit.html Rust documentation for `xdigit`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_xdigit(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.xid_continue.html Rust documentation for `xid_continue`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_xid_continue(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.xid_start.html Rust documentation for `xid_start`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_xid_start(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * Loads data for a property specified as a string as long as it is one of the {@link https://tc39.es/ecma262/#table-binary-unicode-properties ECMA-262 binary properties} (not including Any, ASCII, and Assigned pseudoproperties).
+
+ * Returns `ICU4XError::PropertyUnexpectedPropertyNameError` in case the string does not match any property in the list
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.for_ecma262.html Rust documentation for `for_ecma262`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_for_ecma262(provider: ICU4XDataProvider, property_name: string): ICU4XCodePointSetData | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointSetData.js b/intl/icu_capi/js/package/lib/ICU4XCodePointSetData.js
new file mode 100644
index 0000000000..55a1605d4e
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointSetData.js
@@ -0,0 +1,1177 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { CodePointRangeIterator } from "./CodePointRangeIterator.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCodePointSetData_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCodePointSetData_destroy(underlying);
+});
+
+export class ICU4XCodePointSetData {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCodePointSetData_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ contains(arg_cp) {
+ return wasm.ICU4XCodePointSetData_contains(this.underlying, diplomatRuntime.extractCodePoint(arg_cp, 'arg_cp'));
+ }
+
+ contains32(arg_cp) {
+ return wasm.ICU4XCodePointSetData_contains32(this.underlying, arg_cp);
+ }
+
+ iter_ranges() {
+ return new CodePointRangeIterator(wasm.ICU4XCodePointSetData_iter_ranges(this.underlying), true, [this]);
+ }
+
+ iter_ranges_complemented() {
+ return new CodePointRangeIterator(wasm.ICU4XCodePointSetData_iter_ranges_complemented(this.underlying), true, [this]);
+ }
+
+ static load_for_general_category_group(arg_provider, arg_group) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_for_general_category_group(diplomat_receive_buffer, arg_provider.underlying, arg_group);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_ascii_hex_digit(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_ascii_hex_digit(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_alnum(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_alnum(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_alphabetic(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_alphabetic(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_bidi_control(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_bidi_control(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_bidi_mirrored(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_bidi_mirrored(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_blank(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_blank(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_cased(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_cased(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_case_ignorable(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_case_ignorable(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_full_composition_exclusion(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_full_composition_exclusion(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_changes_when_casefolded(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_changes_when_casefolded(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_changes_when_casemapped(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_changes_when_casemapped(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_changes_when_nfkc_casefolded(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_changes_when_nfkc_casefolded(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_changes_when_lowercased(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_changes_when_lowercased(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_changes_when_titlecased(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_changes_when_titlecased(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_changes_when_uppercased(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_changes_when_uppercased(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_dash(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_dash(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_deprecated(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_deprecated(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_default_ignorable_code_point(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_default_ignorable_code_point(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_diacritic(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_diacritic(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_emoji_modifier_base(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_emoji_modifier_base(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_emoji_component(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_emoji_component(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_emoji_modifier(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_emoji_modifier(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_emoji(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_emoji(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_emoji_presentation(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_emoji_presentation(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_extender(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_extender(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_extended_pictographic(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_extended_pictographic(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_graph(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_graph(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_grapheme_base(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_grapheme_base(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_grapheme_extend(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_grapheme_extend(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_grapheme_link(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_grapheme_link(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_hex_digit(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_hex_digit(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_hyphen(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_hyphen(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_id_continue(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_id_continue(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_ideographic(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_ideographic(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_id_start(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_id_start(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_ids_binary_operator(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_ids_binary_operator(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_ids_trinary_operator(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_ids_trinary_operator(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_join_control(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_join_control(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_logical_order_exception(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_logical_order_exception(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_lowercase(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_lowercase(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_math(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_math(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_noncharacter_code_point(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_noncharacter_code_point(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_nfc_inert(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_nfc_inert(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_nfd_inert(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_nfd_inert(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_nfkc_inert(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_nfkc_inert(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_nfkd_inert(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_nfkd_inert(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_pattern_syntax(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_pattern_syntax(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_pattern_white_space(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_pattern_white_space(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_prepended_concatenation_mark(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_prepended_concatenation_mark(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_print(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_print(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_quotation_mark(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_quotation_mark(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_radical(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_radical(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_regional_indicator(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_regional_indicator(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_soft_dotted(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_soft_dotted(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_segment_starter(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_segment_starter(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_case_sensitive(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_case_sensitive(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_sentence_terminal(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_sentence_terminal(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_terminal_punctuation(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_terminal_punctuation(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_unified_ideograph(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_unified_ideograph(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_uppercase(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_uppercase(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_variation_selector(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_variation_selector(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_white_space(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_white_space(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_xdigit(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_xdigit(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_xid_continue(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_xid_continue(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_xid_start(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_xid_start(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_for_ecma262(arg_provider, arg_property_name) {
+ const buf_arg_property_name = diplomatRuntime.DiplomatBuf.str(wasm, arg_property_name);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_for_ecma262(diplomat_receive_buffer, arg_provider.underlying, buf_arg_property_name.ptr, buf_arg_property_name.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_property_name.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollator.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollator.d.ts
new file mode 100644
index 0000000000..92e572493c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollator.d.ts
@@ -0,0 +1,50 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCollatorOptionsV1 } from "./ICU4XCollatorOptionsV1";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XOrdering } from "./ICU4XOrdering";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html Rust documentation for `Collator`} for more information.
+ */
+export class ICU4XCollator {
+
+ /**
+
+ * Construct a new Collator instance.
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_v1(provider: ICU4XDataProvider, locale: ICU4XLocale, options: ICU4XCollatorOptionsV1): ICU4XCollator | never;
+
+ /**
+
+ * Compare potentially ill-formed UTF-8 strings.
+
+ * Ill-formed input is compared as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf8 Rust documentation for `compare_utf8`} for more information.
+ */
+ compare(left: string, right: string): ICU4XOrdering;
+
+ /**
+
+ * Compare guaranteed well-formed UTF-8 strings.
+
+ * Note: In C++, passing ill-formed UTF-8 strings is undefined behavior (and may be memory-unsafe to do so, too).
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare Rust documentation for `compare`} for more information.
+ */
+ compare_valid_utf8(left: string, right: string): ICU4XOrdering;
+
+ /**
+
+ * Compare potentially ill-formed UTF-16 strings, with unpaired surrogates compared as REPLACEMENT CHARACTER.
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf16 Rust documentation for `compare_utf16`} for more information.
+ */
+ compare_utf16(left: Uint16Array, right: Uint16Array): ICU4XOrdering;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollator.js b/intl/icu_capi/js/package/lib/ICU4XCollator.js
new file mode 100644
index 0000000000..5fc796cbd2
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollator.js
@@ -0,0 +1,77 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XCollatorAlternateHandling_js_to_rust, ICU4XCollatorAlternateHandling_rust_to_js } from "./ICU4XCollatorAlternateHandling.js"
+import { ICU4XCollatorBackwardSecondLevel_js_to_rust, ICU4XCollatorBackwardSecondLevel_rust_to_js } from "./ICU4XCollatorBackwardSecondLevel.js"
+import { ICU4XCollatorCaseFirst_js_to_rust, ICU4XCollatorCaseFirst_rust_to_js } from "./ICU4XCollatorCaseFirst.js"
+import { ICU4XCollatorCaseLevel_js_to_rust, ICU4XCollatorCaseLevel_rust_to_js } from "./ICU4XCollatorCaseLevel.js"
+import { ICU4XCollatorMaxVariable_js_to_rust, ICU4XCollatorMaxVariable_rust_to_js } from "./ICU4XCollatorMaxVariable.js"
+import { ICU4XCollatorNumeric_js_to_rust, ICU4XCollatorNumeric_rust_to_js } from "./ICU4XCollatorNumeric.js"
+import { ICU4XCollatorStrength_js_to_rust, ICU4XCollatorStrength_rust_to_js } from "./ICU4XCollatorStrength.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XOrdering_js_to_rust, ICU4XOrdering_rust_to_js } from "./ICU4XOrdering.js"
+
+const ICU4XCollator_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCollator_destroy(underlying);
+});
+
+export class ICU4XCollator {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCollator_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_v1(arg_provider, arg_locale, arg_options) {
+ const field_strength_arg_options = arg_options["strength"];
+ const field_alternate_handling_arg_options = arg_options["alternate_handling"];
+ const field_case_first_arg_options = arg_options["case_first"];
+ const field_max_variable_arg_options = arg_options["max_variable"];
+ const field_case_level_arg_options = arg_options["case_level"];
+ const field_numeric_arg_options = arg_options["numeric"];
+ const field_backward_second_level_arg_options = arg_options["backward_second_level"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCollator_create_v1(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XCollatorStrength_js_to_rust[field_strength_arg_options], ICU4XCollatorAlternateHandling_js_to_rust[field_alternate_handling_arg_options], ICU4XCollatorCaseFirst_js_to_rust[field_case_first_arg_options], ICU4XCollatorMaxVariable_js_to_rust[field_max_variable_arg_options], ICU4XCollatorCaseLevel_js_to_rust[field_case_level_arg_options], ICU4XCollatorNumeric_js_to_rust[field_numeric_arg_options], ICU4XCollatorBackwardSecondLevel_js_to_rust[field_backward_second_level_arg_options]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCollator(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ compare(arg_left, arg_right) {
+ const buf_arg_left = diplomatRuntime.DiplomatBuf.str(wasm, arg_left);
+ const buf_arg_right = diplomatRuntime.DiplomatBuf.str(wasm, arg_right);
+ const diplomat_out = ICU4XOrdering_rust_to_js[wasm.ICU4XCollator_compare(this.underlying, buf_arg_left.ptr, buf_arg_left.size, buf_arg_right.ptr, buf_arg_right.size)];
+ buf_arg_left.free();
+ buf_arg_right.free();
+ return diplomat_out;
+ }
+
+ compare_valid_utf8(arg_left, arg_right) {
+ const buf_arg_left = diplomatRuntime.DiplomatBuf.str(wasm, arg_left);
+ const buf_arg_right = diplomatRuntime.DiplomatBuf.str(wasm, arg_right);
+ const diplomat_out = ICU4XOrdering_rust_to_js[wasm.ICU4XCollator_compare_valid_utf8(this.underlying, buf_arg_left.ptr, buf_arg_left.size, buf_arg_right.ptr, buf_arg_right.size)];
+ buf_arg_left.free();
+ buf_arg_right.free();
+ return diplomat_out;
+ }
+
+ compare_utf16(arg_left, arg_right) {
+ const buf_arg_left = diplomatRuntime.DiplomatBuf.slice(wasm, arg_left, 2);
+ const buf_arg_right = diplomatRuntime.DiplomatBuf.slice(wasm, arg_right, 2);
+ const diplomat_out = ICU4XOrdering_rust_to_js[wasm.ICU4XCollator_compare_utf16(this.underlying, buf_arg_left.ptr, buf_arg_left.size, buf_arg_right.ptr, buf_arg_right.size)];
+ buf_arg_left.free();
+ buf_arg_right.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.d.ts
new file mode 100644
index 0000000000..9e84343353
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/enum.AlternateHandling.html Rust documentation for `AlternateHandling`} for more information.
+ */
+export enum ICU4XCollatorAlternateHandling {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ NonIgnorable = 'NonIgnorable',
+ /**
+ */
+ Shifted = 'Shifted',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.js b/intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.js
new file mode 100644
index 0000000000..5046750815
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XCollatorAlternateHandling_js_to_rust = {
+ "Auto": 0,
+ "NonIgnorable": 1,
+ "Shifted": 2,
+};
+
+export const ICU4XCollatorAlternateHandling_rust_to_js = {
+ [0]: "Auto",
+ [1]: "NonIgnorable",
+ [2]: "Shifted",
+};
+
+export const ICU4XCollatorAlternateHandling = {
+ "Auto": "Auto",
+ "NonIgnorable": "NonIgnorable",
+ "Shifted": "Shifted",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.d.ts
new file mode 100644
index 0000000000..6dc06e7e2a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/enum.BackwardSecondLevel.html Rust documentation for `BackwardSecondLevel`} for more information.
+ */
+export enum ICU4XCollatorBackwardSecondLevel {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Off = 'Off',
+ /**
+ */
+ On = 'On',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.js b/intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.js
new file mode 100644
index 0000000000..825b3d200c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XCollatorBackwardSecondLevel_js_to_rust = {
+ "Auto": 0,
+ "Off": 1,
+ "On": 2,
+};
+
+export const ICU4XCollatorBackwardSecondLevel_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Off",
+ [2]: "On",
+};
+
+export const ICU4XCollatorBackwardSecondLevel = {
+ "Auto": "Auto",
+ "Off": "Off",
+ "On": "On",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.d.ts
new file mode 100644
index 0000000000..f72b75cfec
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.d.ts
@@ -0,0 +1,19 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/enum.CaseFirst.html Rust documentation for `CaseFirst`} for more information.
+ */
+export enum ICU4XCollatorCaseFirst {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Off = 'Off',
+ /**
+ */
+ LowerFirst = 'LowerFirst',
+ /**
+ */
+ UpperFirst = 'UpperFirst',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.js b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.js
new file mode 100644
index 0000000000..b5c11fb4e8
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.js
@@ -0,0 +1,23 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XCollatorCaseFirst_js_to_rust = {
+ "Auto": 0,
+ "Off": 1,
+ "LowerFirst": 2,
+ "UpperFirst": 3,
+};
+
+export const ICU4XCollatorCaseFirst_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Off",
+ [2]: "LowerFirst",
+ [3]: "UpperFirst",
+};
+
+export const ICU4XCollatorCaseFirst = {
+ "Auto": "Auto",
+ "Off": "Off",
+ "LowerFirst": "LowerFirst",
+ "UpperFirst": "UpperFirst",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.d.ts
new file mode 100644
index 0000000000..3825eaeae0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/enum.CaseLevel.html Rust documentation for `CaseLevel`} for more information.
+ */
+export enum ICU4XCollatorCaseLevel {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Off = 'Off',
+ /**
+ */
+ On = 'On',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.js b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.js
new file mode 100644
index 0000000000..aa0f747389
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XCollatorCaseLevel_js_to_rust = {
+ "Auto": 0,
+ "Off": 1,
+ "On": 2,
+};
+
+export const ICU4XCollatorCaseLevel_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Off",
+ [2]: "On",
+};
+
+export const ICU4XCollatorCaseLevel = {
+ "Auto": "Auto",
+ "Off": "Off",
+ "On": "On",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.d.ts
new file mode 100644
index 0000000000..2605bbc450
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.d.ts
@@ -0,0 +1,22 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/enum.MaxVariable.html Rust documentation for `MaxVariable`} for more information.
+ */
+export enum ICU4XCollatorMaxVariable {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Space = 'Space',
+ /**
+ */
+ Punctuation = 'Punctuation',
+ /**
+ */
+ Symbol = 'Symbol',
+ /**
+ */
+ Currency = 'Currency',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.js b/intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.js
new file mode 100644
index 0000000000..6964c4812d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.js
@@ -0,0 +1,26 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XCollatorMaxVariable_js_to_rust = {
+ "Auto": 0,
+ "Space": 1,
+ "Punctuation": 2,
+ "Symbol": 3,
+ "Currency": 4,
+};
+
+export const ICU4XCollatorMaxVariable_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Space",
+ [2]: "Punctuation",
+ [3]: "Symbol",
+ [4]: "Currency",
+};
+
+export const ICU4XCollatorMaxVariable = {
+ "Auto": "Auto",
+ "Space": "Space",
+ "Punctuation": "Punctuation",
+ "Symbol": "Symbol",
+ "Currency": "Currency",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.d.ts
new file mode 100644
index 0000000000..884c71d62b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/enum.Numeric.html Rust documentation for `Numeric`} for more information.
+ */
+export enum ICU4XCollatorNumeric {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Off = 'Off',
+ /**
+ */
+ On = 'On',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.js b/intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.js
new file mode 100644
index 0000000000..8a5e5e1f58
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XCollatorNumeric_js_to_rust = {
+ "Auto": 0,
+ "Off": 1,
+ "On": 2,
+};
+
+export const ICU4XCollatorNumeric_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Off",
+ [2]: "On",
+};
+
+export const ICU4XCollatorNumeric = {
+ "Auto": "Auto",
+ "Off": "Off",
+ "On": "On",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.d.ts
new file mode 100644
index 0000000000..3306764cd4
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.d.ts
@@ -0,0 +1,21 @@
+import { ICU4XCollatorAlternateHandling } from "./ICU4XCollatorAlternateHandling";
+import { ICU4XCollatorBackwardSecondLevel } from "./ICU4XCollatorBackwardSecondLevel";
+import { ICU4XCollatorCaseFirst } from "./ICU4XCollatorCaseFirst";
+import { ICU4XCollatorCaseLevel } from "./ICU4XCollatorCaseLevel";
+import { ICU4XCollatorMaxVariable } from "./ICU4XCollatorMaxVariable";
+import { ICU4XCollatorNumeric } from "./ICU4XCollatorNumeric";
+import { ICU4XCollatorStrength } from "./ICU4XCollatorStrength";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/struct.CollatorOptions.html Rust documentation for `CollatorOptions`} for more information.
+ */
+export class ICU4XCollatorOptionsV1 {
+ strength: ICU4XCollatorStrength;
+ alternate_handling: ICU4XCollatorAlternateHandling;
+ case_first: ICU4XCollatorCaseFirst;
+ max_variable: ICU4XCollatorMaxVariable;
+ case_level: ICU4XCollatorCaseLevel;
+ numeric: ICU4XCollatorNumeric;
+ backward_second_level: ICU4XCollatorBackwardSecondLevel;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.js b/intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.js
new file mode 100644
index 0000000000..5be95f5955
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XCollatorAlternateHandling_js_to_rust, ICU4XCollatorAlternateHandling_rust_to_js } from "./ICU4XCollatorAlternateHandling.js"
+import { ICU4XCollatorBackwardSecondLevel_js_to_rust, ICU4XCollatorBackwardSecondLevel_rust_to_js } from "./ICU4XCollatorBackwardSecondLevel.js"
+import { ICU4XCollatorCaseFirst_js_to_rust, ICU4XCollatorCaseFirst_rust_to_js } from "./ICU4XCollatorCaseFirst.js"
+import { ICU4XCollatorCaseLevel_js_to_rust, ICU4XCollatorCaseLevel_rust_to_js } from "./ICU4XCollatorCaseLevel.js"
+import { ICU4XCollatorMaxVariable_js_to_rust, ICU4XCollatorMaxVariable_rust_to_js } from "./ICU4XCollatorMaxVariable.js"
+import { ICU4XCollatorNumeric_js_to_rust, ICU4XCollatorNumeric_rust_to_js } from "./ICU4XCollatorNumeric.js"
+import { ICU4XCollatorStrength_js_to_rust, ICU4XCollatorStrength_rust_to_js } from "./ICU4XCollatorStrength.js"
+
+export class ICU4XCollatorOptionsV1 {
+ constructor(underlying) {
+ this.strength = ICU4XCollatorStrength_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying)];
+ this.alternate_handling = ICU4XCollatorAlternateHandling_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 4)];
+ this.case_first = ICU4XCollatorCaseFirst_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 8)];
+ this.max_variable = ICU4XCollatorMaxVariable_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 12)];
+ this.case_level = ICU4XCollatorCaseLevel_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 16)];
+ this.numeric = ICU4XCollatorNumeric_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 20)];
+ this.backward_second_level = ICU4XCollatorBackwardSecondLevel_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 24)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorStrength.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorStrength.d.ts
new file mode 100644
index 0000000000..2f1ff28a60
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorStrength.d.ts
@@ -0,0 +1,25 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/enum.Strength.html Rust documentation for `Strength`} for more information.
+ */
+export enum ICU4XCollatorStrength {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Primary = 'Primary',
+ /**
+ */
+ Secondary = 'Secondary',
+ /**
+ */
+ Tertiary = 'Tertiary',
+ /**
+ */
+ Quaternary = 'Quaternary',
+ /**
+ */
+ Identical = 'Identical',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorStrength.js b/intl/icu_capi/js/package/lib/ICU4XCollatorStrength.js
new file mode 100644
index 0000000000..4a8ca99fd2
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorStrength.js
@@ -0,0 +1,29 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XCollatorStrength_js_to_rust = {
+ "Auto": 0,
+ "Primary": 1,
+ "Secondary": 2,
+ "Tertiary": 3,
+ "Quaternary": 4,
+ "Identical": 5,
+};
+
+export const ICU4XCollatorStrength_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Primary",
+ [2]: "Secondary",
+ [3]: "Tertiary",
+ [4]: "Quaternary",
+ [5]: "Identical",
+};
+
+export const ICU4XCollatorStrength = {
+ "Auto": "Auto",
+ "Primary": "Primary",
+ "Secondary": "Secondary",
+ "Tertiary": "Tertiary",
+ "Quaternary": "Quaternary",
+ "Identical": "Identical",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.d.ts b/intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.d.ts
new file mode 100644
index 0000000000..7417e6257b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.d.ts
@@ -0,0 +1,49 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html Rust documentation for `ComposingNormalizer`} for more information.
+ */
+export class ICU4XComposingNormalizer {
+
+ /**
+
+ * Construct a new ICU4XComposingNormalizer instance for NFC
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfc Rust documentation for `new_nfc`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_nfc(provider: ICU4XDataProvider): ICU4XComposingNormalizer | never;
+
+ /**
+
+ * Construct a new ICU4XComposingNormalizer instance for NFKC
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfkc Rust documentation for `new_nfkc`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_nfkc(provider: ICU4XDataProvider): ICU4XComposingNormalizer | never;
+
+ /**
+
+ * Normalize a (potentially ill-formed) UTF8 string
+
+ * Errors are mapped to REPLACEMENT CHARACTER
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.normalize_utf8 Rust documentation for `normalize_utf8`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ normalize(s: string): string | never;
+
+ /**
+
+ * Check if a (potentially ill-formed) UTF8 string is normalized
+
+ * Errors are mapped to REPLACEMENT CHARACTER
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.is_normalized_utf8 Rust documentation for `is_normalized_utf8`} for more information.
+ */
+ is_normalized(s: string): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.js b/intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.js
new file mode 100644
index 0000000000..8793316b7a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.js
@@ -0,0 +1,81 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XComposingNormalizer_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XComposingNormalizer_destroy(underlying);
+});
+
+export class ICU4XComposingNormalizer {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XComposingNormalizer_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_nfc(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XComposingNormalizer_create_nfc(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XComposingNormalizer(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_nfkc(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XComposingNormalizer_create_nfkc(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XComposingNormalizer(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ normalize(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XComposingNormalizer_normalize(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ is_normalized(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = wasm.ICU4XComposingNormalizer_is_normalized(this.underlying, buf_arg_s.ptr, buf_arg_s.size);
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.d.ts b/intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.d.ts
new file mode 100644
index 0000000000..290f7881ad
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.d.ts
@@ -0,0 +1,293 @@
+import { i32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIanaToBcp47Mapper } from "./ICU4XIanaToBcp47Mapper";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XMetazoneCalculator } from "./ICU4XMetazoneCalculator";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html Rust documentation for `CustomTimeZone`} for more information.
+ */
+export class ICU4XCustomTimeZone {
+
+ /**
+
+ * Creates a time zone from an offset string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.from_str Rust documentation for `from_str`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_string(s: string): ICU4XCustomTimeZone | never;
+
+ /**
+
+ * Creates a time zone with no information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.new_empty Rust documentation for `new_empty`} for more information.
+ */
+ static create_empty(): ICU4XCustomTimeZone;
+
+ /**
+
+ * Creates a time zone for UTC.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.utc Rust documentation for `utc`} for more information.
+ */
+ static create_utc(): ICU4XCustomTimeZone;
+
+ /**
+
+ * Sets the `gmt_offset` field from offset seconds.
+
+ * Errors if the offset seconds are out of range.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.try_from_offset_seconds Rust documentation for `try_from_offset_seconds`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ try_set_gmt_offset_seconds(offset_seconds: i32): void | never;
+
+ /**
+
+ * Clears the `gmt_offset` field.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.offset_seconds Rust documentation for `offset_seconds`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html 1}
+ */
+ clear_gmt_offset(): void;
+
+ /**
+
+ * Returns the value of the `gmt_offset` field as offset seconds.
+
+ * Errors if the `gmt_offset` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.offset_seconds Rust documentation for `offset_seconds`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ gmt_offset_seconds(): i32 | never;
+
+ /**
+
+ * Returns whether the `gmt_offset` field is positive.
+
+ * Errors if the `gmt_offset` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.is_positive Rust documentation for `is_positive`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ is_gmt_offset_positive(): boolean | never;
+
+ /**
+
+ * Returns whether the `gmt_offset` field is zero.
+
+ * Errors if the `gmt_offset` field is empty (which is not the same as zero).
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.is_zero Rust documentation for `is_zero`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ is_gmt_offset_zero(): boolean | never;
+
+ /**
+
+ * Returns whether the `gmt_offset` field has nonzero minutes.
+
+ * Errors if the `gmt_offset` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.has_minutes Rust documentation for `has_minutes`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ gmt_offset_has_minutes(): boolean | never;
+
+ /**
+
+ * Returns whether the `gmt_offset` field has nonzero seconds.
+
+ * Errors if the `gmt_offset` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.has_seconds Rust documentation for `has_seconds`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ gmt_offset_has_seconds(): boolean | never;
+
+ /**
+
+ * Sets the `time_zone_id` field from a BCP-47 string.
+
+ * Errors if the string is not a valid BCP-47 time zone ID.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id Rust documentation for `time_zone_id`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ try_set_time_zone_id(id: string): void | never;
+
+ /**
+
+ * Sets the `time_zone_id` field from an IANA string by looking up the corresponding BCP-47 string.
+
+ * Errors if the string is not a valid BCP-47 time zone ID.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47MapperBorrowed.html#method.get Rust documentation for `get`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ try_set_iana_time_zone_id(mapper: ICU4XIanaToBcp47Mapper, id: string): void | never;
+
+ /**
+
+ * Clears the `time_zone_id` field.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id Rust documentation for `time_zone_id`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html 1}
+ */
+ clear_time_zone_id(): void;
+
+ /**
+
+ * Writes the value of the `time_zone_id` field as a string.
+
+ * Errors if the `time_zone_id` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id Rust documentation for `time_zone_id`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ time_zone_id(): string | never;
+
+ /**
+
+ * Sets the `metazone_id` field from a string.
+
+ * Errors if the string is not a valid BCP-47 metazone ID.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id Rust documentation for `metazone_id`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ try_set_metazone_id(id: string): void | never;
+
+ /**
+
+ * Clears the `metazone_id` field.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id Rust documentation for `metazone_id`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html 1}
+ */
+ clear_metazone_id(): void;
+
+ /**
+
+ * Writes the value of the `metazone_id` field as a string.
+
+ * Errors if the `metazone_id` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id Rust documentation for `metazone_id`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ metazone_id(): string | never;
+
+ /**
+
+ * Sets the `zone_variant` field from a string.
+
+ * Errors if the string is not a valid zone variant.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant Rust documentation for `zone_variant`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ try_set_zone_variant(id: string): void | never;
+
+ /**
+
+ * Clears the `zone_variant` field.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant Rust documentation for `zone_variant`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html 1}
+ */
+ clear_zone_variant(): void;
+
+ /**
+
+ * Writes the value of the `zone_variant` field as a string.
+
+ * Errors if the `zone_variant` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant Rust documentation for `zone_variant`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ zone_variant(): string | never;
+
+ /**
+
+ * Sets the `zone_variant` field to standard time.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.standard Rust documentation for `standard`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant 1}
+ */
+ set_standard_time(): void;
+
+ /**
+
+ * Sets the `zone_variant` field to daylight time.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.daylight Rust documentation for `daylight`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant 1}
+ */
+ set_daylight_time(): void;
+
+ /**
+
+ * Returns whether the `zone_variant` field is standard time.
+
+ * Errors if the `zone_variant` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.standard Rust documentation for `standard`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ is_standard_time(): boolean | never;
+
+ /**
+
+ * Returns whether the `zone_variant` field is daylight time.
+
+ * Errors if the `zone_variant` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.daylight Rust documentation for `daylight`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ is_daylight_time(): boolean | never;
+
+ /**
+
+ * Sets the metazone based on the time zone and the local timestamp.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.maybe_calculate_metazone Rust documentation for `maybe_calculate_metazone`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html#method.compute_metazone_from_time_zone 1}
+ */
+ maybe_calculate_metazone(metazone_calculator: ICU4XMetazoneCalculator, local_datetime: ICU4XIsoDateTime): void;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.js b/intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.js
new file mode 100644
index 0000000000..615f0b2ea8
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.js
@@ -0,0 +1,347 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCustomTimeZone_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCustomTimeZone_destroy(underlying);
+});
+
+export class ICU4XCustomTimeZone {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCustomTimeZone_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_from_string(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_create_from_string(diplomat_receive_buffer, buf_arg_s.ptr, buf_arg_s.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCustomTimeZone(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ static create_empty() {
+ return new ICU4XCustomTimeZone(wasm.ICU4XCustomTimeZone_create_empty(), true, []);
+ }
+
+ static create_utc() {
+ return new ICU4XCustomTimeZone(wasm.ICU4XCustomTimeZone_create_utc(), true, []);
+ }
+
+ try_set_gmt_offset_seconds(arg_offset_seconds) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_try_set_gmt_offset_seconds(diplomat_receive_buffer, this.underlying, arg_offset_seconds);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ clear_gmt_offset() {
+ wasm.ICU4XCustomTimeZone_clear_gmt_offset(this.underlying);
+ }
+
+ gmt_offset_seconds() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_gmt_offset_seconds(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = (new Int32Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ is_gmt_offset_positive() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_is_gmt_offset_positive(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = (new Uint8Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0] == 1;
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ is_gmt_offset_zero() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_is_gmt_offset_zero(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = (new Uint8Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0] == 1;
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ gmt_offset_has_minutes() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_gmt_offset_has_minutes(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = (new Uint8Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0] == 1;
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ gmt_offset_has_seconds() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_gmt_offset_has_seconds(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = (new Uint8Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0] == 1;
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ try_set_time_zone_id(arg_id) {
+ const buf_arg_id = diplomatRuntime.DiplomatBuf.str(wasm, arg_id);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_try_set_time_zone_id(diplomat_receive_buffer, this.underlying, buf_arg_id.ptr, buf_arg_id.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_id.free();
+ return diplomat_out;
+ }
+
+ try_set_iana_time_zone_id(arg_mapper, arg_id) {
+ const buf_arg_id = diplomatRuntime.DiplomatBuf.str(wasm, arg_id);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_try_set_iana_time_zone_id(diplomat_receive_buffer, this.underlying, arg_mapper.underlying, buf_arg_id.ptr, buf_arg_id.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_id.free();
+ return diplomat_out;
+ }
+
+ clear_time_zone_id() {
+ wasm.ICU4XCustomTimeZone_clear_time_zone_id(this.underlying);
+ }
+
+ time_zone_id() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_time_zone_id(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ try_set_metazone_id(arg_id) {
+ const buf_arg_id = diplomatRuntime.DiplomatBuf.str(wasm, arg_id);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_try_set_metazone_id(diplomat_receive_buffer, this.underlying, buf_arg_id.ptr, buf_arg_id.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_id.free();
+ return diplomat_out;
+ }
+
+ clear_metazone_id() {
+ wasm.ICU4XCustomTimeZone_clear_metazone_id(this.underlying);
+ }
+
+ metazone_id() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_metazone_id(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ try_set_zone_variant(arg_id) {
+ const buf_arg_id = diplomatRuntime.DiplomatBuf.str(wasm, arg_id);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_try_set_zone_variant(diplomat_receive_buffer, this.underlying, buf_arg_id.ptr, buf_arg_id.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_id.free();
+ return diplomat_out;
+ }
+
+ clear_zone_variant() {
+ wasm.ICU4XCustomTimeZone_clear_zone_variant(this.underlying);
+ }
+
+ zone_variant() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_zone_variant(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ set_standard_time() {
+ wasm.ICU4XCustomTimeZone_set_standard_time(this.underlying);
+ }
+
+ set_daylight_time() {
+ wasm.ICU4XCustomTimeZone_set_daylight_time(this.underlying);
+ }
+
+ is_standard_time() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_is_standard_time(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = (new Uint8Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0] == 1;
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ is_daylight_time() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_is_daylight_time(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = (new Uint8Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0] == 1;
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ maybe_calculate_metazone(arg_metazone_calculator, arg_local_datetime) {
+ wasm.ICU4XCustomTimeZone_maybe_calculate_metazone(this.underlying, arg_metazone_calculator.underlying, arg_local_datetime.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDataProvider.d.ts b/intl/icu_capi/js/package/lib/ICU4XDataProvider.d.ts
new file mode 100644
index 0000000000..88bc5902da
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDataProvider.d.ts
@@ -0,0 +1,100 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocaleFallbacker } from "./ICU4XLocaleFallbacker";
+
+/**
+
+ * An ICU4X data provider, capable of loading ICU4X data keys from some source.
+
+ * See the {@link https://docs.rs/icu_provider/latest/icu_provider/index.html Rust documentation for `icu_provider`} for more information.
+ */
+export class ICU4XDataProvider {
+
+ /**
+
+ * Constructs an {@link ICU4XDataProvider `ICU4XDataProvider`} that uses compiled data.
+
+ * Requires the `compiled_data` feature.
+
+ * This provider cannot be modified or combined with other providers, so `enable_fallback`, `enabled_fallback_with`, `fork_by_locale`, and `fork_by_key` will return `Err`s.
+ */
+ static create_compiled(): ICU4XDataProvider;
+
+ /**
+
+ * Constructs an `FsDataProvider` and returns it as an {@link ICU4XDataProvider `ICU4XDataProvider`}. Requires the `provider_fs` Cargo feature. Not supported in WASM.
+
+ * See the {@link https://docs.rs/icu_provider_fs/latest/icu_provider_fs/struct.FsDataProvider.html Rust documentation for `FsDataProvider`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_fs(path: string): ICU4XDataProvider | never;
+
+ /**
+
+ * Deprecated
+
+ * Use `create_compiled()`.
+ */
+ static create_test(): ICU4XDataProvider;
+
+ /**
+
+ * Constructs a `BlobDataProvider` and returns it as an {@link ICU4XDataProvider `ICU4XDataProvider`}.
+
+ * See the {@link https://docs.rs/icu_provider_blob/latest/icu_provider_blob/struct.BlobDataProvider.html Rust documentation for `BlobDataProvider`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_byte_slice(blob: Uint8Array): ICU4XDataProvider | never;
+
+ /**
+
+ * Constructs an empty {@link ICU4XDataProvider `ICU4XDataProvider`}.
+
+ * See the {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/empty/struct.EmptyDataProvider.html Rust documentation for `EmptyDataProvider`} for more information.
+ */
+ static create_empty(): ICU4XDataProvider;
+
+ /**
+
+ * Creates a provider that tries the current provider and then, if the current provider doesn't support the data key, another provider `other`.
+
+ * This takes ownership of the `other` provider, leaving an empty provider in its place.
+
+ * The providers must be the same type (Any or Buffer). This condition is satisfied if both providers originate from the same constructor, such as `create_from_byte_slice` or `create_fs`. If the condition is not upheld, a runtime error occurs.
+
+ * See the {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/type.ForkByKeyProvider.html Rust documentation for `ForkByKeyProvider`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ fork_by_key(other: ICU4XDataProvider): void | never;
+
+ /**
+
+ * Same as `fork_by_key` but forks by locale instead of key.
+
+ * See the {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/predicates/struct.MissingLocalePredicate.html Rust documentation for `MissingLocalePredicate`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ fork_by_locale(other: ICU4XDataProvider): void | never;
+
+ /**
+
+ * Enables locale fallbacking for data requests made to this provider.
+
+ * Note that the test provider (from `create_test`) already has fallbacking enabled.
+
+ * See the {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.try_new Rust documentation for `try_new`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ enable_locale_fallback(): void | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.new_with_fallbacker Rust documentation for `new_with_fallbacker`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ enable_locale_fallback_with(fallbacker: ICU4XLocaleFallbacker): void | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDataProvider.js b/intl/icu_capi/js/package/lib/ICU4XDataProvider.js
new file mode 100644
index 0000000000..93341c6d6f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDataProvider.js
@@ -0,0 +1,138 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XDataProvider_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XDataProvider_destroy(underlying);
+});
+
+export class ICU4XDataProvider {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XDataProvider_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_compiled() {
+ return new ICU4XDataProvider(wasm.ICU4XDataProvider_create_compiled(), true, []);
+ }
+
+ static create_fs(arg_path) {
+ const buf_arg_path = diplomatRuntime.DiplomatBuf.str(wasm, arg_path);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDataProvider_create_fs(diplomat_receive_buffer, buf_arg_path.ptr, buf_arg_path.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDataProvider(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_path.free();
+ return diplomat_out;
+ }
+
+ static create_test() {
+ return new ICU4XDataProvider(wasm.ICU4XDataProvider_create_test(), true, []);
+ }
+
+ static create_from_byte_slice(arg_blob) {
+ const buf_arg_blob = diplomatRuntime.DiplomatBuf.slice(wasm, arg_blob, 1);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDataProvider_create_from_byte_slice(diplomat_receive_buffer, buf_arg_blob.ptr, buf_arg_blob.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDataProvider(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_blob.leak();
+ return diplomat_out;
+ }
+
+ static create_empty() {
+ return new ICU4XDataProvider(wasm.ICU4XDataProvider_create_empty(), true, []);
+ }
+
+ fork_by_key(arg_other) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDataProvider_fork_by_key(diplomat_receive_buffer, this.underlying, arg_other.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ fork_by_locale(arg_other) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDataProvider_fork_by_locale(diplomat_receive_buffer, this.underlying, arg_other.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ enable_locale_fallback() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDataProvider_enable_locale_fallback(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ enable_locale_fallback_with(arg_fallbacker) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDataProvider_enable_locale_fallback_with(diplomat_receive_buffer, this.underlying, arg_fallbacker.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDataStruct.d.ts b/intl/icu_capi/js/package/lib/ICU4XDataStruct.d.ts
new file mode 100644
index 0000000000..8d2464f40e
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDataStruct.d.ts
@@ -0,0 +1,23 @@
+import { u8 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * A generic data struct to be used by ICU4X
+
+ * This can be used to construct a StructDataProvider.
+ */
+export class ICU4XDataStruct {
+
+ /**
+
+ * Construct a new DecimalSymbolsV1 data struct.
+
+ * C++ users: All string arguments must be valid UTF8
+
+ * See the {@link https://docs.rs/icu/latest/icu/decimal/provider/struct.DecimalSymbolsV1.html Rust documentation for `DecimalSymbolsV1`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_decimal_symbols_v1(plus_sign_prefix: string, plus_sign_suffix: string, minus_sign_prefix: string, minus_sign_suffix: string, decimal_separator: string, grouping_separator: string, primary_group_size: u8, secondary_group_size: u8, min_group_size: u8, digits: Uint32Array): ICU4XDataStruct | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDataStruct.js b/intl/icu_capi/js/package/lib/ICU4XDataStruct.js
new file mode 100644
index 0000000000..22bc10d69b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDataStruct.js
@@ -0,0 +1,50 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XDataStruct_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XDataStruct_destroy(underlying);
+});
+
+export class ICU4XDataStruct {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XDataStruct_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_decimal_symbols_v1(arg_plus_sign_prefix, arg_plus_sign_suffix, arg_minus_sign_prefix, arg_minus_sign_suffix, arg_decimal_separator, arg_grouping_separator, arg_primary_group_size, arg_secondary_group_size, arg_min_group_size, arg_digits) {
+ const buf_arg_plus_sign_prefix = diplomatRuntime.DiplomatBuf.str(wasm, arg_plus_sign_prefix);
+ const buf_arg_plus_sign_suffix = diplomatRuntime.DiplomatBuf.str(wasm, arg_plus_sign_suffix);
+ const buf_arg_minus_sign_prefix = diplomatRuntime.DiplomatBuf.str(wasm, arg_minus_sign_prefix);
+ const buf_arg_minus_sign_suffix = diplomatRuntime.DiplomatBuf.str(wasm, arg_minus_sign_suffix);
+ const buf_arg_decimal_separator = diplomatRuntime.DiplomatBuf.str(wasm, arg_decimal_separator);
+ const buf_arg_grouping_separator = diplomatRuntime.DiplomatBuf.str(wasm, arg_grouping_separator);
+ const buf_arg_digits = diplomatRuntime.DiplomatBuf.slice(wasm, arg_digits, 4);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDataStruct_create_decimal_symbols_v1(diplomat_receive_buffer, buf_arg_plus_sign_prefix.ptr, buf_arg_plus_sign_prefix.size, buf_arg_plus_sign_suffix.ptr, buf_arg_plus_sign_suffix.size, buf_arg_minus_sign_prefix.ptr, buf_arg_minus_sign_prefix.size, buf_arg_minus_sign_suffix.ptr, buf_arg_minus_sign_suffix.size, buf_arg_decimal_separator.ptr, buf_arg_decimal_separator.size, buf_arg_grouping_separator.ptr, buf_arg_grouping_separator.size, arg_primary_group_size, arg_secondary_group_size, arg_min_group_size, buf_arg_digits.ptr, buf_arg_digits.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDataStruct(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_plus_sign_prefix.free();
+ buf_arg_plus_sign_suffix.free();
+ buf_arg_minus_sign_prefix.free();
+ buf_arg_minus_sign_suffix.free();
+ buf_arg_decimal_separator.free();
+ buf_arg_grouping_separator.free();
+ buf_arg_digits.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDate.d.ts b/intl/icu_capi/js/package/lib/ICU4XDate.d.ts
new file mode 100644
index 0000000000..10c752d139
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDate.d.ts
@@ -0,0 +1,156 @@
+import { u8, u16, i32, u32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCalendar } from "./ICU4XCalendar";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDate } from "./ICU4XIsoDate";
+import { ICU4XIsoWeekday } from "./ICU4XIsoWeekday";
+import { ICU4XWeekCalculator } from "./ICU4XWeekCalculator";
+import { ICU4XWeekOf } from "./ICU4XWeekOf";
+
+/**
+
+ * An ICU4X Date object capable of containing a date and time for any calendar.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html Rust documentation for `Date`} for more information.
+ */
+export class ICU4XDate {
+
+ /**
+
+ * Creates a new {@link ICU4XDate `ICU4XDate`} representing the ISO date and time given but in a given calendar
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.new_from_iso Rust documentation for `new_from_iso`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_iso_in_calendar(year: i32, month: u8, day: u8, calendar: ICU4XCalendar): ICU4XDate | never;
+
+ /**
+
+ * Creates a new {@link ICU4XDate `ICU4XDate`} from the given codes, which are interpreted in the given calendar system
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_from_codes Rust documentation for `try_new_from_codes`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_codes_in_calendar(era_code: string, year: i32, month_code: string, day: u8, calendar: ICU4XCalendar): ICU4XDate | never;
+
+ /**
+
+ * Convert this date to one in a different calendar
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_calendar Rust documentation for `to_calendar`} for more information.
+ */
+ to_calendar(calendar: ICU4XCalendar): ICU4XDate;
+
+ /**
+
+ * Converts this date to ISO
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_iso Rust documentation for `to_iso`} for more information.
+ */
+ to_iso(): ICU4XIsoDate;
+
+ /**
+
+ * Returns the 1-indexed day in the month for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month Rust documentation for `day_of_month`} for more information.
+ */
+ day_of_month(): u32;
+
+ /**
+
+ * Returns the day in the week for this day
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week Rust documentation for `day_of_week`} for more information.
+ */
+ day_of_week(): ICU4XIsoWeekday;
+
+ /**
+
+ * Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ * `first_weekday` can be obtained via `first_weekday()` on {@link ICU4XWeekCalculator `ICU4XWeekCalculator`}
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month Rust documentation for `week_of_month`} for more information.
+ */
+ week_of_month(first_weekday: ICU4XIsoWeekday): u32;
+
+ /**
+
+ * Returns the week number in this year, using week data
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year Rust documentation for `week_of_year`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ week_of_year(calculator: ICU4XWeekCalculator): ICU4XWeekOf | never;
+
+ /**
+
+ * Returns 1-indexed number of the month of this date in its year
+
+ * Note that for lunar calendars this may not lead to the same month having the same ordinal month across years; use month_code if you care about month identity.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month Rust documentation for `month`} for more information.
+ */
+ ordinal_month(): u32;
+
+ /**
+
+ * Returns the month code for this date. Typically something like "M01", "M02", but can be more complicated for lunar calendars.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month Rust documentation for `month`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ month_code(): string | never;
+
+ /**
+
+ * Returns the year number in the current era for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year Rust documentation for `year`} for more information.
+ */
+ year_in_era(): i32;
+
+ /**
+
+ * Returns the era for this date,
+
+ * See the {@link https://docs.rs/icu/latest/icu/struct.Date.html#method.year Rust documentation for `year`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/types/struct.Era.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ era(): string | never;
+
+ /**
+
+ * Returns the number of months in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year Rust documentation for `months_in_year`} for more information.
+ */
+ months_in_year(): u8;
+
+ /**
+
+ * Returns the number of days in the month represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month Rust documentation for `days_in_month`} for more information.
+ */
+ days_in_month(): u8;
+
+ /**
+
+ * Returns the number of days in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year Rust documentation for `days_in_year`} for more information.
+ */
+ days_in_year(): u16;
+
+ /**
+
+ * Returns the {@link ICU4XCalendar `ICU4XCalendar`} object backing this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.calendar Rust documentation for `calendar`} for more information.
+ */
+ calendar(): ICU4XCalendar;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDate.js b/intl/icu_capi/js/package/lib/ICU4XDate.js
new file mode 100644
index 0000000000..de7b646eb0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDate.js
@@ -0,0 +1,161 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XCalendar } from "./ICU4XCalendar.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoDate } from "./ICU4XIsoDate.js"
+import { ICU4XIsoWeekday_js_to_rust, ICU4XIsoWeekday_rust_to_js } from "./ICU4XIsoWeekday.js"
+import { ICU4XWeekOf } from "./ICU4XWeekOf.js"
+import { ICU4XWeekRelativeUnit_js_to_rust, ICU4XWeekRelativeUnit_rust_to_js } from "./ICU4XWeekRelativeUnit.js"
+
+const ICU4XDate_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XDate_destroy(underlying);
+});
+
+export class ICU4XDate {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XDate_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_from_iso_in_calendar(arg_year, arg_month, arg_day, arg_calendar) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDate_create_from_iso_in_calendar(diplomat_receive_buffer, arg_year, arg_month, arg_day, arg_calendar.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDate(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_from_codes_in_calendar(arg_era_code, arg_year, arg_month_code, arg_day, arg_calendar) {
+ const buf_arg_era_code = diplomatRuntime.DiplomatBuf.str(wasm, arg_era_code);
+ const buf_arg_month_code = diplomatRuntime.DiplomatBuf.str(wasm, arg_month_code);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDate_create_from_codes_in_calendar(diplomat_receive_buffer, buf_arg_era_code.ptr, buf_arg_era_code.size, arg_year, buf_arg_month_code.ptr, buf_arg_month_code.size, arg_day, arg_calendar.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDate(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_era_code.free();
+ buf_arg_month_code.free();
+ return diplomat_out;
+ }
+
+ to_calendar(arg_calendar) {
+ return new ICU4XDate(wasm.ICU4XDate_to_calendar(this.underlying, arg_calendar.underlying), true, []);
+ }
+
+ to_iso() {
+ return new ICU4XIsoDate(wasm.ICU4XDate_to_iso(this.underlying), true, []);
+ }
+
+ day_of_month() {
+ return wasm.ICU4XDate_day_of_month(this.underlying);
+ }
+
+ day_of_week() {
+ return ICU4XIsoWeekday_rust_to_js[wasm.ICU4XDate_day_of_week(this.underlying)];
+ }
+
+ week_of_month(arg_first_weekday) {
+ return wasm.ICU4XDate_week_of_month(this.underlying, ICU4XIsoWeekday_js_to_rust[arg_first_weekday]);
+ }
+
+ week_of_year(arg_calculator) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(9, 4);
+ wasm.ICU4XDate_week_of_year(diplomat_receive_buffer, this.underlying, arg_calculator.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 8);
+ if (is_ok) {
+ const ok_value = new ICU4XWeekOf(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ ordinal_month() {
+ return wasm.ICU4XDate_ordinal_month(this.underlying);
+ }
+
+ month_code() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDate_month_code(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ year_in_era() {
+ return wasm.ICU4XDate_year_in_era(this.underlying);
+ }
+
+ era() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDate_era(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ months_in_year() {
+ return wasm.ICU4XDate_months_in_year(this.underlying);
+ }
+
+ days_in_month() {
+ return wasm.ICU4XDate_days_in_month(this.underlying);
+ }
+
+ days_in_year() {
+ return wasm.ICU4XDate_days_in_year(this.underlying);
+ }
+
+ calendar() {
+ return new ICU4XCalendar(wasm.ICU4XDate_calendar(this.underlying), true, []);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XDateFormatter.d.ts
new file mode 100644
index 0000000000..eb2dbb2c39
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateFormatter.d.ts
@@ -0,0 +1,67 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDate } from "./ICU4XDate";
+import { ICU4XDateLength } from "./ICU4XDateLength";
+import { ICU4XDateTime } from "./ICU4XDateTime";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDate } from "./ICU4XIsoDate";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * An ICU4X DateFormatter object capable of formatting a {@link ICU4XDate `ICU4XDate`} as a string, using some calendar specified at runtime in the locale.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html Rust documentation for `DateFormatter`} for more information.
+ */
+export class ICU4XDateFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XDateFormatter `ICU4XDateFormatter`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.try_new_with_length Rust documentation for `try_new_with_length`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength): ICU4XDateFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XDate `ICU4XDate`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_date(value: ICU4XDate): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDate `ICU4XIsoDate`} to a string.
+
+ * Will convert to this formatter's calendar first
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_date(value: ICU4XIsoDate): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XDateTime `ICU4XDateTime`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_datetime(value: ICU4XDateTime): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} to a string.
+
+ * Will convert to this formatter's calendar first
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_datetime(value: ICU4XIsoDateTime): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateFormatter.js b/intl/icu_capi/js/package/lib/ICU4XDateFormatter.js
new file mode 100644
index 0000000000..d48003362d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateFormatter.js
@@ -0,0 +1,112 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDateLength_js_to_rust, ICU4XDateLength_rust_to_js } from "./ICU4XDateLength.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XDateFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XDateFormatter_destroy(underlying);
+});
+
+export class ICU4XDateFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XDateFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_length(arg_provider, arg_locale, arg_date_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateFormatter_create_with_length(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_date_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDateFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_date(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateFormatter_format_date(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_iso_date(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateFormatter_format_iso_date(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateFormatter_format_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_iso_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateFormatter_format_iso_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateLength.d.ts b/intl/icu_capi/js/package/lib/ICU4XDateLength.d.ts
new file mode 100644
index 0000000000..1229c2ce09
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateLength.d.ts
@@ -0,0 +1,19 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/options/length/enum.Date.html Rust documentation for `Date`} for more information.
+ */
+export enum ICU4XDateLength {
+ /**
+ */
+ Full = 'Full',
+ /**
+ */
+ Long = 'Long',
+ /**
+ */
+ Medium = 'Medium',
+ /**
+ */
+ Short = 'Short',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateLength.js b/intl/icu_capi/js/package/lib/ICU4XDateLength.js
new file mode 100644
index 0000000000..bca6c2d8b8
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateLength.js
@@ -0,0 +1,23 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XDateLength_js_to_rust = {
+ "Full": 0,
+ "Long": 1,
+ "Medium": 2,
+ "Short": 3,
+};
+
+export const ICU4XDateLength_rust_to_js = {
+ [0]: "Full",
+ [1]: "Long",
+ [2]: "Medium",
+ [3]: "Short",
+};
+
+export const ICU4XDateLength = {
+ "Full": "Full",
+ "Long": "Long",
+ "Medium": "Medium",
+ "Short": "Short",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateTime.d.ts b/intl/icu_capi/js/package/lib/ICU4XDateTime.d.ts
new file mode 100644
index 0000000000..c930558206
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateTime.d.ts
@@ -0,0 +1,212 @@
+import { u8, u16, i32, u32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCalendar } from "./ICU4XCalendar";
+import { ICU4XDate } from "./ICU4XDate";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XIsoWeekday } from "./ICU4XIsoWeekday";
+import { ICU4XTime } from "./ICU4XTime";
+import { ICU4XWeekCalculator } from "./ICU4XWeekCalculator";
+import { ICU4XWeekOf } from "./ICU4XWeekOf";
+
+/**
+
+ * An ICU4X DateTime object capable of containing a date and time for any calendar.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html Rust documentation for `DateTime`} for more information.
+ */
+export class ICU4XDateTime {
+
+ /**
+
+ * Creates a new {@link ICU4XDateTime `ICU4XDateTime`} representing the ISO date and time given but in a given calendar
+
+ * See the {@link https://docs.rs/icu/latest/icu/struct.DateTime.html#method.new_from_iso Rust documentation for `new_from_iso`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_iso_in_calendar(year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8, nanosecond: u32, calendar: ICU4XCalendar): ICU4XDateTime | never;
+
+ /**
+
+ * Creates a new {@link ICU4XDateTime `ICU4XDateTime`} from the given codes, which are interpreted in the given calendar system
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_from_codes Rust documentation for `try_new_from_codes`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_codes_in_calendar(era_code: string, year: i32, month_code: string, day: u8, hour: u8, minute: u8, second: u8, nanosecond: u32, calendar: ICU4XCalendar): ICU4XDateTime | never;
+
+ /**
+
+ * Creates a new {@link ICU4XDateTime `ICU4XDateTime`} from an {@link ICU4XDate `ICU4XDate`} and {@link ICU4XTime `ICU4XTime`} object
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.new Rust documentation for `new`} for more information.
+ */
+ static create_from_date_and_time(date: ICU4XDate, time: ICU4XTime): ICU4XDateTime;
+
+ /**
+
+ * Gets a copy of the date contained in this object
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.date Rust documentation for `date`} for more information.
+ */
+ date(): ICU4XDate;
+
+ /**
+
+ * Gets the time contained in this object
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.time Rust documentation for `time`} for more information.
+ */
+ time(): ICU4XTime;
+
+ /**
+
+ * Converts this date to ISO
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_iso Rust documentation for `to_iso`} for more information.
+ */
+ to_iso(): ICU4XIsoDateTime;
+
+ /**
+
+ * Convert this datetime to one in a different calendar
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_calendar Rust documentation for `to_calendar`} for more information.
+ */
+ to_calendar(calendar: ICU4XCalendar): ICU4XDateTime;
+
+ /**
+
+ * Returns the hour in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour Rust documentation for `hour`} for more information.
+ */
+ hour(): u8;
+
+ /**
+
+ * Returns the minute in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute Rust documentation for `minute`} for more information.
+ */
+ minute(): u8;
+
+ /**
+
+ * Returns the second in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second Rust documentation for `second`} for more information.
+ */
+ second(): u8;
+
+ /**
+
+ * Returns the nanosecond in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond Rust documentation for `nanosecond`} for more information.
+ */
+ nanosecond(): u32;
+
+ /**
+
+ * Returns the 1-indexed day in the month for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month Rust documentation for `day_of_month`} for more information.
+ */
+ day_of_month(): u32;
+
+ /**
+
+ * Returns the day in the week for this day
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week Rust documentation for `day_of_week`} for more information.
+ */
+ day_of_week(): ICU4XIsoWeekday;
+
+ /**
+
+ * Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ * `first_weekday` can be obtained via `first_weekday()` on {@link ICU4XWeekCalculator `ICU4XWeekCalculator`}
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month Rust documentation for `week_of_month`} for more information.
+ */
+ week_of_month(first_weekday: ICU4XIsoWeekday): u32;
+
+ /**
+
+ * Returns the week number in this year, using week data
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year Rust documentation for `week_of_year`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ week_of_year(calculator: ICU4XWeekCalculator): ICU4XWeekOf | never;
+
+ /**
+
+ * Returns 1-indexed number of the month of this date in its year
+
+ * Note that for lunar calendars this may not lead to the same month having the same ordinal month across years; use month_code if you care about month identity.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month Rust documentation for `month`} for more information.
+ */
+ ordinal_month(): u32;
+
+ /**
+
+ * Returns the month code for this date. Typically something like "M01", "M02", but can be more complicated for lunar calendars.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month Rust documentation for `month`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ month_code(): string | never;
+
+ /**
+
+ * Returns the year number in the current era for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year Rust documentation for `year`} for more information.
+ */
+ year_in_era(): i32;
+
+ /**
+
+ * Returns the era for this date,
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year Rust documentation for `year`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ era(): string | never;
+
+ /**
+
+ * Returns the number of months in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year Rust documentation for `months_in_year`} for more information.
+ */
+ months_in_year(): u8;
+
+ /**
+
+ * Returns the number of days in the month represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month Rust documentation for `days_in_month`} for more information.
+ */
+ days_in_month(): u8;
+
+ /**
+
+ * Returns the number of days in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year Rust documentation for `days_in_year`} for more information.
+ */
+ days_in_year(): u16;
+
+ /**
+
+ * Returns the {@link ICU4XCalendar `ICU4XCalendar`} object backing this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.calendar Rust documentation for `calendar`} for more information.
+ */
+ calendar(): ICU4XCalendar;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateTime.js b/intl/icu_capi/js/package/lib/ICU4XDateTime.js
new file mode 100644
index 0000000000..3d0d3d910f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateTime.js
@@ -0,0 +1,191 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XCalendar } from "./ICU4XCalendar.js"
+import { ICU4XDate } from "./ICU4XDate.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime.js"
+import { ICU4XIsoWeekday_js_to_rust, ICU4XIsoWeekday_rust_to_js } from "./ICU4XIsoWeekday.js"
+import { ICU4XTime } from "./ICU4XTime.js"
+import { ICU4XWeekOf } from "./ICU4XWeekOf.js"
+import { ICU4XWeekRelativeUnit_js_to_rust, ICU4XWeekRelativeUnit_rust_to_js } from "./ICU4XWeekRelativeUnit.js"
+
+const ICU4XDateTime_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XDateTime_destroy(underlying);
+});
+
+export class ICU4XDateTime {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XDateTime_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_from_iso_in_calendar(arg_year, arg_month, arg_day, arg_hour, arg_minute, arg_second, arg_nanosecond, arg_calendar) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateTime_create_from_iso_in_calendar(diplomat_receive_buffer, arg_year, arg_month, arg_day, arg_hour, arg_minute, arg_second, arg_nanosecond, arg_calendar.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDateTime(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_from_codes_in_calendar(arg_era_code, arg_year, arg_month_code, arg_day, arg_hour, arg_minute, arg_second, arg_nanosecond, arg_calendar) {
+ const buf_arg_era_code = diplomatRuntime.DiplomatBuf.str(wasm, arg_era_code);
+ const buf_arg_month_code = diplomatRuntime.DiplomatBuf.str(wasm, arg_month_code);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateTime_create_from_codes_in_calendar(diplomat_receive_buffer, buf_arg_era_code.ptr, buf_arg_era_code.size, arg_year, buf_arg_month_code.ptr, buf_arg_month_code.size, arg_day, arg_hour, arg_minute, arg_second, arg_nanosecond, arg_calendar.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDateTime(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_era_code.free();
+ buf_arg_month_code.free();
+ return diplomat_out;
+ }
+
+ static create_from_date_and_time(arg_date, arg_time) {
+ return new ICU4XDateTime(wasm.ICU4XDateTime_create_from_date_and_time(arg_date.underlying, arg_time.underlying), true, []);
+ }
+
+ date() {
+ return new ICU4XDate(wasm.ICU4XDateTime_date(this.underlying), true, []);
+ }
+
+ time() {
+ return new ICU4XTime(wasm.ICU4XDateTime_time(this.underlying), true, []);
+ }
+
+ to_iso() {
+ return new ICU4XIsoDateTime(wasm.ICU4XDateTime_to_iso(this.underlying), true, []);
+ }
+
+ to_calendar(arg_calendar) {
+ return new ICU4XDateTime(wasm.ICU4XDateTime_to_calendar(this.underlying, arg_calendar.underlying), true, []);
+ }
+
+ hour() {
+ return wasm.ICU4XDateTime_hour(this.underlying);
+ }
+
+ minute() {
+ return wasm.ICU4XDateTime_minute(this.underlying);
+ }
+
+ second() {
+ return wasm.ICU4XDateTime_second(this.underlying);
+ }
+
+ nanosecond() {
+ return wasm.ICU4XDateTime_nanosecond(this.underlying);
+ }
+
+ day_of_month() {
+ return wasm.ICU4XDateTime_day_of_month(this.underlying);
+ }
+
+ day_of_week() {
+ return ICU4XIsoWeekday_rust_to_js[wasm.ICU4XDateTime_day_of_week(this.underlying)];
+ }
+
+ week_of_month(arg_first_weekday) {
+ return wasm.ICU4XDateTime_week_of_month(this.underlying, ICU4XIsoWeekday_js_to_rust[arg_first_weekday]);
+ }
+
+ week_of_year(arg_calculator) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(9, 4);
+ wasm.ICU4XDateTime_week_of_year(diplomat_receive_buffer, this.underlying, arg_calculator.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 8);
+ if (is_ok) {
+ const ok_value = new ICU4XWeekOf(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ ordinal_month() {
+ return wasm.ICU4XDateTime_ordinal_month(this.underlying);
+ }
+
+ month_code() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateTime_month_code(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ year_in_era() {
+ return wasm.ICU4XDateTime_year_in_era(this.underlying);
+ }
+
+ era() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateTime_era(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ months_in_year() {
+ return wasm.ICU4XDateTime_months_in_year(this.underlying);
+ }
+
+ days_in_month() {
+ return wasm.ICU4XDateTime_days_in_month(this.underlying);
+ }
+
+ days_in_year() {
+ return wasm.ICU4XDateTime_days_in_year(this.underlying);
+ }
+
+ calendar() {
+ return new ICU4XCalendar(wasm.ICU4XDateTime_calendar(this.underlying), true, []);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.d.ts
new file mode 100644
index 0000000000..579f5bfe8c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.d.ts
@@ -0,0 +1,46 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDateLength } from "./ICU4XDateLength";
+import { ICU4XDateTime } from "./ICU4XDateTime";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTimeLength } from "./ICU4XTimeLength";
+
+/**
+
+ * An ICU4X DateFormatter object capable of formatting a {@link ICU4XDateTime `ICU4XDateTime`} as a string, using some calendar specified at runtime in the locale.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html Rust documentation for `DateTimeFormatter`} for more information.
+ */
+export class ICU4XDateTimeFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XDateTimeFormatter `ICU4XDateTimeFormatter`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_lengths(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength, time_length: ICU4XTimeLength): ICU4XDateTimeFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XDateTime `ICU4XDateTime`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_datetime(value: ICU4XDateTime): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} to a string.
+
+ * Will convert to this formatter's calendar first
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_datetime(value: ICU4XIsoDateTime): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.js b/intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.js
new file mode 100644
index 0000000000..83bbbae72f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.js
@@ -0,0 +1,75 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDateLength_js_to_rust, ICU4XDateLength_rust_to_js } from "./ICU4XDateLength.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XTimeLength_js_to_rust, ICU4XTimeLength_rust_to_js } from "./ICU4XTimeLength.js"
+
+const ICU4XDateTimeFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XDateTimeFormatter_destroy(underlying);
+});
+
+export class ICU4XDateTimeFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XDateTimeFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_lengths(arg_provider, arg_locale, arg_date_length, arg_time_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateTimeFormatter_create_with_lengths(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_date_length], ICU4XTimeLength_js_to_rust[arg_time_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDateTimeFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateTimeFormatter_format_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_iso_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateTimeFormatter_format_iso_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDecomposed.d.ts b/intl/icu_capi/js/package/lib/ICU4XDecomposed.d.ts
new file mode 100644
index 0000000000..a95e7cbde8
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDecomposed.d.ts
@@ -0,0 +1,12 @@
+import { char } from "./diplomat-runtime"
+
+/**
+
+ * The outcome of non-recursive canonical decomposition of a character. `second` will be NUL when the decomposition expands to a single character (which may or may not be the original one)
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/enum.Decomposed.html Rust documentation for `Decomposed`} for more information.
+ */
+export class ICU4XDecomposed {
+ first: char;
+ second: char;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDecomposed.js b/intl/icu_capi/js/package/lib/ICU4XDecomposed.js
new file mode 100644
index 0000000000..8f5e80f5e4
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDecomposed.js
@@ -0,0 +1,9 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export class ICU4XDecomposed {
+ constructor(underlying) {
+ this.first = String.fromCharCode((new Uint32Array(wasm.memory.buffer, underlying, 1))[0]);
+ this.second = String.fromCharCode((new Uint32Array(wasm.memory.buffer, underlying + 4, 1))[0]);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.d.ts b/intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.d.ts
new file mode 100644
index 0000000000..d95fcc5273
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.d.ts
@@ -0,0 +1,49 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html Rust documentation for `DecomposingNormalizer`} for more information.
+ */
+export class ICU4XDecomposingNormalizer {
+
+ /**
+
+ * Construct a new ICU4XDecomposingNormalizer instance for NFC
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfd Rust documentation for `new_nfd`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_nfd(provider: ICU4XDataProvider): ICU4XDecomposingNormalizer | never;
+
+ /**
+
+ * Construct a new ICU4XDecomposingNormalizer instance for NFKC
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfkd Rust documentation for `new_nfkd`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_nfkd(provider: ICU4XDataProvider): ICU4XDecomposingNormalizer | never;
+
+ /**
+
+ * Normalize a (potentially ill-formed) UTF8 string
+
+ * Errors are mapped to REPLACEMENT CHARACTER
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.normalize_utf8 Rust documentation for `normalize_utf8`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ normalize(s: string): string | never;
+
+ /**
+
+ * Check if a (potentially ill-formed) UTF8 string is normalized
+
+ * Errors are mapped to REPLACEMENT CHARACTER
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.is_normalized_utf8 Rust documentation for `is_normalized_utf8`} for more information.
+ */
+ is_normalized(s: string): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.js b/intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.js
new file mode 100644
index 0000000000..e1357dbb2a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.js
@@ -0,0 +1,81 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XDecomposingNormalizer_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XDecomposingNormalizer_destroy(underlying);
+});
+
+export class ICU4XDecomposingNormalizer {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XDecomposingNormalizer_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_nfd(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDecomposingNormalizer_create_nfd(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDecomposingNormalizer(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_nfkd(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDecomposingNormalizer_create_nfkd(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDecomposingNormalizer(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ normalize(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDecomposingNormalizer_normalize(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ is_normalized(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = wasm.ICU4XDecomposingNormalizer_is_normalized(this.underlying, buf_arg_s.ptr, buf_arg_s.size);
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.d.ts b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.d.ts
new file mode 100644
index 0000000000..46f8452fb1
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.d.ts
@@ -0,0 +1,13 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/options/enum.Fallback.html Rust documentation for `Fallback`} for more information.
+ */
+export enum ICU4XDisplayNamesFallback {
+ /**
+ */
+ Code = 'Code',
+ /**
+ */
+ None = 'None',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.js b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.js
new file mode 100644
index 0000000000..aa7dc2d43f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.js
@@ -0,0 +1,17 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XDisplayNamesFallback_js_to_rust = {
+ "Code": 0,
+ "None": 1,
+};
+
+export const ICU4XDisplayNamesFallback_rust_to_js = {
+ [0]: "Code",
+ [1]: "None",
+};
+
+export const ICU4XDisplayNamesFallback = {
+ "Code": "Code",
+ "None": "None",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.d.ts b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.d.ts
new file mode 100644
index 0000000000..2f964d3439
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.d.ts
@@ -0,0 +1,13 @@
+import { ICU4XDisplayNamesFallback } from "./ICU4XDisplayNamesFallback";
+import { ICU4XDisplayNamesStyle } from "./ICU4XDisplayNamesStyle";
+import { ICU4XLanguageDisplay } from "./ICU4XLanguageDisplay";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/options/struct.DisplayNamesOptions.html Rust documentation for `DisplayNamesOptions`} for more information.
+ */
+export class ICU4XDisplayNamesOptionsV1 {
+ style: ICU4XDisplayNamesStyle;
+ fallback: ICU4XDisplayNamesFallback;
+ language_display: ICU4XLanguageDisplay;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.js b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.js
new file mode 100644
index 0000000000..eeaa0100b3
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.js
@@ -0,0 +1,13 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDisplayNamesFallback_js_to_rust, ICU4XDisplayNamesFallback_rust_to_js } from "./ICU4XDisplayNamesFallback.js"
+import { ICU4XDisplayNamesStyle_js_to_rust, ICU4XDisplayNamesStyle_rust_to_js } from "./ICU4XDisplayNamesStyle.js"
+import { ICU4XLanguageDisplay_js_to_rust, ICU4XLanguageDisplay_rust_to_js } from "./ICU4XLanguageDisplay.js"
+
+export class ICU4XDisplayNamesOptionsV1 {
+ constructor(underlying) {
+ this.style = ICU4XDisplayNamesStyle_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying)];
+ this.fallback = ICU4XDisplayNamesFallback_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 4)];
+ this.language_display = ICU4XLanguageDisplay_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 8)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.d.ts b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.d.ts
new file mode 100644
index 0000000000..5f92c6e961
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.d.ts
@@ -0,0 +1,22 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/options/enum.Style.html Rust documentation for `Style`} for more information.
+ */
+export enum ICU4XDisplayNamesStyle {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Narrow = 'Narrow',
+ /**
+ */
+ Short = 'Short',
+ /**
+ */
+ Long = 'Long',
+ /**
+ */
+ Menu = 'Menu',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.js b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.js
new file mode 100644
index 0000000000..9bb3464229
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.js
@@ -0,0 +1,26 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XDisplayNamesStyle_js_to_rust = {
+ "Auto": 0,
+ "Narrow": 1,
+ "Short": 2,
+ "Long": 3,
+ "Menu": 4,
+};
+
+export const ICU4XDisplayNamesStyle_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Narrow",
+ [2]: "Short",
+ [3]: "Long",
+ [4]: "Menu",
+};
+
+export const ICU4XDisplayNamesStyle = {
+ "Auto": "Auto",
+ "Narrow": "Narrow",
+ "Short": "Short",
+ "Long": "Long",
+ "Menu": "Menu",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XError.d.ts b/intl/icu_capi/js/package/lib/ICU4XError.d.ts
new file mode 100644
index 0000000000..882c7c6c55
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XError.d.ts
@@ -0,0 +1,186 @@
+
+/**
+
+ * A common enum for errors that ICU4X may return, organized by API
+
+ * The error names are stable and can be checked against as strings in the JS API
+
+ * Additional information: {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FixedDecimalError.html 1}, {@link https://docs.rs/icu/latest/icu/calendar/enum.CalendarError.html 2}, {@link https://docs.rs/icu/latest/icu/collator/enum.CollatorError.html 3}, {@link https://docs.rs/icu/latest/icu/datetime/enum.DateTimeError.html 4}, {@link https://docs.rs/icu/latest/icu/decimal/enum.DecimalError.html 5}, {@link https://docs.rs/icu/latest/icu/list/enum.ListError.html 6}, {@link https://docs.rs/icu/latest/icu/locid/enum.ParserError.html 7}, {@link https://docs.rs/icu/latest/icu/locid_transform/enum.LocaleTransformError.html 8}, {@link https://docs.rs/icu/latest/icu/normalizer/enum.NormalizerError.html 9}, {@link https://docs.rs/icu/latest/icu/plurals/enum.PluralsError.html 10}, {@link https://docs.rs/icu/latest/icu/properties/enum.PropertiesError.html 11}, {@link https://docs.rs/icu/latest/icu/provider/struct.DataError.html 12}, {@link https://docs.rs/icu/latest/icu/provider/enum.DataErrorKind.html 13}, {@link https://docs.rs/icu/latest/icu/segmenter/enum.SegmenterError.html 14}, {@link https://docs.rs/icu/latest/icu/timezone/enum.TimeZoneError.html 15}
+ */
+export enum ICU4XError {
+ /**
+
+ * The error is not currently categorized as ICU4XError. Please file a bug
+ */
+ UnknownError = 'UnknownError',
+ /**
+
+ * An error arising from writing to a string Typically found when not enough space is allocated Most APIs that return a string may return this error
+ */
+ WriteableError = 'WriteableError',
+ /**
+ */
+ OutOfBoundsError = 'OutOfBoundsError',
+ /**
+ */
+ DataMissingDataKeyError = 'DataMissingDataKeyError',
+ /**
+ */
+ DataMissingVariantError = 'DataMissingVariantError',
+ /**
+ */
+ DataMissingLocaleError = 'DataMissingLocaleError',
+ /**
+ */
+ DataNeedsVariantError = 'DataNeedsVariantError',
+ /**
+ */
+ DataNeedsLocaleError = 'DataNeedsLocaleError',
+ /**
+ */
+ DataExtraneousLocaleError = 'DataExtraneousLocaleError',
+ /**
+ */
+ DataFilteredResourceError = 'DataFilteredResourceError',
+ /**
+ */
+ DataMismatchedTypeError = 'DataMismatchedTypeError',
+ /**
+ */
+ DataMissingPayloadError = 'DataMissingPayloadError',
+ /**
+ */
+ DataInvalidStateError = 'DataInvalidStateError',
+ /**
+ */
+ DataCustomError = 'DataCustomError',
+ /**
+ */
+ DataIoError = 'DataIoError',
+ /**
+ */
+ DataUnavailableBufferFormatError = 'DataUnavailableBufferFormatError',
+ /**
+ */
+ DataMismatchedAnyBufferError = 'DataMismatchedAnyBufferError',
+ /**
+
+ * The subtag being requested was not set
+ */
+ LocaleUndefinedSubtagError = 'LocaleUndefinedSubtagError',
+ /**
+
+ * The locale or subtag string failed to parse
+ */
+ LocaleParserLanguageError = 'LocaleParserLanguageError',
+ /**
+ */
+ LocaleParserSubtagError = 'LocaleParserSubtagError',
+ /**
+ */
+ LocaleParserExtensionError = 'LocaleParserExtensionError',
+ /**
+
+ * Attempted to construct an invalid data struct
+ */
+ DataStructValidityError = 'DataStructValidityError',
+ /**
+ */
+ PropertyUnknownScriptIdError = 'PropertyUnknownScriptIdError',
+ /**
+ */
+ PropertyUnknownGeneralCategoryGroupError = 'PropertyUnknownGeneralCategoryGroupError',
+ /**
+ */
+ PropertyUnexpectedPropertyNameError = 'PropertyUnexpectedPropertyNameError',
+ /**
+ */
+ FixedDecimalLimitError = 'FixedDecimalLimitError',
+ /**
+ */
+ FixedDecimalSyntaxError = 'FixedDecimalSyntaxError',
+ /**
+ */
+ PluralsParserError = 'PluralsParserError',
+ /**
+ */
+ CalendarParseError = 'CalendarParseError',
+ /**
+ */
+ CalendarOverflowError = 'CalendarOverflowError',
+ /**
+ */
+ CalendarUnderflowError = 'CalendarUnderflowError',
+ /**
+ */
+ CalendarOutOfRangeError = 'CalendarOutOfRangeError',
+ /**
+ */
+ CalendarUnknownEraError = 'CalendarUnknownEraError',
+ /**
+ */
+ CalendarUnknownMonthCodeError = 'CalendarUnknownMonthCodeError',
+ /**
+ */
+ CalendarMissingInputError = 'CalendarMissingInputError',
+ /**
+ */
+ CalendarUnknownKindError = 'CalendarUnknownKindError',
+ /**
+ */
+ CalendarMissingError = 'CalendarMissingError',
+ /**
+ */
+ DateTimePatternError = 'DateTimePatternError',
+ /**
+ */
+ DateTimeMissingInputFieldError = 'DateTimeMissingInputFieldError',
+ /**
+ */
+ DateTimeSkeletonError = 'DateTimeSkeletonError',
+ /**
+ */
+ DateTimeUnsupportedFieldError = 'DateTimeUnsupportedFieldError',
+ /**
+ */
+ DateTimeUnsupportedOptionsError = 'DateTimeUnsupportedOptionsError',
+ /**
+ */
+ DateTimeMissingWeekdaySymbolError = 'DateTimeMissingWeekdaySymbolError',
+ /**
+ */
+ DateTimeMissingMonthSymbolError = 'DateTimeMissingMonthSymbolError',
+ /**
+ */
+ DateTimeFixedDecimalError = 'DateTimeFixedDecimalError',
+ /**
+ */
+ DateTimeMismatchedCalendarError = 'DateTimeMismatchedCalendarError',
+ /**
+ */
+ TinyStrTooLargeError = 'TinyStrTooLargeError',
+ /**
+ */
+ TinyStrContainsNullError = 'TinyStrContainsNullError',
+ /**
+ */
+ TinyStrNonAsciiError = 'TinyStrNonAsciiError',
+ /**
+ */
+ TimeZoneOffsetOutOfBoundsError = 'TimeZoneOffsetOutOfBoundsError',
+ /**
+ */
+ TimeZoneInvalidOffsetError = 'TimeZoneInvalidOffsetError',
+ /**
+ */
+ TimeZoneMissingInputError = 'TimeZoneMissingInputError',
+ /**
+ */
+ TimeZoneInvalidIdError = 'TimeZoneInvalidIdError',
+ /**
+ */
+ NormalizerFutureExtensionError = 'NormalizerFutureExtensionError',
+ /**
+ */
+ NormalizerValidationError = 'NormalizerValidationError',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XError.js b/intl/icu_capi/js/package/lib/ICU4XError.js
new file mode 100644
index 0000000000..af57602310
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XError.js
@@ -0,0 +1,176 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XError_js_to_rust = {
+ "UnknownError": 0,
+ "WriteableError": 1,
+ "OutOfBoundsError": 2,
+ "DataMissingDataKeyError": 256,
+ "DataMissingVariantError": 257,
+ "DataMissingLocaleError": 258,
+ "DataNeedsVariantError": 259,
+ "DataNeedsLocaleError": 260,
+ "DataExtraneousLocaleError": 261,
+ "DataFilteredResourceError": 262,
+ "DataMismatchedTypeError": 263,
+ "DataMissingPayloadError": 264,
+ "DataInvalidStateError": 265,
+ "DataCustomError": 266,
+ "DataIoError": 267,
+ "DataUnavailableBufferFormatError": 268,
+ "DataMismatchedAnyBufferError": 269,
+ "LocaleUndefinedSubtagError": 512,
+ "LocaleParserLanguageError": 513,
+ "LocaleParserSubtagError": 514,
+ "LocaleParserExtensionError": 515,
+ "DataStructValidityError": 768,
+ "PropertyUnknownScriptIdError": 1024,
+ "PropertyUnknownGeneralCategoryGroupError": 1025,
+ "PropertyUnexpectedPropertyNameError": 1026,
+ "FixedDecimalLimitError": 1280,
+ "FixedDecimalSyntaxError": 1281,
+ "PluralsParserError": 1536,
+ "CalendarParseError": 1792,
+ "CalendarOverflowError": 1793,
+ "CalendarUnderflowError": 1794,
+ "CalendarOutOfRangeError": 1795,
+ "CalendarUnknownEraError": 1796,
+ "CalendarUnknownMonthCodeError": 1797,
+ "CalendarMissingInputError": 1798,
+ "CalendarUnknownKindError": 1799,
+ "CalendarMissingError": 1800,
+ "DateTimePatternError": 2048,
+ "DateTimeMissingInputFieldError": 2049,
+ "DateTimeSkeletonError": 2050,
+ "DateTimeUnsupportedFieldError": 2051,
+ "DateTimeUnsupportedOptionsError": 2052,
+ "DateTimeMissingWeekdaySymbolError": 2053,
+ "DateTimeMissingMonthSymbolError": 2054,
+ "DateTimeFixedDecimalError": 2055,
+ "DateTimeMismatchedCalendarError": 2056,
+ "TinyStrTooLargeError": 2304,
+ "TinyStrContainsNullError": 2305,
+ "TinyStrNonAsciiError": 2306,
+ "TimeZoneOffsetOutOfBoundsError": 2560,
+ "TimeZoneInvalidOffsetError": 2561,
+ "TimeZoneMissingInputError": 2562,
+ "TimeZoneInvalidIdError": 2563,
+ "NormalizerFutureExtensionError": 2816,
+ "NormalizerValidationError": 2817,
+};
+
+export const ICU4XError_rust_to_js = {
+ [0]: "UnknownError",
+ [1]: "WriteableError",
+ [2]: "OutOfBoundsError",
+ [256]: "DataMissingDataKeyError",
+ [257]: "DataMissingVariantError",
+ [258]: "DataMissingLocaleError",
+ [259]: "DataNeedsVariantError",
+ [260]: "DataNeedsLocaleError",
+ [261]: "DataExtraneousLocaleError",
+ [262]: "DataFilteredResourceError",
+ [263]: "DataMismatchedTypeError",
+ [264]: "DataMissingPayloadError",
+ [265]: "DataInvalidStateError",
+ [266]: "DataCustomError",
+ [267]: "DataIoError",
+ [268]: "DataUnavailableBufferFormatError",
+ [269]: "DataMismatchedAnyBufferError",
+ [512]: "LocaleUndefinedSubtagError",
+ [513]: "LocaleParserLanguageError",
+ [514]: "LocaleParserSubtagError",
+ [515]: "LocaleParserExtensionError",
+ [768]: "DataStructValidityError",
+ [1024]: "PropertyUnknownScriptIdError",
+ [1025]: "PropertyUnknownGeneralCategoryGroupError",
+ [1026]: "PropertyUnexpectedPropertyNameError",
+ [1280]: "FixedDecimalLimitError",
+ [1281]: "FixedDecimalSyntaxError",
+ [1536]: "PluralsParserError",
+ [1792]: "CalendarParseError",
+ [1793]: "CalendarOverflowError",
+ [1794]: "CalendarUnderflowError",
+ [1795]: "CalendarOutOfRangeError",
+ [1796]: "CalendarUnknownEraError",
+ [1797]: "CalendarUnknownMonthCodeError",
+ [1798]: "CalendarMissingInputError",
+ [1799]: "CalendarUnknownKindError",
+ [1800]: "CalendarMissingError",
+ [2048]: "DateTimePatternError",
+ [2049]: "DateTimeMissingInputFieldError",
+ [2050]: "DateTimeSkeletonError",
+ [2051]: "DateTimeUnsupportedFieldError",
+ [2052]: "DateTimeUnsupportedOptionsError",
+ [2053]: "DateTimeMissingWeekdaySymbolError",
+ [2054]: "DateTimeMissingMonthSymbolError",
+ [2055]: "DateTimeFixedDecimalError",
+ [2056]: "DateTimeMismatchedCalendarError",
+ [2304]: "TinyStrTooLargeError",
+ [2305]: "TinyStrContainsNullError",
+ [2306]: "TinyStrNonAsciiError",
+ [2560]: "TimeZoneOffsetOutOfBoundsError",
+ [2561]: "TimeZoneInvalidOffsetError",
+ [2562]: "TimeZoneMissingInputError",
+ [2563]: "TimeZoneInvalidIdError",
+ [2816]: "NormalizerFutureExtensionError",
+ [2817]: "NormalizerValidationError",
+};
+
+export const ICU4XError = {
+ "UnknownError": "UnknownError",
+ "WriteableError": "WriteableError",
+ "OutOfBoundsError": "OutOfBoundsError",
+ "DataMissingDataKeyError": "DataMissingDataKeyError",
+ "DataMissingVariantError": "DataMissingVariantError",
+ "DataMissingLocaleError": "DataMissingLocaleError",
+ "DataNeedsVariantError": "DataNeedsVariantError",
+ "DataNeedsLocaleError": "DataNeedsLocaleError",
+ "DataExtraneousLocaleError": "DataExtraneousLocaleError",
+ "DataFilteredResourceError": "DataFilteredResourceError",
+ "DataMismatchedTypeError": "DataMismatchedTypeError",
+ "DataMissingPayloadError": "DataMissingPayloadError",
+ "DataInvalidStateError": "DataInvalidStateError",
+ "DataCustomError": "DataCustomError",
+ "DataIoError": "DataIoError",
+ "DataUnavailableBufferFormatError": "DataUnavailableBufferFormatError",
+ "DataMismatchedAnyBufferError": "DataMismatchedAnyBufferError",
+ "LocaleUndefinedSubtagError": "LocaleUndefinedSubtagError",
+ "LocaleParserLanguageError": "LocaleParserLanguageError",
+ "LocaleParserSubtagError": "LocaleParserSubtagError",
+ "LocaleParserExtensionError": "LocaleParserExtensionError",
+ "DataStructValidityError": "DataStructValidityError",
+ "PropertyUnknownScriptIdError": "PropertyUnknownScriptIdError",
+ "PropertyUnknownGeneralCategoryGroupError": "PropertyUnknownGeneralCategoryGroupError",
+ "PropertyUnexpectedPropertyNameError": "PropertyUnexpectedPropertyNameError",
+ "FixedDecimalLimitError": "FixedDecimalLimitError",
+ "FixedDecimalSyntaxError": "FixedDecimalSyntaxError",
+ "PluralsParserError": "PluralsParserError",
+ "CalendarParseError": "CalendarParseError",
+ "CalendarOverflowError": "CalendarOverflowError",
+ "CalendarUnderflowError": "CalendarUnderflowError",
+ "CalendarOutOfRangeError": "CalendarOutOfRangeError",
+ "CalendarUnknownEraError": "CalendarUnknownEraError",
+ "CalendarUnknownMonthCodeError": "CalendarUnknownMonthCodeError",
+ "CalendarMissingInputError": "CalendarMissingInputError",
+ "CalendarUnknownKindError": "CalendarUnknownKindError",
+ "CalendarMissingError": "CalendarMissingError",
+ "DateTimePatternError": "DateTimePatternError",
+ "DateTimeMissingInputFieldError": "DateTimeMissingInputFieldError",
+ "DateTimeSkeletonError": "DateTimeSkeletonError",
+ "DateTimeUnsupportedFieldError": "DateTimeUnsupportedFieldError",
+ "DateTimeUnsupportedOptionsError": "DateTimeUnsupportedOptionsError",
+ "DateTimeMissingWeekdaySymbolError": "DateTimeMissingWeekdaySymbolError",
+ "DateTimeMissingMonthSymbolError": "DateTimeMissingMonthSymbolError",
+ "DateTimeFixedDecimalError": "DateTimeFixedDecimalError",
+ "DateTimeMismatchedCalendarError": "DateTimeMismatchedCalendarError",
+ "TinyStrTooLargeError": "TinyStrTooLargeError",
+ "TinyStrContainsNullError": "TinyStrContainsNullError",
+ "TinyStrNonAsciiError": "TinyStrNonAsciiError",
+ "TimeZoneOffsetOutOfBoundsError": "TimeZoneOffsetOutOfBoundsError",
+ "TimeZoneInvalidOffsetError": "TimeZoneInvalidOffsetError",
+ "TimeZoneMissingInputError": "TimeZoneMissingInputError",
+ "TimeZoneInvalidIdError": "TimeZoneInvalidIdError",
+ "NormalizerFutureExtensionError": "NormalizerFutureExtensionError",
+ "NormalizerValidationError": "NormalizerValidationError",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimal.d.ts b/intl/icu_capi/js/package/lib/ICU4XFixedDecimal.d.ts
new file mode 100644
index 0000000000..dfa978cbfd
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimal.d.ts
@@ -0,0 +1,272 @@
+import { u8, i16, i32, u32, i64, u64, f64 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XFixedDecimalSign } from "./ICU4XFixedDecimalSign";
+import { ICU4XFixedDecimalSignDisplay } from "./ICU4XFixedDecimalSignDisplay";
+
+/**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html Rust documentation for `FixedDecimal`} for more information.
+ */
+export class ICU4XFixedDecimal {
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an integer.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html Rust documentation for `FixedDecimal`} for more information.
+ */
+ static create_from_i32(v: i32): ICU4XFixedDecimal;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an integer.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html Rust documentation for `FixedDecimal`} for more information.
+ */
+ static create_from_u32(v: u32): ICU4XFixedDecimal;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an integer.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html Rust documentation for `FixedDecimal`} for more information.
+ */
+ static create_from_i64(v: i64): ICU4XFixedDecimal;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an integer.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html Rust documentation for `FixedDecimal`} for more information.
+ */
+ static create_from_u64(v: u64): ICU4XFixedDecimal;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an integer-valued float
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64 Rust documentation for `try_from_f64`} for more information.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html Rust documentation for `FloatPrecision`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_f64_with_integer_precision(f: f64): ICU4XFixedDecimal | never;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an float, with a given power of 10 for the lower magnitude
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64 Rust documentation for `try_from_f64`} for more information.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html Rust documentation for `FloatPrecision`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_f64_with_lower_magnitude(f: f64, magnitude: i16): ICU4XFixedDecimal | never;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an float, for a given number of significant digits
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64 Rust documentation for `try_from_f64`} for more information.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html Rust documentation for `FloatPrecision`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_f64_with_significant_digits(f: f64, digits: u8): ICU4XFixedDecimal | never;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an float, with enough digits to recover the original floating point in IEEE 754 without needing trailing zeros
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64 Rust documentation for `try_from_f64`} for more information.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html Rust documentation for `FloatPrecision`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_f64_with_floating_precision(f: f64): ICU4XFixedDecimal | never;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from a string.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.from_str Rust documentation for `from_str`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_string(v: string): ICU4XFixedDecimal | never;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.digit_at Rust documentation for `digit_at`} for more information.
+ */
+ digit_at(magnitude: i16): u8;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.magnitude_range Rust documentation for `magnitude_range`} for more information.
+ */
+ magnitude_start(): i16;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.magnitude_range Rust documentation for `magnitude_range`} for more information.
+ */
+ magnitude_end(): i16;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.nonzero_magnitude_start Rust documentation for `nonzero_magnitude_start`} for more information.
+ */
+ nonzero_magnitude_start(): i16;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.nonzero_magnitude_end Rust documentation for `nonzero_magnitude_end`} for more information.
+ */
+ nonzero_magnitude_end(): i16;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.is_zero Rust documentation for `is_zero`} for more information.
+ */
+ is_zero(): boolean;
+
+ /**
+
+ * Multiply the {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} by a given power of ten.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.multiply_pow10 Rust documentation for `multiply_pow10`} for more information.
+ */
+ multiply_pow10(power: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.sign Rust documentation for `sign`} for more information.
+ */
+ sign(): ICU4XFixedDecimalSign;
+
+ /**
+
+ * Set the sign of the {@link ICU4XFixedDecimal `ICU4XFixedDecimal`}.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.set_sign Rust documentation for `set_sign`} for more information.
+ */
+ set_sign(sign: ICU4XFixedDecimalSign): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.apply_sign_display Rust documentation for `apply_sign_display`} for more information.
+ */
+ apply_sign_display(sign_display: ICU4XFixedDecimalSignDisplay): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trim_start Rust documentation for `trim_start`} for more information.
+ */
+ trim_start(): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trim_end Rust documentation for `trim_end`} for more information.
+ */
+ trim_end(): void;
+
+ /**
+
+ * Zero-pad the {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} on the left to a particular position
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.pad_start Rust documentation for `pad_start`} for more information.
+ */
+ pad_start(position: i16): void;
+
+ /**
+
+ * Zero-pad the {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} on the right to a particular position
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.pad_end Rust documentation for `pad_end`} for more information.
+ */
+ pad_end(position: i16): void;
+
+ /**
+
+ * Truncate the {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} on the left to a particular position, deleting digits if necessary. This is useful for, e.g. abbreviating years ("2022" -> "22")
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.set_max_position Rust documentation for `set_max_position`} for more information.
+ */
+ set_max_position(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trunc Rust documentation for `trunc`} for more information.
+ */
+ trunc(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_trunc Rust documentation for `half_trunc`} for more information.
+ */
+ half_trunc(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.expand Rust documentation for `expand`} for more information.
+ */
+ expand(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_expand Rust documentation for `half_expand`} for more information.
+ */
+ half_expand(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.ceil Rust documentation for `ceil`} for more information.
+ */
+ ceil(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_ceil Rust documentation for `half_ceil`} for more information.
+ */
+ half_ceil(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.floor Rust documentation for `floor`} for more information.
+ */
+ floor(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_floor Rust documentation for `half_floor`} for more information.
+ */
+ half_floor(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_even Rust documentation for `half_even`} for more information.
+ */
+ half_even(position: i16): void;
+
+ /**
+
+ * Concatenates `other` to the end of `self`.
+
+ * If successful, `other` will be set to 0 and a successful status is returned.
+
+ * If not successful, `other` will be unchanged and an error is returned.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.concatenate_end Rust documentation for `concatenate_end`} for more information.
+ * @throws {@link FFIError}<void>
+ */
+ concatenate_end(other: ICU4XFixedDecimal): void | never;
+
+ /**
+
+ * Format the {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} as a string.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.write_to Rust documentation for `write_to`} for more information.
+ */
+ to_string(): string;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimal.js b/intl/icu_capi/js/package/lib/ICU4XFixedDecimal.js
new file mode 100644
index 0000000000..e517bc9f48
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimal.js
@@ -0,0 +1,235 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XFixedDecimalSign_js_to_rust, ICU4XFixedDecimalSign_rust_to_js } from "./ICU4XFixedDecimalSign.js"
+import { ICU4XFixedDecimalSignDisplay_js_to_rust, ICU4XFixedDecimalSignDisplay_rust_to_js } from "./ICU4XFixedDecimalSignDisplay.js"
+
+const ICU4XFixedDecimal_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XFixedDecimal_destroy(underlying);
+});
+
+export class ICU4XFixedDecimal {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XFixedDecimal_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_from_i32(arg_v) {
+ return new ICU4XFixedDecimal(wasm.ICU4XFixedDecimal_create_from_i32(arg_v), true, []);
+ }
+
+ static create_from_u32(arg_v) {
+ return new ICU4XFixedDecimal(wasm.ICU4XFixedDecimal_create_from_u32(arg_v), true, []);
+ }
+
+ static create_from_i64(arg_v) {
+ return new ICU4XFixedDecimal(wasm.ICU4XFixedDecimal_create_from_i64(arg_v), true, []);
+ }
+
+ static create_from_u64(arg_v) {
+ return new ICU4XFixedDecimal(wasm.ICU4XFixedDecimal_create_from_u64(arg_v), true, []);
+ }
+
+ static create_from_f64_with_integer_precision(arg_f) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimal_create_from_f64_with_integer_precision(diplomat_receive_buffer, arg_f);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XFixedDecimal(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_from_f64_with_lower_magnitude(arg_f, arg_magnitude) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimal_create_from_f64_with_lower_magnitude(diplomat_receive_buffer, arg_f, arg_magnitude);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XFixedDecimal(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_from_f64_with_significant_digits(arg_f, arg_digits) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimal_create_from_f64_with_significant_digits(diplomat_receive_buffer, arg_f, arg_digits);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XFixedDecimal(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_from_f64_with_floating_precision(arg_f) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimal_create_from_f64_with_floating_precision(diplomat_receive_buffer, arg_f);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XFixedDecimal(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_from_string(arg_v) {
+ const buf_arg_v = diplomatRuntime.DiplomatBuf.str(wasm, arg_v);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimal_create_from_string(diplomat_receive_buffer, buf_arg_v.ptr, buf_arg_v.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XFixedDecimal(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_v.free();
+ return diplomat_out;
+ }
+
+ digit_at(arg_magnitude) {
+ return wasm.ICU4XFixedDecimal_digit_at(this.underlying, arg_magnitude);
+ }
+
+ magnitude_start() {
+ return wasm.ICU4XFixedDecimal_magnitude_start(this.underlying);
+ }
+
+ magnitude_end() {
+ return wasm.ICU4XFixedDecimal_magnitude_end(this.underlying);
+ }
+
+ nonzero_magnitude_start() {
+ return wasm.ICU4XFixedDecimal_nonzero_magnitude_start(this.underlying);
+ }
+
+ nonzero_magnitude_end() {
+ return wasm.ICU4XFixedDecimal_nonzero_magnitude_end(this.underlying);
+ }
+
+ is_zero() {
+ return wasm.ICU4XFixedDecimal_is_zero(this.underlying);
+ }
+
+ multiply_pow10(arg_power) {
+ wasm.ICU4XFixedDecimal_multiply_pow10(this.underlying, arg_power);
+ }
+
+ sign() {
+ return ICU4XFixedDecimalSign_rust_to_js[wasm.ICU4XFixedDecimal_sign(this.underlying)];
+ }
+
+ set_sign(arg_sign) {
+ wasm.ICU4XFixedDecimal_set_sign(this.underlying, ICU4XFixedDecimalSign_js_to_rust[arg_sign]);
+ }
+
+ apply_sign_display(arg_sign_display) {
+ wasm.ICU4XFixedDecimal_apply_sign_display(this.underlying, ICU4XFixedDecimalSignDisplay_js_to_rust[arg_sign_display]);
+ }
+
+ trim_start() {
+ wasm.ICU4XFixedDecimal_trim_start(this.underlying);
+ }
+
+ trim_end() {
+ wasm.ICU4XFixedDecimal_trim_end(this.underlying);
+ }
+
+ pad_start(arg_position) {
+ wasm.ICU4XFixedDecimal_pad_start(this.underlying, arg_position);
+ }
+
+ pad_end(arg_position) {
+ wasm.ICU4XFixedDecimal_pad_end(this.underlying, arg_position);
+ }
+
+ set_max_position(arg_position) {
+ wasm.ICU4XFixedDecimal_set_max_position(this.underlying, arg_position);
+ }
+
+ trunc(arg_position) {
+ wasm.ICU4XFixedDecimal_trunc(this.underlying, arg_position);
+ }
+
+ half_trunc(arg_position) {
+ wasm.ICU4XFixedDecimal_half_trunc(this.underlying, arg_position);
+ }
+
+ expand(arg_position) {
+ wasm.ICU4XFixedDecimal_expand(this.underlying, arg_position);
+ }
+
+ half_expand(arg_position) {
+ wasm.ICU4XFixedDecimal_half_expand(this.underlying, arg_position);
+ }
+
+ ceil(arg_position) {
+ wasm.ICU4XFixedDecimal_ceil(this.underlying, arg_position);
+ }
+
+ half_ceil(arg_position) {
+ wasm.ICU4XFixedDecimal_half_ceil(this.underlying, arg_position);
+ }
+
+ floor(arg_position) {
+ wasm.ICU4XFixedDecimal_floor(this.underlying, arg_position);
+ }
+
+ half_floor(arg_position) {
+ wasm.ICU4XFixedDecimal_half_floor(this.underlying, arg_position);
+ }
+
+ half_even(arg_position) {
+ wasm.ICU4XFixedDecimal_half_even(this.underlying, arg_position);
+ }
+
+ concatenate_end(arg_other) {
+ return (() => {
+ const is_ok = wasm.ICU4XFixedDecimal_concatenate_end(this.underlying, arg_other.underlying) == 1;
+ if (!is_ok) {
+ throw new diplomatRuntime.FFIError(undefined);
+ }
+ })();
+ }
+
+ to_string() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return wasm.ICU4XFixedDecimal_to_string(this.underlying, writeable);
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.d.ts
new file mode 100644
index 0000000000..3abe6f9947
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.d.ts
@@ -0,0 +1,43 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDataStruct } from "./ICU4XDataStruct";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XFixedDecimal } from "./ICU4XFixedDecimal";
+import { ICU4XFixedDecimalGroupingStrategy } from "./ICU4XFixedDecimalGroupingStrategy";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * An ICU4X Fixed Decimal Format object, capable of formatting a {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} as a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html Rust documentation for `FixedDecimalFormatter`} for more information.
+ */
+export class ICU4XFixedDecimalFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XFixedDecimalFormatter `ICU4XFixedDecimalFormatter`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_grouping_strategy(provider: ICU4XDataProvider, locale: ICU4XLocale, grouping_strategy: ICU4XFixedDecimalGroupingStrategy): ICU4XFixedDecimalFormatter | never;
+
+ /**
+
+ * Creates a new {@link ICU4XFixedDecimalFormatter `ICU4XFixedDecimalFormatter`} from preconstructed locale data in the form of an {@link ICU4XDataStruct `ICU4XDataStruct`} constructed from `ICU4XDataStruct::create_decimal_symbols()`.
+
+ * The contents of the data struct will be consumed: if you wish to use the struct again it will have to be reconstructed. Passing a consumed struct to this method will return an error.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_decimal_symbols_v1(data_struct: ICU4XDataStruct, grouping_strategy: ICU4XFixedDecimalGroupingStrategy): ICU4XFixedDecimalFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format(value: ICU4XFixedDecimal): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.js b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.js
new file mode 100644
index 0000000000..03cff035b1
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.js
@@ -0,0 +1,72 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XFixedDecimalGroupingStrategy_js_to_rust, ICU4XFixedDecimalGroupingStrategy_rust_to_js } from "./ICU4XFixedDecimalGroupingStrategy.js"
+
+const ICU4XFixedDecimalFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XFixedDecimalFormatter_destroy(underlying);
+});
+
+export class ICU4XFixedDecimalFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XFixedDecimalFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_grouping_strategy(arg_provider, arg_locale, arg_grouping_strategy) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimalFormatter_create_with_grouping_strategy(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XFixedDecimalGroupingStrategy_js_to_rust[arg_grouping_strategy]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XFixedDecimalFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_with_decimal_symbols_v1(arg_data_struct, arg_grouping_strategy) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimalFormatter_create_with_decimal_symbols_v1(diplomat_receive_buffer, arg_data_struct.underlying, ICU4XFixedDecimalGroupingStrategy_js_to_rust[arg_grouping_strategy]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XFixedDecimalFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimalFormatter_format(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.d.ts b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.d.ts
new file mode 100644
index 0000000000..6a615f93a5
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.d.ts
@@ -0,0 +1,19 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/decimal/options/enum.GroupingStrategy.html Rust documentation for `GroupingStrategy`} for more information.
+ */
+export enum ICU4XFixedDecimalGroupingStrategy {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Never = 'Never',
+ /**
+ */
+ Always = 'Always',
+ /**
+ */
+ Min2 = 'Min2',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.js b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.js
new file mode 100644
index 0000000000..8272ee599d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.js
@@ -0,0 +1,23 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XFixedDecimalGroupingStrategy_js_to_rust = {
+ "Auto": 0,
+ "Never": 1,
+ "Always": 2,
+ "Min2": 3,
+};
+
+export const ICU4XFixedDecimalGroupingStrategy_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Never",
+ [2]: "Always",
+ [3]: "Min2",
+};
+
+export const ICU4XFixedDecimalGroupingStrategy = {
+ "Auto": "Auto",
+ "Never": "Never",
+ "Always": "Always",
+ "Min2": "Min2",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.d.ts b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.d.ts
new file mode 100644
index 0000000000..ec777aa3eb
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.d.ts
@@ -0,0 +1,24 @@
+
+/**
+
+ * The sign of a FixedDecimal, as shown in formatting.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.Sign.html Rust documentation for `Sign`} for more information.
+ */
+export enum ICU4XFixedDecimalSign {
+ /**
+
+ * No sign (implicitly positive, e.g., 1729).
+ */
+ None = 'None',
+ /**
+
+ * A negative sign, e.g., -1729.
+ */
+ Negative = 'Negative',
+ /**
+
+ * An explicit positive sign, e.g., +1729.
+ */
+ Positive = 'Positive',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.js b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.js
new file mode 100644
index 0000000000..407cf14d33
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XFixedDecimalSign_js_to_rust = {
+ "None": 0,
+ "Negative": 1,
+ "Positive": 2,
+};
+
+export const ICU4XFixedDecimalSign_rust_to_js = {
+ [0]: "None",
+ [1]: "Negative",
+ [2]: "Positive",
+};
+
+export const ICU4XFixedDecimalSign = {
+ "None": "None",
+ "Negative": "Negative",
+ "Positive": "Positive",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.d.ts b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.d.ts
new file mode 100644
index 0000000000..d3302911a1
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.d.ts
@@ -0,0 +1,24 @@
+
+/**
+
+ * ECMA-402 compatible sign display preference.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.SignDisplay.html Rust documentation for `SignDisplay`} for more information.
+ */
+export enum ICU4XFixedDecimalSignDisplay {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Never = 'Never',
+ /**
+ */
+ Always = 'Always',
+ /**
+ */
+ ExceptZero = 'ExceptZero',
+ /**
+ */
+ Negative = 'Negative',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.js b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.js
new file mode 100644
index 0000000000..21bd180800
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.js
@@ -0,0 +1,26 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XFixedDecimalSignDisplay_js_to_rust = {
+ "Auto": 0,
+ "Never": 1,
+ "Always": 2,
+ "ExceptZero": 3,
+ "Negative": 4,
+};
+
+export const ICU4XFixedDecimalSignDisplay_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Never",
+ [2]: "Always",
+ [3]: "ExceptZero",
+ [4]: "Negative",
+};
+
+export const ICU4XFixedDecimalSignDisplay = {
+ "Auto": "Auto",
+ "Never": "Never",
+ "Always": "Always",
+ "ExceptZero": "ExceptZero",
+ "Negative": "Negative",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.d.ts b/intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.d.ts
new file mode 100644
index 0000000000..b5cfef9cab
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.d.ts
@@ -0,0 +1,38 @@
+import { u32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * A type capable of looking up General Category mask values from a string name.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html#method.get_name_to_enum_mapper Rust documentation for `get_name_to_enum_mapper`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapper.html Rust documentation for `PropertyValueNameToEnumMapper`} for more information.
+ */
+export class ICU4XGeneralCategoryNameToMaskMapper {
+
+ /**
+
+ * Get the mask value matching the given name, using strict matching
+
+ * Returns 0 if the name is unknown for this property
+ */
+ get_strict(name: string): u32;
+
+ /**
+
+ * Get the mask value matching the given name, using loose matching
+
+ * Returns 0 if the name is unknown for this property
+ */
+ get_loose(name: string): u32;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html#method.get_name_to_enum_mapper Rust documentation for `get_name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load(provider: ICU4XDataProvider): ICU4XGeneralCategoryNameToMaskMapper | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.js b/intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.js
new file mode 100644
index 0000000000..4f3319123a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.js
@@ -0,0 +1,49 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XGeneralCategoryNameToMaskMapper_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGeneralCategoryNameToMaskMapper_destroy(underlying);
+});
+
+export class ICU4XGeneralCategoryNameToMaskMapper {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGeneralCategoryNameToMaskMapper_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ get_strict(arg_name) {
+ const buf_arg_name = diplomatRuntime.DiplomatBuf.str(wasm, arg_name);
+ const diplomat_out = wasm.ICU4XGeneralCategoryNameToMaskMapper_get_strict(this.underlying, buf_arg_name.ptr, buf_arg_name.size);
+ buf_arg_name.free();
+ return diplomat_out;
+ }
+
+ get_loose(arg_name) {
+ const buf_arg_name = diplomatRuntime.DiplomatBuf.str(wasm, arg_name);
+ const diplomat_out = wasm.ICU4XGeneralCategoryNameToMaskMapper_get_loose(this.underlying, buf_arg_name.ptr, buf_arg_name.size);
+ buf_arg_name.free();
+ return diplomat_out;
+ }
+
+ static load(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGeneralCategoryNameToMaskMapper_load(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XGeneralCategoryNameToMaskMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.d.ts b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.d.ts
new file mode 100644
index 0000000000..5022d4baa7
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.d.ts
@@ -0,0 +1,16 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html Rust documentation for `GraphemeClusterBreakIterator`} for more information.
+ */
+export class ICU4XGraphemeClusterBreakIteratorLatin1 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.js b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.js
new file mode 100644
index 0000000000..a50df59feb
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XGraphemeClusterBreakIteratorLatin1_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGraphemeClusterBreakIteratorLatin1_destroy(underlying);
+});
+
+export class ICU4XGraphemeClusterBreakIteratorLatin1 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGraphemeClusterBreakIteratorLatin1_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XGraphemeClusterBreakIteratorLatin1_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.d.ts b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.d.ts
new file mode 100644
index 0000000000..95d21da695
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.d.ts
@@ -0,0 +1,16 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html Rust documentation for `GraphemeClusterBreakIterator`} for more information.
+ */
+export class ICU4XGraphemeClusterBreakIteratorUtf16 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.js b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.js
new file mode 100644
index 0000000000..cc997daa05
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XGraphemeClusterBreakIteratorUtf16_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGraphemeClusterBreakIteratorUtf16_destroy(underlying);
+});
+
+export class ICU4XGraphemeClusterBreakIteratorUtf16 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGraphemeClusterBreakIteratorUtf16_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XGraphemeClusterBreakIteratorUtf16_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.d.ts b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.d.ts
new file mode 100644
index 0000000000..cb78596153
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.d.ts
@@ -0,0 +1,16 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html Rust documentation for `GraphemeClusterBreakIterator`} for more information.
+ */
+export class ICU4XGraphemeClusterBreakIteratorUtf8 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.js b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.js
new file mode 100644
index 0000000000..2a16170dfe
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XGraphemeClusterBreakIteratorUtf8_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGraphemeClusterBreakIteratorUtf8_destroy(underlying);
+});
+
+export class ICU4XGraphemeClusterBreakIteratorUtf8 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGraphemeClusterBreakIteratorUtf8_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XGraphemeClusterBreakIteratorUtf8_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.d.ts b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.d.ts
new file mode 100644
index 0000000000..860b6206c9
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.d.ts
@@ -0,0 +1,48 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XGraphemeClusterBreakIteratorLatin1 } from "./ICU4XGraphemeClusterBreakIteratorLatin1";
+import { ICU4XGraphemeClusterBreakIteratorUtf16 } from "./ICU4XGraphemeClusterBreakIteratorUtf16";
+import { ICU4XGraphemeClusterBreakIteratorUtf8 } from "./ICU4XGraphemeClusterBreakIteratorUtf8";
+
+/**
+
+ * An ICU4X grapheme-cluster-break segmenter, capable of finding grapheme cluster breakpoints in strings.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html Rust documentation for `GraphemeClusterSegmenter`} for more information.
+ */
+export class ICU4XGraphemeClusterSegmenter {
+
+ /**
+
+ * Construct an {@link ICU4XGraphemeClusterSegmenter `ICU4XGraphemeClusterSegmenter`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XGraphemeClusterSegmenter | never;
+
+ /**
+
+ * Segments a (potentially ill-formed) UTF-8 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_utf8 Rust documentation for `segment_utf8`} for more information.
+ */
+ segment_utf8(input: string): ICU4XGraphemeClusterBreakIteratorUtf8;
+
+ /**
+
+ * Segments a UTF-16 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_utf16 Rust documentation for `segment_utf16`} for more information.
+ */
+ segment_utf16(input: Uint16Array): ICU4XGraphemeClusterBreakIteratorUtf16;
+
+ /**
+
+ * Segments a Latin-1 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_latin1 Rust documentation for `segment_latin1`} for more information.
+ */
+ segment_latin1(input: Uint8Array): ICU4XGraphemeClusterBreakIteratorLatin1;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.js b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.js
new file mode 100644
index 0000000000..91dfea1ba5
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.js
@@ -0,0 +1,53 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XGraphemeClusterBreakIteratorLatin1 } from "./ICU4XGraphemeClusterBreakIteratorLatin1.js"
+import { ICU4XGraphemeClusterBreakIteratorUtf16 } from "./ICU4XGraphemeClusterBreakIteratorUtf16.js"
+import { ICU4XGraphemeClusterBreakIteratorUtf8 } from "./ICU4XGraphemeClusterBreakIteratorUtf8.js"
+
+const ICU4XGraphemeClusterSegmenter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGraphemeClusterSegmenter_destroy(underlying);
+});
+
+export class ICU4XGraphemeClusterSegmenter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGraphemeClusterSegmenter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGraphemeClusterSegmenter_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XGraphemeClusterSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ segment_utf8(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.str(wasm, arg_input);
+ return new ICU4XGraphemeClusterBreakIteratorUtf8(wasm.ICU4XGraphemeClusterSegmenter_segment_utf8(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_utf16(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 2);
+ return new ICU4XGraphemeClusterBreakIteratorUtf16(wasm.ICU4XGraphemeClusterSegmenter_segment_utf16(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_latin1(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 1);
+ return new ICU4XGraphemeClusterBreakIteratorLatin1(wasm.ICU4XGraphemeClusterSegmenter_segment_latin1(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.d.ts
new file mode 100644
index 0000000000..7beb9ffa9b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.d.ts
@@ -0,0 +1,43 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDateLength } from "./ICU4XDateLength";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDate } from "./ICU4XIsoDate";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * An ICU4X TypedDateFormatter object capable of formatting a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} as a string, using the Gregorian Calendar.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html Rust documentation for `TypedDateFormatter`} for more information.
+ */
+export class ICU4XGregorianDateFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XGregorianDateFormatter `ICU4XGregorianDateFormatter`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.try_new_with_length Rust documentation for `try_new_with_length`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, length: ICU4XDateLength): ICU4XGregorianDateFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDate `ICU4XIsoDate`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_date(value: ICU4XIsoDate): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_datetime(value: ICU4XIsoDateTime): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.js b/intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.js
new file mode 100644
index 0000000000..c9bb1b329f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.js
@@ -0,0 +1,74 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDateLength_js_to_rust, ICU4XDateLength_rust_to_js } from "./ICU4XDateLength.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XGregorianDateFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGregorianDateFormatter_destroy(underlying);
+});
+
+export class ICU4XGregorianDateFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGregorianDateFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_length(arg_provider, arg_locale, arg_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianDateFormatter_create_with_length(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XGregorianDateFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_iso_date(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianDateFormatter_format_iso_date(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_iso_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianDateFormatter_format_iso_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.d.ts
new file mode 100644
index 0000000000..0eb459cc80
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.d.ts
@@ -0,0 +1,34 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDateLength } from "./ICU4XDateLength";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTimeLength } from "./ICU4XTimeLength";
+
+/**
+
+ * An ICU4X TypedDateTimeFormatter object capable of formatting a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} as a string, using the Gregorian Calendar.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html Rust documentation for `TypedDateTimeFormatter`} for more information.
+ */
+export class ICU4XGregorianDateTimeFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XGregorianDateFormatter `ICU4XGregorianDateFormatter`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_lengths(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength, time_length: ICU4XTimeLength): ICU4XGregorianDateTimeFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_datetime(value: ICU4XIsoDateTime): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.js b/intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.js
new file mode 100644
index 0000000000..5315ad4c14
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.js
@@ -0,0 +1,56 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDateLength_js_to_rust, ICU4XDateLength_rust_to_js } from "./ICU4XDateLength.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XTimeLength_js_to_rust, ICU4XTimeLength_rust_to_js } from "./ICU4XTimeLength.js"
+
+const ICU4XGregorianDateTimeFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGregorianDateTimeFormatter_destroy(underlying);
+});
+
+export class ICU4XGregorianDateTimeFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGregorianDateTimeFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_lengths(arg_provider, arg_locale, arg_date_length, arg_time_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianDateTimeFormatter_create_with_lengths(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_date_length], ICU4XTimeLength_js_to_rust[arg_time_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XGregorianDateTimeFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_iso_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianDateTimeFormatter_format_iso_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.d.ts
new file mode 100644
index 0000000000..1b90d361a9
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.d.ts
@@ -0,0 +1,49 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCustomTimeZone } from "./ICU4XCustomTimeZone";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDateLength } from "./ICU4XDateLength";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XIsoTimeZoneOptions } from "./ICU4XIsoTimeZoneOptions";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTimeLength } from "./ICU4XTimeLength";
+
+/**
+
+ * An object capable of formatting a date time with time zone to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html Rust documentation for `TypedZonedDateTimeFormatter`} for more information.
+ */
+export class ICU4XGregorianZonedDateTimeFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XGregorianZonedDateTimeFormatter `ICU4XGregorianZonedDateTimeFormatter`} from locale data.
+
+ * This function has `date_length` and `time_length` arguments and uses default options for the time zone.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_lengths(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength, time_length: ICU4XTimeLength): ICU4XGregorianZonedDateTimeFormatter | never;
+
+ /**
+
+ * Creates a new {@link ICU4XGregorianZonedDateTimeFormatter `ICU4XGregorianZonedDateTimeFormatter`} from locale data.
+
+ * This function has `date_length` and `time_length` arguments and uses an ISO-8601 style fallback for the time zone with the given configurations.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_lengths_and_iso_8601_time_zone_fallback(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength, time_length: ICU4XTimeLength, zone_options: ICU4XIsoTimeZoneOptions): ICU4XGregorianZonedDateTimeFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} and {@link ICU4XCustomTimeZone `ICU4XCustomTimeZone`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_datetime_with_custom_time_zone(datetime: ICU4XIsoDateTime, time_zone: ICU4XCustomTimeZone): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.js b/intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.js
new file mode 100644
index 0000000000..3e5fa8007b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.js
@@ -0,0 +1,79 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDateLength_js_to_rust, ICU4XDateLength_rust_to_js } from "./ICU4XDateLength.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoTimeZoneFormat_js_to_rust, ICU4XIsoTimeZoneFormat_rust_to_js } from "./ICU4XIsoTimeZoneFormat.js"
+import { ICU4XIsoTimeZoneMinuteDisplay_js_to_rust, ICU4XIsoTimeZoneMinuteDisplay_rust_to_js } from "./ICU4XIsoTimeZoneMinuteDisplay.js"
+import { ICU4XIsoTimeZoneSecondDisplay_js_to_rust, ICU4XIsoTimeZoneSecondDisplay_rust_to_js } from "./ICU4XIsoTimeZoneSecondDisplay.js"
+import { ICU4XTimeLength_js_to_rust, ICU4XTimeLength_rust_to_js } from "./ICU4XTimeLength.js"
+
+const ICU4XGregorianZonedDateTimeFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGregorianZonedDateTimeFormatter_destroy(underlying);
+});
+
+export class ICU4XGregorianZonedDateTimeFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGregorianZonedDateTimeFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_lengths(arg_provider, arg_locale, arg_date_length, arg_time_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianZonedDateTimeFormatter_create_with_lengths(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_date_length], ICU4XTimeLength_js_to_rust[arg_time_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XGregorianZonedDateTimeFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_with_lengths_and_iso_8601_time_zone_fallback(arg_provider, arg_locale, arg_date_length, arg_time_length, arg_zone_options) {
+ const field_format_arg_zone_options = arg_zone_options["format"];
+ const field_minutes_arg_zone_options = arg_zone_options["minutes"];
+ const field_seconds_arg_zone_options = arg_zone_options["seconds"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianZonedDateTimeFormatter_create_with_lengths_and_iso_8601_time_zone_fallback(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_date_length], ICU4XTimeLength_js_to_rust[arg_time_length], ICU4XIsoTimeZoneFormat_js_to_rust[field_format_arg_zone_options], ICU4XIsoTimeZoneMinuteDisplay_js_to_rust[field_minutes_arg_zone_options], ICU4XIsoTimeZoneSecondDisplay_js_to_rust[field_seconds_arg_zone_options]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XGregorianZonedDateTimeFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_iso_datetime_with_custom_time_zone(arg_datetime, arg_time_zone) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianZonedDateTimeFormatter_format_iso_datetime_with_custom_time_zone(diplomat_receive_buffer, this.underlying, arg_datetime.underlying, arg_time_zone.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.d.ts b/intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.d.ts
new file mode 100644
index 0000000000..0d34c90101
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.d.ts
@@ -0,0 +1,21 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * An object capable of mapping from an IANA time zone ID to a BCP-47 ID.
+
+ * This can be used via `try_set_iana_time_zone_id()` on {@link crate::timezone::ffi::ICU4XCustomTimeZone `ICU4XCustomTimeZone`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47Mapper.html Rust documentation for `IanaToBcp47Mapper`} for more information.
+ */
+export class ICU4XIanaToBcp47Mapper {
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47Mapper.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XIanaToBcp47Mapper | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.js b/intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.js
new file mode 100644
index 0000000000..ee2c931898
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.js
@@ -0,0 +1,35 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XIanaToBcp47Mapper_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XIanaToBcp47Mapper_destroy(underlying);
+});
+
+export class ICU4XIanaToBcp47Mapper {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XIanaToBcp47Mapper_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XIanaToBcp47Mapper_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XIanaToBcp47Mapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoDate.d.ts b/intl/icu_capi/js/package/lib/ICU4XIsoDate.d.ts
new file mode 100644
index 0000000000..cf1cc1b15f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoDate.d.ts
@@ -0,0 +1,131 @@
+import { u8, u16, i32, u32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCalendar } from "./ICU4XCalendar";
+import { ICU4XDate } from "./ICU4XDate";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoWeekday } from "./ICU4XIsoWeekday";
+import { ICU4XWeekCalculator } from "./ICU4XWeekCalculator";
+import { ICU4XWeekOf } from "./ICU4XWeekOf";
+
+/**
+
+ * An ICU4X Date object capable of containing a ISO-8601 date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html Rust documentation for `Date`} for more information.
+ */
+export class ICU4XIsoDate {
+
+ /**
+
+ * Creates a new {@link ICU4XIsoDate `ICU4XIsoDate`} from the specified date and time.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_iso_date Rust documentation for `try_new_iso_date`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(year: i32, month: u8, day: u8): ICU4XIsoDate | never;
+
+ /**
+
+ * Creates a new {@link ICU4XIsoDate `ICU4XIsoDate`} representing January 1, 1970.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.unix_epoch Rust documentation for `unix_epoch`} for more information.
+ */
+ static create_for_unix_epoch(): ICU4XIsoDate;
+
+ /**
+
+ * Convert this date to one in a different calendar
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_calendar Rust documentation for `to_calendar`} for more information.
+ */
+ to_calendar(calendar: ICU4XCalendar): ICU4XDate;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_any Rust documentation for `to_any`} for more information.
+ */
+ to_any(): ICU4XDate;
+
+ /**
+
+ * Returns the 1-indexed day in the month for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month Rust documentation for `day_of_month`} for more information.
+ */
+ day_of_month(): u32;
+
+ /**
+
+ * Returns the day in the week for this day
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week Rust documentation for `day_of_week`} for more information.
+ */
+ day_of_week(): ICU4XIsoWeekday;
+
+ /**
+
+ * Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ * `first_weekday` can be obtained via `first_weekday()` on {@link ICU4XWeekCalculator `ICU4XWeekCalculator`}
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month Rust documentation for `week_of_month`} for more information.
+ */
+ week_of_month(first_weekday: ICU4XIsoWeekday): u32;
+
+ /**
+
+ * Returns the week number in this year, using week data
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year Rust documentation for `week_of_year`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ week_of_year(calculator: ICU4XWeekCalculator): ICU4XWeekOf | never;
+
+ /**
+
+ * Returns 1-indexed number of the month of this date in its year
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month Rust documentation for `month`} for more information.
+ */
+ month(): u32;
+
+ /**
+
+ * Returns the year number for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year Rust documentation for `year`} for more information.
+ */
+ year(): i32;
+
+ /**
+
+ * Returns if the year is a leap year for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.is_in_leap_year Rust documentation for `is_in_leap_year`} for more information.
+ */
+ is_in_leap_year(): boolean;
+
+ /**
+
+ * Returns the number of months in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year Rust documentation for `months_in_year`} for more information.
+ */
+ months_in_year(): u8;
+
+ /**
+
+ * Returns the number of days in the month represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month Rust documentation for `days_in_month`} for more information.
+ */
+ days_in_month(): u8;
+
+ /**
+
+ * Returns the number of days in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year Rust documentation for `days_in_year`} for more information.
+ */
+ days_in_year(): u16;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoDate.js b/intl/icu_capi/js/package/lib/ICU4XIsoDate.js
new file mode 100644
index 0000000000..6fcfaf2b09
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoDate.js
@@ -0,0 +1,104 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDate } from "./ICU4XDate.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoWeekday_js_to_rust, ICU4XIsoWeekday_rust_to_js } from "./ICU4XIsoWeekday.js"
+import { ICU4XWeekOf } from "./ICU4XWeekOf.js"
+import { ICU4XWeekRelativeUnit_js_to_rust, ICU4XWeekRelativeUnit_rust_to_js } from "./ICU4XWeekRelativeUnit.js"
+
+const ICU4XIsoDate_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XIsoDate_destroy(underlying);
+});
+
+export class ICU4XIsoDate {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XIsoDate_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_year, arg_month, arg_day) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XIsoDate_create(diplomat_receive_buffer, arg_year, arg_month, arg_day);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XIsoDate(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_for_unix_epoch() {
+ return new ICU4XIsoDate(wasm.ICU4XIsoDate_create_for_unix_epoch(), true, []);
+ }
+
+ to_calendar(arg_calendar) {
+ return new ICU4XDate(wasm.ICU4XIsoDate_to_calendar(this.underlying, arg_calendar.underlying), true, []);
+ }
+
+ to_any() {
+ return new ICU4XDate(wasm.ICU4XIsoDate_to_any(this.underlying), true, []);
+ }
+
+ day_of_month() {
+ return wasm.ICU4XIsoDate_day_of_month(this.underlying);
+ }
+
+ day_of_week() {
+ return ICU4XIsoWeekday_rust_to_js[wasm.ICU4XIsoDate_day_of_week(this.underlying)];
+ }
+
+ week_of_month(arg_first_weekday) {
+ return wasm.ICU4XIsoDate_week_of_month(this.underlying, ICU4XIsoWeekday_js_to_rust[arg_first_weekday]);
+ }
+
+ week_of_year(arg_calculator) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(9, 4);
+ wasm.ICU4XIsoDate_week_of_year(diplomat_receive_buffer, this.underlying, arg_calculator.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 8);
+ if (is_ok) {
+ const ok_value = new ICU4XWeekOf(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ month() {
+ return wasm.ICU4XIsoDate_month(this.underlying);
+ }
+
+ year() {
+ return wasm.ICU4XIsoDate_year(this.underlying);
+ }
+
+ is_in_leap_year() {
+ return wasm.ICU4XIsoDate_is_in_leap_year(this.underlying);
+ }
+
+ months_in_year() {
+ return wasm.ICU4XIsoDate_months_in_year(this.underlying);
+ }
+
+ days_in_month() {
+ return wasm.ICU4XIsoDate_days_in_month(this.underlying);
+ }
+
+ days_in_year() {
+ return wasm.ICU4XIsoDate_days_in_year(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoDateTime.d.ts b/intl/icu_capi/js/package/lib/ICU4XIsoDateTime.d.ts
new file mode 100644
index 0000000000..ebf1d5f8d2
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoDateTime.d.ts
@@ -0,0 +1,199 @@
+import { u8, u16, i32, u32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCalendar } from "./ICU4XCalendar";
+import { ICU4XDateTime } from "./ICU4XDateTime";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDate } from "./ICU4XIsoDate";
+import { ICU4XIsoWeekday } from "./ICU4XIsoWeekday";
+import { ICU4XTime } from "./ICU4XTime";
+import { ICU4XWeekCalculator } from "./ICU4XWeekCalculator";
+import { ICU4XWeekOf } from "./ICU4XWeekOf";
+
+/**
+
+ * An ICU4X DateTime object capable of containing a ISO-8601 date and time.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html Rust documentation for `DateTime`} for more information.
+ */
+export class ICU4XIsoDateTime {
+
+ /**
+
+ * Creates a new {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} from the specified date and time.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_iso_datetime Rust documentation for `try_new_iso_datetime`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8, nanosecond: u32): ICU4XIsoDateTime | never;
+
+ /**
+
+ * Creates a new {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} from an {@link ICU4XIsoDate `ICU4XIsoDate`} and {@link ICU4XTime `ICU4XTime`} object
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.new Rust documentation for `new`} for more information.
+ */
+ static crate_from_date_and_time(date: ICU4XIsoDate, time: ICU4XTime): ICU4XIsoDateTime;
+
+ /**
+
+ * Construct from the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.from_minutes_since_local_unix_epoch Rust documentation for `from_minutes_since_local_unix_epoch`} for more information.
+ */
+ static create_from_minutes_since_local_unix_epoch(minutes: i32): ICU4XIsoDateTime;
+
+ /**
+
+ * Gets the date contained in this object
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.date Rust documentation for `date`} for more information.
+ */
+ date(): ICU4XIsoDate;
+
+ /**
+
+ * Gets the time contained in this object
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.time Rust documentation for `time`} for more information.
+ */
+ time(): ICU4XTime;
+
+ /**
+
+ * Converts this to an {@link ICU4XDateTime `ICU4XDateTime`} capable of being mixed with dates of other calendars
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_any Rust documentation for `to_any`} for more information.
+ */
+ to_any(): ICU4XDateTime;
+
+ /**
+
+ * Gets the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.minutes_since_local_unix_epoch Rust documentation for `minutes_since_local_unix_epoch`} for more information.
+ */
+ minutes_since_local_unix_epoch(): i32;
+
+ /**
+
+ * Convert this datetime to one in a different calendar
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_calendar Rust documentation for `to_calendar`} for more information.
+ */
+ to_calendar(calendar: ICU4XCalendar): ICU4XDateTime;
+
+ /**
+
+ * Returns the hour in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour Rust documentation for `hour`} for more information.
+ */
+ hour(): u8;
+
+ /**
+
+ * Returns the minute in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute Rust documentation for `minute`} for more information.
+ */
+ minute(): u8;
+
+ /**
+
+ * Returns the second in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second Rust documentation for `second`} for more information.
+ */
+ second(): u8;
+
+ /**
+
+ * Returns the nanosecond in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond Rust documentation for `nanosecond`} for more information.
+ */
+ nanosecond(): u32;
+
+ /**
+
+ * Returns the 1-indexed day in the month for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month Rust documentation for `day_of_month`} for more information.
+ */
+ day_of_month(): u32;
+
+ /**
+
+ * Returns the day in the week for this day
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week Rust documentation for `day_of_week`} for more information.
+ */
+ day_of_week(): ICU4XIsoWeekday;
+
+ /**
+
+ * Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ * `first_weekday` can be obtained via `first_weekday()` on {@link ICU4XWeekCalculator `ICU4XWeekCalculator`}
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month Rust documentation for `week_of_month`} for more information.
+ */
+ week_of_month(first_weekday: ICU4XIsoWeekday): u32;
+
+ /**
+
+ * Returns the week number in this year, using week data
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year Rust documentation for `week_of_year`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ week_of_year(calculator: ICU4XWeekCalculator): ICU4XWeekOf | never;
+
+ /**
+
+ * Returns 1-indexed number of the month of this date in its year
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month Rust documentation for `month`} for more information.
+ */
+ month(): u32;
+
+ /**
+
+ * Returns the year number for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year Rust documentation for `year`} for more information.
+ */
+ year(): i32;
+
+ /**
+
+ * Returns whether this date is in a leap year
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.is_in_leap_year Rust documentation for `is_in_leap_year`} for more information.
+ */
+ is_in_leap_year(): boolean;
+
+ /**
+
+ * Returns the number of months in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year Rust documentation for `months_in_year`} for more information.
+ */
+ months_in_year(): u8;
+
+ /**
+
+ * Returns the number of days in the month represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month Rust documentation for `days_in_month`} for more information.
+ */
+ days_in_month(): u8;
+
+ /**
+
+ * Returns the number of days in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year Rust documentation for `days_in_year`} for more information.
+ */
+ days_in_year(): u16;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoDateTime.js b/intl/icu_capi/js/package/lib/ICU4XIsoDateTime.js
new file mode 100644
index 0000000000..320361285d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoDateTime.js
@@ -0,0 +1,138 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDateTime } from "./ICU4XDateTime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoDate } from "./ICU4XIsoDate.js"
+import { ICU4XIsoWeekday_js_to_rust, ICU4XIsoWeekday_rust_to_js } from "./ICU4XIsoWeekday.js"
+import { ICU4XTime } from "./ICU4XTime.js"
+import { ICU4XWeekOf } from "./ICU4XWeekOf.js"
+import { ICU4XWeekRelativeUnit_js_to_rust, ICU4XWeekRelativeUnit_rust_to_js } from "./ICU4XWeekRelativeUnit.js"
+
+const ICU4XIsoDateTime_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XIsoDateTime_destroy(underlying);
+});
+
+export class ICU4XIsoDateTime {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XIsoDateTime_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_year, arg_month, arg_day, arg_hour, arg_minute, arg_second, arg_nanosecond) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XIsoDateTime_create(diplomat_receive_buffer, arg_year, arg_month, arg_day, arg_hour, arg_minute, arg_second, arg_nanosecond);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XIsoDateTime(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static crate_from_date_and_time(arg_date, arg_time) {
+ return new ICU4XIsoDateTime(wasm.ICU4XIsoDateTime_crate_from_date_and_time(arg_date.underlying, arg_time.underlying), true, []);
+ }
+
+ static create_from_minutes_since_local_unix_epoch(arg_minutes) {
+ return new ICU4XIsoDateTime(wasm.ICU4XIsoDateTime_create_from_minutes_since_local_unix_epoch(arg_minutes), true, []);
+ }
+
+ date() {
+ return new ICU4XIsoDate(wasm.ICU4XIsoDateTime_date(this.underlying), true, []);
+ }
+
+ time() {
+ return new ICU4XTime(wasm.ICU4XIsoDateTime_time(this.underlying), true, []);
+ }
+
+ to_any() {
+ return new ICU4XDateTime(wasm.ICU4XIsoDateTime_to_any(this.underlying), true, []);
+ }
+
+ minutes_since_local_unix_epoch() {
+ return wasm.ICU4XIsoDateTime_minutes_since_local_unix_epoch(this.underlying);
+ }
+
+ to_calendar(arg_calendar) {
+ return new ICU4XDateTime(wasm.ICU4XIsoDateTime_to_calendar(this.underlying, arg_calendar.underlying), true, []);
+ }
+
+ hour() {
+ return wasm.ICU4XIsoDateTime_hour(this.underlying);
+ }
+
+ minute() {
+ return wasm.ICU4XIsoDateTime_minute(this.underlying);
+ }
+
+ second() {
+ return wasm.ICU4XIsoDateTime_second(this.underlying);
+ }
+
+ nanosecond() {
+ return wasm.ICU4XIsoDateTime_nanosecond(this.underlying);
+ }
+
+ day_of_month() {
+ return wasm.ICU4XIsoDateTime_day_of_month(this.underlying);
+ }
+
+ day_of_week() {
+ return ICU4XIsoWeekday_rust_to_js[wasm.ICU4XIsoDateTime_day_of_week(this.underlying)];
+ }
+
+ week_of_month(arg_first_weekday) {
+ return wasm.ICU4XIsoDateTime_week_of_month(this.underlying, ICU4XIsoWeekday_js_to_rust[arg_first_weekday]);
+ }
+
+ week_of_year(arg_calculator) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(9, 4);
+ wasm.ICU4XIsoDateTime_week_of_year(diplomat_receive_buffer, this.underlying, arg_calculator.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 8);
+ if (is_ok) {
+ const ok_value = new ICU4XWeekOf(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ month() {
+ return wasm.ICU4XIsoDateTime_month(this.underlying);
+ }
+
+ year() {
+ return wasm.ICU4XIsoDateTime_year(this.underlying);
+ }
+
+ is_in_leap_year() {
+ return wasm.ICU4XIsoDateTime_is_in_leap_year(this.underlying);
+ }
+
+ months_in_year() {
+ return wasm.ICU4XIsoDateTime_months_in_year(this.underlying);
+ }
+
+ days_in_month() {
+ return wasm.ICU4XIsoDateTime_days_in_month(this.underlying);
+ }
+
+ days_in_year() {
+ return wasm.ICU4XIsoDateTime_days_in_year(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.d.ts b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.d.ts
new file mode 100644
index 0000000000..8889318a02
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.d.ts
@@ -0,0 +1,19 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoFormat.html Rust documentation for `IsoFormat`} for more information.
+ */
+export enum ICU4XIsoTimeZoneFormat {
+ /**
+ */
+ Basic = 'Basic',
+ /**
+ */
+ Extended = 'Extended',
+ /**
+ */
+ UtcBasic = 'UtcBasic',
+ /**
+ */
+ UtcExtended = 'UtcExtended',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.js b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.js
new file mode 100644
index 0000000000..aae553da77
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.js
@@ -0,0 +1,23 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XIsoTimeZoneFormat_js_to_rust = {
+ "Basic": 0,
+ "Extended": 1,
+ "UtcBasic": 2,
+ "UtcExtended": 3,
+};
+
+export const ICU4XIsoTimeZoneFormat_rust_to_js = {
+ [0]: "Basic",
+ [1]: "Extended",
+ [2]: "UtcBasic",
+ [3]: "UtcExtended",
+};
+
+export const ICU4XIsoTimeZoneFormat = {
+ "Basic": "Basic",
+ "Extended": "Extended",
+ "UtcBasic": "UtcBasic",
+ "UtcExtended": "UtcExtended",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.d.ts b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.d.ts
new file mode 100644
index 0000000000..07ed133c18
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.d.ts
@@ -0,0 +1,13 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoMinutes.html Rust documentation for `IsoMinutes`} for more information.
+ */
+export enum ICU4XIsoTimeZoneMinuteDisplay {
+ /**
+ */
+ Required = 'Required',
+ /**
+ */
+ Optional = 'Optional',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.js b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.js
new file mode 100644
index 0000000000..f6daf3ef46
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.js
@@ -0,0 +1,17 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XIsoTimeZoneMinuteDisplay_js_to_rust = {
+ "Required": 0,
+ "Optional": 1,
+};
+
+export const ICU4XIsoTimeZoneMinuteDisplay_rust_to_js = {
+ [0]: "Required",
+ [1]: "Optional",
+};
+
+export const ICU4XIsoTimeZoneMinuteDisplay = {
+ "Required": "Required",
+ "Optional": "Optional",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.d.ts b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.d.ts
new file mode 100644
index 0000000000..d150b2d2e5
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.d.ts
@@ -0,0 +1,11 @@
+import { ICU4XIsoTimeZoneFormat } from "./ICU4XIsoTimeZoneFormat";
+import { ICU4XIsoTimeZoneMinuteDisplay } from "./ICU4XIsoTimeZoneMinuteDisplay";
+import { ICU4XIsoTimeZoneSecondDisplay } from "./ICU4XIsoTimeZoneSecondDisplay";
+
+/**
+ */
+export class ICU4XIsoTimeZoneOptions {
+ format: ICU4XIsoTimeZoneFormat;
+ minutes: ICU4XIsoTimeZoneMinuteDisplay;
+ seconds: ICU4XIsoTimeZoneSecondDisplay;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.js b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.js
new file mode 100644
index 0000000000..5e9e8f16a7
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.js
@@ -0,0 +1,13 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XIsoTimeZoneFormat_js_to_rust, ICU4XIsoTimeZoneFormat_rust_to_js } from "./ICU4XIsoTimeZoneFormat.js"
+import { ICU4XIsoTimeZoneMinuteDisplay_js_to_rust, ICU4XIsoTimeZoneMinuteDisplay_rust_to_js } from "./ICU4XIsoTimeZoneMinuteDisplay.js"
+import { ICU4XIsoTimeZoneSecondDisplay_js_to_rust, ICU4XIsoTimeZoneSecondDisplay_rust_to_js } from "./ICU4XIsoTimeZoneSecondDisplay.js"
+
+export class ICU4XIsoTimeZoneOptions {
+ constructor(underlying) {
+ this.format = ICU4XIsoTimeZoneFormat_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying)];
+ this.minutes = ICU4XIsoTimeZoneMinuteDisplay_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 4)];
+ this.seconds = ICU4XIsoTimeZoneSecondDisplay_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 8)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.d.ts b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.d.ts
new file mode 100644
index 0000000000..77f1c9e8b7
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.d.ts
@@ -0,0 +1,13 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoSeconds.html Rust documentation for `IsoSeconds`} for more information.
+ */
+export enum ICU4XIsoTimeZoneSecondDisplay {
+ /**
+ */
+ Optional = 'Optional',
+ /**
+ */
+ Never = 'Never',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.js b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.js
new file mode 100644
index 0000000000..d57b7139e1
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.js
@@ -0,0 +1,17 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XIsoTimeZoneSecondDisplay_js_to_rust = {
+ "Optional": 0,
+ "Never": 1,
+};
+
+export const ICU4XIsoTimeZoneSecondDisplay_rust_to_js = {
+ [0]: "Optional",
+ [1]: "Never",
+};
+
+export const ICU4XIsoTimeZoneSecondDisplay = {
+ "Optional": "Optional",
+ "Never": "Never",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoWeekday.d.ts b/intl/icu_capi/js/package/lib/ICU4XIsoWeekday.d.ts
new file mode 100644
index 0000000000..873f20a55f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoWeekday.d.ts
@@ -0,0 +1,26 @@
+
+/**
+ */
+export enum ICU4XIsoWeekday {
+ /**
+ */
+ Monday = 'Monday',
+ /**
+ */
+ Tuesday = 'Tuesday',
+ /**
+ */
+ Wednesday = 'Wednesday',
+ /**
+ */
+ Thursday = 'Thursday',
+ /**
+ */
+ Friday = 'Friday',
+ /**
+ */
+ Saturday = 'Saturday',
+ /**
+ */
+ Sunday = 'Sunday',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoWeekday.js b/intl/icu_capi/js/package/lib/ICU4XIsoWeekday.js
new file mode 100644
index 0000000000..71912bd0e3
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoWeekday.js
@@ -0,0 +1,32 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XIsoWeekday_js_to_rust = {
+ "Monday": 1,
+ "Tuesday": 2,
+ "Wednesday": 3,
+ "Thursday": 4,
+ "Friday": 5,
+ "Saturday": 6,
+ "Sunday": 7,
+};
+
+export const ICU4XIsoWeekday_rust_to_js = {
+ [1]: "Monday",
+ [2]: "Tuesday",
+ [3]: "Wednesday",
+ [4]: "Thursday",
+ [5]: "Friday",
+ [6]: "Saturday",
+ [7]: "Sunday",
+};
+
+export const ICU4XIsoWeekday = {
+ "Monday": "Monday",
+ "Tuesday": "Tuesday",
+ "Wednesday": "Wednesday",
+ "Thursday": "Thursday",
+ "Friday": "Friday",
+ "Saturday": "Saturday",
+ "Sunday": "Sunday",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.d.ts b/intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.d.ts
new file mode 100644
index 0000000000..8c391e8ebb
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.d.ts
@@ -0,0 +1,13 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/options/enum.LanguageDisplay.html Rust documentation for `LanguageDisplay`} for more information.
+ */
+export enum ICU4XLanguageDisplay {
+ /**
+ */
+ Dialect = 'Dialect',
+ /**
+ */
+ Standard = 'Standard',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.js b/intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.js
new file mode 100644
index 0000000000..abac8082e0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.js
@@ -0,0 +1,17 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XLanguageDisplay_js_to_rust = {
+ "Dialect": 0,
+ "Standard": 1,
+};
+
+export const ICU4XLanguageDisplay_rust_to_js = {
+ [0]: "Dialect",
+ [1]: "Standard",
+};
+
+export const ICU4XLanguageDisplay = {
+ "Dialect": "Dialect",
+ "Standard": "Standard",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.d.ts b/intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.d.ts
new file mode 100644
index 0000000000..b170cdb94b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/titlecase/enum.LeadingAdjustment.html Rust documentation for `LeadingAdjustment`} for more information.
+ */
+export enum ICU4XLeadingAdjustment {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ None = 'None',
+ /**
+ */
+ ToCased = 'ToCased',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.js b/intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.js
new file mode 100644
index 0000000000..e57aa259ac
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XLeadingAdjustment_js_to_rust = {
+ "Auto": 0,
+ "None": 1,
+ "ToCased": 2,
+};
+
+export const ICU4XLeadingAdjustment_rust_to_js = {
+ [0]: "Auto",
+ [1]: "None",
+ [2]: "ToCased",
+};
+
+export const ICU4XLeadingAdjustment = {
+ "Auto": "Auto",
+ "None": "None",
+ "ToCased": "ToCased",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.d.ts b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.d.ts
new file mode 100644
index 0000000000..e8dfe70b58
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.d.ts
@@ -0,0 +1,18 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html Rust documentation for `LineBreakIterator`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorLatin1.html 1}
+ */
+export class ICU4XLineBreakIteratorLatin1 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.js b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.js
new file mode 100644
index 0000000000..7bd8f13153
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XLineBreakIteratorLatin1_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLineBreakIteratorLatin1_destroy(underlying);
+});
+
+export class ICU4XLineBreakIteratorLatin1 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLineBreakIteratorLatin1_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XLineBreakIteratorLatin1_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.d.ts b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.d.ts
new file mode 100644
index 0000000000..4a1b41ba9d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.d.ts
@@ -0,0 +1,18 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html Rust documentation for `LineBreakIterator`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorUtf16.html 1}
+ */
+export class ICU4XLineBreakIteratorUtf16 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.js b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.js
new file mode 100644
index 0000000000..3ac2f871ac
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XLineBreakIteratorUtf16_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLineBreakIteratorUtf16_destroy(underlying);
+});
+
+export class ICU4XLineBreakIteratorUtf16 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLineBreakIteratorUtf16_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XLineBreakIteratorUtf16_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.d.ts b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.d.ts
new file mode 100644
index 0000000000..9a576f1224
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.d.ts
@@ -0,0 +1,18 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html Rust documentation for `LineBreakIterator`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorPotentiallyIllFormedUtf8.html 1}
+ */
+export class ICU4XLineBreakIteratorUtf8 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.js b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.js
new file mode 100644
index 0000000000..a9802d0033
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XLineBreakIteratorUtf8_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLineBreakIteratorUtf8_destroy(underlying);
+});
+
+export class ICU4XLineBreakIteratorUtf8 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLineBreakIteratorUtf8_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XLineBreakIteratorUtf8_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.d.ts b/intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.d.ts
new file mode 100644
index 0000000000..9dd3f2e841
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.d.ts
@@ -0,0 +1,12 @@
+import { ICU4XLineBreakStrictness } from "./ICU4XLineBreakStrictness";
+import { ICU4XLineBreakWordOption } from "./ICU4XLineBreakWordOption";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakOptions.html Rust documentation for `LineBreakOptions`} for more information.
+ */
+export class ICU4XLineBreakOptionsV1 {
+ strictness: ICU4XLineBreakStrictness;
+ word_option: ICU4XLineBreakWordOption;
+ ja_zh: boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.js b/intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.js
new file mode 100644
index 0000000000..ee3a48175f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.js
@@ -0,0 +1,12 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XLineBreakStrictness_js_to_rust, ICU4XLineBreakStrictness_rust_to_js } from "./ICU4XLineBreakStrictness.js"
+import { ICU4XLineBreakWordOption_js_to_rust, ICU4XLineBreakWordOption_rust_to_js } from "./ICU4XLineBreakWordOption.js"
+
+export class ICU4XLineBreakOptionsV1 {
+ constructor(underlying) {
+ this.strictness = ICU4XLineBreakStrictness_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying)];
+ this.word_option = ICU4XLineBreakWordOption_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 4)];
+ this.ja_zh = (new Uint8Array(wasm.memory.buffer, underlying + 8, 1))[0] == 1;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.d.ts b/intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.d.ts
new file mode 100644
index 0000000000..f92e35a751
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.d.ts
@@ -0,0 +1,19 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/enum.LineBreakStrictness.html Rust documentation for `LineBreakStrictness`} for more information.
+ */
+export enum ICU4XLineBreakStrictness {
+ /**
+ */
+ Loose = 'Loose',
+ /**
+ */
+ Normal = 'Normal',
+ /**
+ */
+ Strict = 'Strict',
+ /**
+ */
+ Anywhere = 'Anywhere',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.js b/intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.js
new file mode 100644
index 0000000000..c52030b79f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.js
@@ -0,0 +1,23 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XLineBreakStrictness_js_to_rust = {
+ "Loose": 0,
+ "Normal": 1,
+ "Strict": 2,
+ "Anywhere": 3,
+};
+
+export const ICU4XLineBreakStrictness_rust_to_js = {
+ [0]: "Loose",
+ [1]: "Normal",
+ [2]: "Strict",
+ [3]: "Anywhere",
+};
+
+export const ICU4XLineBreakStrictness = {
+ "Loose": "Loose",
+ "Normal": "Normal",
+ "Strict": "Strict",
+ "Anywhere": "Anywhere",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.d.ts b/intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.d.ts
new file mode 100644
index 0000000000..256ddb0e08
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/enum.LineBreakWordOption.html Rust documentation for `LineBreakWordOption`} for more information.
+ */
+export enum ICU4XLineBreakWordOption {
+ /**
+ */
+ Normal = 'Normal',
+ /**
+ */
+ BreakAll = 'BreakAll',
+ /**
+ */
+ KeepAll = 'KeepAll',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.js b/intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.js
new file mode 100644
index 0000000000..60094fdafd
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XLineBreakWordOption_js_to_rust = {
+ "Normal": 0,
+ "BreakAll": 1,
+ "KeepAll": 2,
+};
+
+export const ICU4XLineBreakWordOption_rust_to_js = {
+ [0]: "Normal",
+ [1]: "BreakAll",
+ [2]: "KeepAll",
+};
+
+export const ICU4XLineBreakWordOption = {
+ "Normal": "Normal",
+ "BreakAll": "BreakAll",
+ "KeepAll": "KeepAll",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineSegmenter.d.ts b/intl/icu_capi/js/package/lib/ICU4XLineSegmenter.d.ts
new file mode 100644
index 0000000000..47ae8b1891
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineSegmenter.d.ts
@@ -0,0 +1,94 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLineBreakIteratorLatin1 } from "./ICU4XLineBreakIteratorLatin1";
+import { ICU4XLineBreakIteratorUtf16 } from "./ICU4XLineBreakIteratorUtf16";
+import { ICU4XLineBreakIteratorUtf8 } from "./ICU4XLineBreakIteratorUtf8";
+import { ICU4XLineBreakOptionsV1 } from "./ICU4XLineBreakOptionsV1";
+
+/**
+
+ * An ICU4X line-break segmenter, capable of finding breakpoints in strings.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html Rust documentation for `LineSegmenter`} for more information.
+ */
+export class ICU4XLineSegmenter {
+
+ /**
+
+ * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with default options. It automatically loads the best available payload data for Burmese, Khmer, Lao, and Thai.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto Rust documentation for `new_auto`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_auto(provider: ICU4XDataProvider): ICU4XLineSegmenter | never;
+
+ /**
+
+ * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with default options and LSTM payload data for Burmese, Khmer, Lao, and Thai.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm Rust documentation for `new_lstm`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_lstm(provider: ICU4XDataProvider): ICU4XLineSegmenter | never;
+
+ /**
+
+ * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with default options and dictionary payload data for Burmese, Khmer, Lao, and Thai..
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary Rust documentation for `new_dictionary`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_dictionary(provider: ICU4XDataProvider): ICU4XLineSegmenter | never;
+
+ /**
+
+ * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with custom options. It automatically loads the best available payload data for Burmese, Khmer, Lao, and Thai.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto_with_options Rust documentation for `new_auto_with_options`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_auto_with_options_v1(provider: ICU4XDataProvider, options: ICU4XLineBreakOptionsV1): ICU4XLineSegmenter | never;
+
+ /**
+
+ * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with custom options and LSTM payload data for Burmese, Khmer, Lao, and Thai.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm_with_options Rust documentation for `new_lstm_with_options`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_lstm_with_options_v1(provider: ICU4XDataProvider, options: ICU4XLineBreakOptionsV1): ICU4XLineSegmenter | never;
+
+ /**
+
+ * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with custom options and dictionary payload data for Burmese, Khmer, Lao, and Thai.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary_with_options Rust documentation for `new_dictionary_with_options`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_dictionary_with_options_v1(provider: ICU4XDataProvider, options: ICU4XLineBreakOptionsV1): ICU4XLineSegmenter | never;
+
+ /**
+
+ * Segments a (potentially ill-formed) UTF-8 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_utf8 Rust documentation for `segment_utf8`} for more information.
+ */
+ segment_utf8(input: string): ICU4XLineBreakIteratorUtf8;
+
+ /**
+
+ * Segments a UTF-16 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_utf16 Rust documentation for `segment_utf16`} for more information.
+ */
+ segment_utf16(input: Uint16Array): ICU4XLineBreakIteratorUtf16;
+
+ /**
+
+ * Segments a Latin-1 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_latin1 Rust documentation for `segment_latin1`} for more information.
+ */
+ segment_latin1(input: Uint8Array): ICU4XLineBreakIteratorLatin1;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineSegmenter.js b/intl/icu_capi/js/package/lib/ICU4XLineSegmenter.js
new file mode 100644
index 0000000000..eabb317515
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineSegmenter.js
@@ -0,0 +1,149 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XLineBreakIteratorLatin1 } from "./ICU4XLineBreakIteratorLatin1.js"
+import { ICU4XLineBreakIteratorUtf16 } from "./ICU4XLineBreakIteratorUtf16.js"
+import { ICU4XLineBreakIteratorUtf8 } from "./ICU4XLineBreakIteratorUtf8.js"
+import { ICU4XLineBreakStrictness_js_to_rust, ICU4XLineBreakStrictness_rust_to_js } from "./ICU4XLineBreakStrictness.js"
+import { ICU4XLineBreakWordOption_js_to_rust, ICU4XLineBreakWordOption_rust_to_js } from "./ICU4XLineBreakWordOption.js"
+
+const ICU4XLineSegmenter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLineSegmenter_destroy(underlying);
+});
+
+export class ICU4XLineSegmenter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLineSegmenter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_auto(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLineSegmenter_create_auto(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLineSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_lstm(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLineSegmenter_create_lstm(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLineSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_dictionary(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLineSegmenter_create_dictionary(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLineSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_auto_with_options_v1(arg_provider, arg_options) {
+ const field_strictness_arg_options = arg_options["strictness"];
+ const field_word_option_arg_options = arg_options["word_option"];
+ const field_ja_zh_arg_options = arg_options["ja_zh"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLineSegmenter_create_auto_with_options_v1(diplomat_receive_buffer, arg_provider.underlying, ICU4XLineBreakStrictness_js_to_rust[field_strictness_arg_options], ICU4XLineBreakWordOption_js_to_rust[field_word_option_arg_options], field_ja_zh_arg_options);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLineSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_lstm_with_options_v1(arg_provider, arg_options) {
+ const field_strictness_arg_options = arg_options["strictness"];
+ const field_word_option_arg_options = arg_options["word_option"];
+ const field_ja_zh_arg_options = arg_options["ja_zh"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLineSegmenter_create_lstm_with_options_v1(diplomat_receive_buffer, arg_provider.underlying, ICU4XLineBreakStrictness_js_to_rust[field_strictness_arg_options], ICU4XLineBreakWordOption_js_to_rust[field_word_option_arg_options], field_ja_zh_arg_options);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLineSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_dictionary_with_options_v1(arg_provider, arg_options) {
+ const field_strictness_arg_options = arg_options["strictness"];
+ const field_word_option_arg_options = arg_options["word_option"];
+ const field_ja_zh_arg_options = arg_options["ja_zh"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLineSegmenter_create_dictionary_with_options_v1(diplomat_receive_buffer, arg_provider.underlying, ICU4XLineBreakStrictness_js_to_rust[field_strictness_arg_options], ICU4XLineBreakWordOption_js_to_rust[field_word_option_arg_options], field_ja_zh_arg_options);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLineSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ segment_utf8(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.str(wasm, arg_input);
+ return new ICU4XLineBreakIteratorUtf8(wasm.ICU4XLineSegmenter_segment_utf8(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_utf16(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 2);
+ return new ICU4XLineBreakIteratorUtf16(wasm.ICU4XLineSegmenter_segment_utf16(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_latin1(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 1);
+ return new ICU4XLineBreakIteratorLatin1(wasm.ICU4XLineSegmenter_segment_latin1(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XList.d.ts b/intl/icu_capi/js/package/lib/ICU4XList.d.ts
new file mode 100644
index 0000000000..facf54a8cb
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XList.d.ts
@@ -0,0 +1,34 @@
+import { usize } from "./diplomat-runtime"
+
+/**
+
+ * A list of strings
+ */
+export class ICU4XList {
+
+ /**
+
+ * Create a new list of strings
+ */
+ static create(): ICU4XList;
+
+ /**
+
+ * Create a new list of strings with preallocated space to hold at least `capacity` elements
+ */
+ static create_with_capacity(capacity: usize): ICU4XList;
+
+ /**
+
+ * Push a string to the list
+
+ * For C++ users, potentially invalid UTF8 will be handled via REPLACEMENT CHARACTERs
+ */
+ push(val: string): void;
+
+ /**
+
+ * The number of elements in this list
+ */
+ len(): usize;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XList.js b/intl/icu_capi/js/package/lib/ICU4XList.js
new file mode 100644
index 0000000000..55475df4db
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XList.js
@@ -0,0 +1,35 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XList_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XList_destroy(underlying);
+});
+
+export class ICU4XList {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XList_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create() {
+ return new ICU4XList(wasm.ICU4XList_create(), true, []);
+ }
+
+ static create_with_capacity(arg_capacity) {
+ return new ICU4XList(wasm.ICU4XList_create_with_capacity(arg_capacity), true, []);
+ }
+
+ push(arg_val) {
+ const buf_arg_val = diplomatRuntime.DiplomatBuf.str(wasm, arg_val);
+ wasm.ICU4XList_push(this.underlying, buf_arg_val.ptr, buf_arg_val.size);
+ buf_arg_val.free();
+ }
+
+ len() {
+ return wasm.ICU4XList_len(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XListFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XListFormatter.d.ts
new file mode 100644
index 0000000000..c60883f02f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XListFormatter.d.ts
@@ -0,0 +1,47 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XList } from "./ICU4XList";
+import { ICU4XListLength } from "./ICU4XListLength";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html Rust documentation for `ListFormatter`} for more information.
+ */
+export class ICU4XListFormatter {
+
+ /**
+
+ * Construct a new ICU4XListFormatter instance for And patterns
+
+ * See the {@link https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_and_with_length Rust documentation for `try_new_and_with_length`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_and_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, length: ICU4XListLength): ICU4XListFormatter | never;
+
+ /**
+
+ * Construct a new ICU4XListFormatter instance for And patterns
+
+ * See the {@link https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_or_with_length Rust documentation for `try_new_or_with_length`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_or_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, length: ICU4XListLength): ICU4XListFormatter | never;
+
+ /**
+
+ * Construct a new ICU4XListFormatter instance for And patterns
+
+ * See the {@link https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_unit_with_length Rust documentation for `try_new_unit_with_length`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_unit_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, length: ICU4XListLength): ICU4XListFormatter | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format(list: ICU4XList): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XListFormatter.js b/intl/icu_capi/js/package/lib/ICU4XListFormatter.js
new file mode 100644
index 0000000000..63ef80b23f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XListFormatter.js
@@ -0,0 +1,89 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XListLength_js_to_rust, ICU4XListLength_rust_to_js } from "./ICU4XListLength.js"
+
+const ICU4XListFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XListFormatter_destroy(underlying);
+});
+
+export class ICU4XListFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XListFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_and_with_length(arg_provider, arg_locale, arg_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XListFormatter_create_and_with_length(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XListLength_js_to_rust[arg_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XListFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_or_with_length(arg_provider, arg_locale, arg_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XListFormatter_create_or_with_length(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XListLength_js_to_rust[arg_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XListFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_unit_with_length(arg_provider, arg_locale, arg_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XListFormatter_create_unit_with_length(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XListLength_js_to_rust[arg_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XListFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format(arg_list) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XListFormatter_format(diplomat_receive_buffer, this.underlying, arg_list.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XListLength.d.ts b/intl/icu_capi/js/package/lib/ICU4XListLength.d.ts
new file mode 100644
index 0000000000..4aa3e3b4d5
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XListLength.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/list/enum.ListLength.html Rust documentation for `ListLength`} for more information.
+ */
+export enum ICU4XListLength {
+ /**
+ */
+ Wide = 'Wide',
+ /**
+ */
+ Short = 'Short',
+ /**
+ */
+ Narrow = 'Narrow',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XListLength.js b/intl/icu_capi/js/package/lib/ICU4XListLength.js
new file mode 100644
index 0000000000..171e851b4d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XListLength.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XListLength_js_to_rust = {
+ "Wide": 0,
+ "Short": 1,
+ "Narrow": 2,
+};
+
+export const ICU4XListLength_rust_to_js = {
+ [0]: "Wide",
+ [1]: "Short",
+ [2]: "Narrow",
+};
+
+export const ICU4XListLength = {
+ "Wide": "Wide",
+ "Short": "Short",
+ "Narrow": "Narrow",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocale.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocale.d.ts
new file mode 100644
index 0000000000..b18b577302
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocale.d.ts
@@ -0,0 +1,159 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XOrdering } from "./ICU4XOrdering";
+
+/**
+
+ * An ICU4X Locale, capable of representing strings like `"en-US"`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html Rust documentation for `Locale`} for more information.
+ */
+export class ICU4XLocale {
+
+ /**
+
+ * Construct an {@link ICU4XLocale `ICU4XLocale`} from an locale identifier.
+
+ * This will run the complete locale parsing algorithm. If code size and performance are critical and the locale is of a known shape (such as `aa-BB`) use `create_und`, `set_language`, `set_script`, and `set_region`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes Rust documentation for `try_from_bytes`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_string(name: string): ICU4XLocale | never;
+
+ /**
+
+ * Construct a default undefined {@link ICU4XLocale `ICU4XLocale`} "und".
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#associatedconstant.UND Rust documentation for `UND`} for more information.
+ */
+ static create_und(): ICU4XLocale;
+
+ /**
+
+ * Clones the {@link ICU4XLocale `ICU4XLocale`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html Rust documentation for `Locale`} for more information.
+ */
+ clone(): ICU4XLocale;
+
+ /**
+
+ * Write a string representation of the `LanguageIdentifier` part of {@link ICU4XLocale `ICU4XLocale`} to `write`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id Rust documentation for `id`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ basename(): string | never;
+
+ /**
+
+ * Write a string representation of the unicode extension to `write`
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.extensions Rust documentation for `extensions`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ get_unicode_extension(bytes: string): string | never;
+
+ /**
+
+ * Write a string representation of {@link ICU4XLocale `ICU4XLocale`} language to `write`
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id Rust documentation for `id`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ language(): string | never;
+
+ /**
+
+ * Set the language part of the {@link ICU4XLocale `ICU4XLocale`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes Rust documentation for `try_from_bytes`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ set_language(bytes: string): void | never;
+
+ /**
+
+ * Write a string representation of {@link ICU4XLocale `ICU4XLocale`} region to `write`
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id Rust documentation for `id`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ region(): string | never;
+
+ /**
+
+ * Set the region part of the {@link ICU4XLocale `ICU4XLocale`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes Rust documentation for `try_from_bytes`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ set_region(bytes: string): void | never;
+
+ /**
+
+ * Write a string representation of {@link ICU4XLocale `ICU4XLocale`} script to `write`
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id Rust documentation for `id`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ script(): string | never;
+
+ /**
+
+ * Set the script part of the {@link ICU4XLocale `ICU4XLocale`}. Pass an empty string to remove the script.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes Rust documentation for `try_from_bytes`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ set_script(bytes: string): void | never;
+
+ /**
+
+ * Best effort locale canonicalizer that doesn't need any data
+
+ * Use ICU4XLocaleCanonicalizer for better control and functionality
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.canonicalize Rust documentation for `canonicalize`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static canonicalize(bytes: string): string | never;
+
+ /**
+
+ * Write a string representation of {@link ICU4XLocale `ICU4XLocale`} to `write`
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.write_to Rust documentation for `write_to`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ to_string(): string | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.normalizing_eq Rust documentation for `normalizing_eq`} for more information.
+ */
+ normalizing_eq(other: string): boolean;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.strict_cmp Rust documentation for `strict_cmp`} for more information.
+ */
+ strict_cmp(other: string): ICU4XOrdering;
+
+ /**
+
+ * Deprecated
+
+ * Use `create_from_string("en").
+ */
+ static create_en(): ICU4XLocale;
+
+ /**
+
+ * Deprecated
+
+ * Use `create_from_string("bn").
+ */
+ static create_bn(): ICU4XLocale;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocale.js b/intl/icu_capi/js/package/lib/ICU4XLocale.js
new file mode 100644
index 0000000000..b3cb139842
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocale.js
@@ -0,0 +1,268 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XOrdering_js_to_rust, ICU4XOrdering_rust_to_js } from "./ICU4XOrdering.js"
+
+const ICU4XLocale_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocale_destroy(underlying);
+});
+
+export class ICU4XLocale {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocale_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_from_string(arg_name) {
+ const buf_arg_name = diplomatRuntime.DiplomatBuf.str(wasm, arg_name);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_create_from_string(diplomat_receive_buffer, buf_arg_name.ptr, buf_arg_name.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocale(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_name.free();
+ return diplomat_out;
+ }
+
+ static create_und() {
+ return new ICU4XLocale(wasm.ICU4XLocale_create_und(), true, []);
+ }
+
+ clone() {
+ return new ICU4XLocale(wasm.ICU4XLocale_clone(this.underlying), true, []);
+ }
+
+ basename() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_basename(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ get_unicode_extension(arg_bytes) {
+ const buf_arg_bytes = diplomatRuntime.DiplomatBuf.str(wasm, arg_bytes);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_get_unicode_extension(diplomat_receive_buffer, this.underlying, buf_arg_bytes.ptr, buf_arg_bytes.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_bytes.free();
+ return diplomat_out;
+ }
+
+ language() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_language(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ set_language(arg_bytes) {
+ const buf_arg_bytes = diplomatRuntime.DiplomatBuf.str(wasm, arg_bytes);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_set_language(diplomat_receive_buffer, this.underlying, buf_arg_bytes.ptr, buf_arg_bytes.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_bytes.free();
+ return diplomat_out;
+ }
+
+ region() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_region(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ set_region(arg_bytes) {
+ const buf_arg_bytes = diplomatRuntime.DiplomatBuf.str(wasm, arg_bytes);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_set_region(diplomat_receive_buffer, this.underlying, buf_arg_bytes.ptr, buf_arg_bytes.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_bytes.free();
+ return diplomat_out;
+ }
+
+ script() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_script(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ set_script(arg_bytes) {
+ const buf_arg_bytes = diplomatRuntime.DiplomatBuf.str(wasm, arg_bytes);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_set_script(diplomat_receive_buffer, this.underlying, buf_arg_bytes.ptr, buf_arg_bytes.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_bytes.free();
+ return diplomat_out;
+ }
+
+ static canonicalize(arg_bytes) {
+ const buf_arg_bytes = diplomatRuntime.DiplomatBuf.str(wasm, arg_bytes);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_canonicalize(diplomat_receive_buffer, buf_arg_bytes.ptr, buf_arg_bytes.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_bytes.free();
+ return diplomat_out;
+ }
+
+ to_string() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_to_string(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ normalizing_eq(arg_other) {
+ const buf_arg_other = diplomatRuntime.DiplomatBuf.str(wasm, arg_other);
+ const diplomat_out = wasm.ICU4XLocale_normalizing_eq(this.underlying, buf_arg_other.ptr, buf_arg_other.size);
+ buf_arg_other.free();
+ return diplomat_out;
+ }
+
+ strict_cmp(arg_other) {
+ const buf_arg_other = diplomatRuntime.DiplomatBuf.str(wasm, arg_other);
+ const diplomat_out = ICU4XOrdering_rust_to_js[wasm.ICU4XLocale_strict_cmp(this.underlying, buf_arg_other.ptr, buf_arg_other.size)];
+ buf_arg_other.free();
+ return diplomat_out;
+ }
+
+ static create_en() {
+ return new ICU4XLocale(wasm.ICU4XLocale_create_en(), true, []);
+ }
+
+ static create_bn() {
+ return new ICU4XLocale(wasm.ICU4XLocale_create_bn(), true, []);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.d.ts
new file mode 100644
index 0000000000..2263c73e2a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.d.ts
@@ -0,0 +1,40 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTransformResult } from "./ICU4XTransformResult";
+
+/**
+
+ * A locale canonicalizer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html Rust documentation for `LocaleCanonicalizer`} for more information.
+ */
+export class ICU4XLocaleCanonicalizer {
+
+ /**
+
+ * Create a new {@link ICU4XLocaleCanonicalizer `ICU4XLocaleCanonicalizer`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XLocaleCanonicalizer | never;
+
+ /**
+
+ * Create a new {@link ICU4XLocaleCanonicalizer `ICU4XLocaleCanonicalizer`} with extended data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.new_with_expander Rust documentation for `new_with_expander`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_extended(provider: ICU4XDataProvider): ICU4XLocaleCanonicalizer | never;
+
+ /**
+
+ * FFI version of `LocaleCanonicalizer::canonicalize()`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.canonicalize Rust documentation for `canonicalize`} for more information.
+ */
+ canonicalize(locale: ICU4XLocale): ICU4XTransformResult;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.js b/intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.js
new file mode 100644
index 0000000000..8a5a98da83
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.js
@@ -0,0 +1,57 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XTransformResult_js_to_rust, ICU4XTransformResult_rust_to_js } from "./ICU4XTransformResult.js"
+
+const ICU4XLocaleCanonicalizer_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocaleCanonicalizer_destroy(underlying);
+});
+
+export class ICU4XLocaleCanonicalizer {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocaleCanonicalizer_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleCanonicalizer_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleCanonicalizer(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_extended(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleCanonicalizer_create_extended(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleCanonicalizer(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ canonicalize(arg_locale) {
+ return ICU4XTransformResult_rust_to_js[wasm.ICU4XLocaleCanonicalizer_canonicalize(this.underlying, arg_locale.underlying)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleDirection.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleDirection.d.ts
new file mode 100644
index 0000000000..f0e1bae74d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleDirection.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/enum.Direction.html Rust documentation for `Direction`} for more information.
+ */
+export enum ICU4XLocaleDirection {
+ /**
+ */
+ LeftToRight = 'LeftToRight',
+ /**
+ */
+ RightToLeft = 'RightToLeft',
+ /**
+ */
+ Unknown = 'Unknown',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleDirection.js b/intl/icu_capi/js/package/lib/ICU4XLocaleDirection.js
new file mode 100644
index 0000000000..6219c42fda
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleDirection.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XLocaleDirection_js_to_rust = {
+ "LeftToRight": 0,
+ "RightToLeft": 1,
+ "Unknown": 2,
+};
+
+export const ICU4XLocaleDirection_rust_to_js = {
+ [0]: "LeftToRight",
+ [1]: "RightToLeft",
+ [2]: "Unknown",
+};
+
+export const ICU4XLocaleDirection = {
+ "LeftToRight": "LeftToRight",
+ "RightToLeft": "RightToLeft",
+ "Unknown": "Unknown",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.d.ts
new file mode 100644
index 0000000000..d8eb4ef0bf
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.d.ts
@@ -0,0 +1,49 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XLocaleDirection } from "./ICU4XLocaleDirection";
+import { ICU4XLocaleExpander } from "./ICU4XLocaleExpander";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html Rust documentation for `LocaleDirectionality`} for more information.
+ */
+export class ICU4XLocaleDirectionality {
+
+ /**
+
+ * Construct a new ICU4XLocaleDirectionality instance
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XLocaleDirectionality | never;
+
+ /**
+
+ * Construct a new ICU4XLocaleDirectionality instance with a custom expander
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.new_with_expander Rust documentation for `new_with_expander`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_expander(provider: ICU4XDataProvider, expander: ICU4XLocaleExpander): ICU4XLocaleDirectionality | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.get Rust documentation for `get`} for more information.
+ */
+ get(locale: ICU4XLocale): ICU4XLocaleDirection;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.is_left_to_right Rust documentation for `is_left_to_right`} for more information.
+ */
+ is_left_to_right(locale: ICU4XLocale): boolean;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.is_right_to_left Rust documentation for `is_right_to_left`} for more information.
+ */
+ is_right_to_left(locale: ICU4XLocale): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.js b/intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.js
new file mode 100644
index 0000000000..8957e4c9fa
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.js
@@ -0,0 +1,65 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XLocaleDirection_js_to_rust, ICU4XLocaleDirection_rust_to_js } from "./ICU4XLocaleDirection.js"
+
+const ICU4XLocaleDirectionality_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocaleDirectionality_destroy(underlying);
+});
+
+export class ICU4XLocaleDirectionality {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocaleDirectionality_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleDirectionality_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleDirectionality(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_with_expander(arg_provider, arg_expander) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleDirectionality_create_with_expander(diplomat_receive_buffer, arg_provider.underlying, arg_expander.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleDirectionality(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ get(arg_locale) {
+ return ICU4XLocaleDirection_rust_to_js[wasm.ICU4XLocaleDirectionality_get(this.underlying, arg_locale.underlying)];
+ }
+
+ is_left_to_right(arg_locale) {
+ return wasm.ICU4XLocaleDirectionality_is_left_to_right(this.underlying, arg_locale.underlying);
+ }
+
+ is_right_to_left(arg_locale) {
+ return wasm.ICU4XLocaleDirectionality_is_right_to_left(this.underlying, arg_locale.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.d.ts
new file mode 100644
index 0000000000..0725831729
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.d.ts
@@ -0,0 +1,30 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDisplayNamesOptionsV1 } from "./ICU4XDisplayNamesOptionsV1";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html Rust documentation for `LocaleDisplayNamesFormatter`} for more information.
+ */
+export class ICU4XLocaleDisplayNamesFormatter {
+
+ /**
+
+ * Creates a new `LocaleDisplayNamesFormatter` from locale data and an options bag.
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider, locale: ICU4XLocale, options: ICU4XDisplayNamesOptionsV1): ICU4XLocaleDisplayNamesFormatter | never;
+
+ /**
+
+ * Returns the locale-specific display name of a locale.
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.of Rust documentation for `of`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ of(locale: ICU4XLocale): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.js b/intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.js
new file mode 100644
index 0000000000..63d45a154d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.js
@@ -0,0 +1,60 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDisplayNamesFallback_js_to_rust, ICU4XDisplayNamesFallback_rust_to_js } from "./ICU4XDisplayNamesFallback.js"
+import { ICU4XDisplayNamesStyle_js_to_rust, ICU4XDisplayNamesStyle_rust_to_js } from "./ICU4XDisplayNamesStyle.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XLanguageDisplay_js_to_rust, ICU4XLanguageDisplay_rust_to_js } from "./ICU4XLanguageDisplay.js"
+
+const ICU4XLocaleDisplayNamesFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocaleDisplayNamesFormatter_destroy(underlying);
+});
+
+export class ICU4XLocaleDisplayNamesFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocaleDisplayNamesFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider, arg_locale, arg_options) {
+ const field_style_arg_options = arg_options["style"];
+ const field_fallback_arg_options = arg_options["fallback"];
+ const field_language_display_arg_options = arg_options["language_display"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleDisplayNamesFormatter_create(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDisplayNamesStyle_js_to_rust[field_style_arg_options], ICU4XDisplayNamesFallback_js_to_rust[field_fallback_arg_options], ICU4XLanguageDisplay_js_to_rust[field_language_display_arg_options]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleDisplayNamesFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ of(arg_locale) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleDisplayNamesFormatter_of(diplomat_receive_buffer, this.underlying, arg_locale.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleExpander.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleExpander.d.ts
new file mode 100644
index 0000000000..d3f8b8ff3a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleExpander.d.ts
@@ -0,0 +1,48 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTransformResult } from "./ICU4XTransformResult";
+
+/**
+
+ * A locale expander.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html Rust documentation for `LocaleExpander`} for more information.
+ */
+export class ICU4XLocaleExpander {
+
+ /**
+
+ * Create a new {@link ICU4XLocaleExpander `ICU4XLocaleExpander`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XLocaleExpander | never;
+
+ /**
+
+ * Create a new {@link ICU4XLocaleExpander `ICU4XLocaleExpander`} with extended data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.new_extended Rust documentation for `new_extended`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_extended(provider: ICU4XDataProvider): ICU4XLocaleExpander | never;
+
+ /**
+
+ * FFI version of `LocaleExpander::maximize()`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.maximize Rust documentation for `maximize`} for more information.
+ */
+ maximize(locale: ICU4XLocale): ICU4XTransformResult;
+
+ /**
+
+ * FFI version of `LocaleExpander::minimize()`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.minimize Rust documentation for `minimize`} for more information.
+ */
+ minimize(locale: ICU4XLocale): ICU4XTransformResult;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleExpander.js b/intl/icu_capi/js/package/lib/ICU4XLocaleExpander.js
new file mode 100644
index 0000000000..439698b27e
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleExpander.js
@@ -0,0 +1,61 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XTransformResult_js_to_rust, ICU4XTransformResult_rust_to_js } from "./ICU4XTransformResult.js"
+
+const ICU4XLocaleExpander_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocaleExpander_destroy(underlying);
+});
+
+export class ICU4XLocaleExpander {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocaleExpander_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleExpander_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleExpander(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_extended(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleExpander_create_extended(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleExpander(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ maximize(arg_locale) {
+ return ICU4XTransformResult_rust_to_js[wasm.ICU4XLocaleExpander_maximize(this.underlying, arg_locale.underlying)];
+ }
+
+ minimize(arg_locale) {
+ return ICU4XTransformResult_rust_to_js[wasm.ICU4XLocaleExpander_minimize(this.underlying, arg_locale.underlying)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.d.ts
new file mode 100644
index 0000000000..58c1f79232
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.d.ts
@@ -0,0 +1,14 @@
+import { ICU4XLocaleFallbackPriority } from "./ICU4XLocaleFallbackPriority";
+import { ICU4XLocaleFallbackSupplement } from "./ICU4XLocaleFallbackSupplement";
+
+/**
+
+ * Collection of configurations for the ICU4X fallback algorithm.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackConfig.html Rust documentation for `LocaleFallbackConfig`} for more information.
+ */
+export class ICU4XLocaleFallbackConfig {
+ priority: ICU4XLocaleFallbackPriority;
+ extension_key: string;
+ fallback_supplement: ICU4XLocaleFallbackSupplement;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.js b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.js
new file mode 100644
index 0000000000..f327a084be
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.js
@@ -0,0 +1,15 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XLocaleFallbackPriority_js_to_rust, ICU4XLocaleFallbackPriority_rust_to_js } from "./ICU4XLocaleFallbackPriority.js"
+import { ICU4XLocaleFallbackSupplement_js_to_rust, ICU4XLocaleFallbackSupplement_rust_to_js } from "./ICU4XLocaleFallbackSupplement.js"
+
+export class ICU4XLocaleFallbackConfig {
+ constructor(underlying, edges_a) {
+ this.priority = ICU4XLocaleFallbackPriority_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying)];
+ this.extension_key = (() => {
+ const [ptr, size] = new Uint32Array(wasm.memory.buffer, underlying + 4, 2);
+ return diplomatRuntime.readString(wasm, ptr, size);
+ })();
+ this.fallback_supplement = ICU4XLocaleFallbackSupplement_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 12)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.d.ts
new file mode 100644
index 0000000000..348d2a7386
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.d.ts
@@ -0,0 +1,26 @@
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * An iterator over the locale under fallback.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html Rust documentation for `LocaleFallbackIterator`} for more information.
+ */
+export class ICU4XLocaleFallbackIterator {
+
+ /**
+
+ * Gets a snapshot of the current state of the locale.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html#method.get Rust documentation for `get`} for more information.
+ */
+ get(): ICU4XLocale;
+
+ /**
+
+ * Performs one step of the fallback algorithm, mutating the locale.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html#method.step Rust documentation for `step`} for more information.
+ */
+ step(): void;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.js b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.js
new file mode 100644
index 0000000000..4540e3d7db
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.js
@@ -0,0 +1,26 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XLocale } from "./ICU4XLocale.js"
+
+const ICU4XLocaleFallbackIterator_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocaleFallbackIterator_destroy(underlying);
+});
+
+export class ICU4XLocaleFallbackIterator {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocaleFallbackIterator_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ get() {
+ return new ICU4XLocale(wasm.ICU4XLocaleFallbackIterator_get(this.underlying), true, []);
+ }
+
+ step() {
+ wasm.ICU4XLocaleFallbackIterator_step(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.d.ts
new file mode 100644
index 0000000000..5ebc55f192
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.d.ts
@@ -0,0 +1,18 @@
+
+/**
+
+ * Priority mode for the ICU4X fallback algorithm.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/enum.LocaleFallbackPriority.html Rust documentation for `LocaleFallbackPriority`} for more information.
+ */
+export enum ICU4XLocaleFallbackPriority {
+ /**
+ */
+ Language = 'Language',
+ /**
+ */
+ Region = 'Region',
+ /**
+ */
+ Collation = 'Collation',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.js b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.js
new file mode 100644
index 0000000000..421e73fb71
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XLocaleFallbackPriority_js_to_rust = {
+ "Language": 0,
+ "Region": 1,
+ "Collation": 2,
+};
+
+export const ICU4XLocaleFallbackPriority_rust_to_js = {
+ [0]: "Language",
+ [1]: "Region",
+ [2]: "Collation",
+};
+
+export const ICU4XLocaleFallbackPriority = {
+ "Language": "Language",
+ "Region": "Region",
+ "Collation": "Collation",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.d.ts
new file mode 100644
index 0000000000..8fc00bb1b0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.d.ts
@@ -0,0 +1,15 @@
+
+/**
+
+ * What additional data is required to load when performing fallback.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/enum.LocaleFallbackSupplement.html Rust documentation for `LocaleFallbackSupplement`} for more information.
+ */
+export enum ICU4XLocaleFallbackSupplement {
+ /**
+ */
+ None = 'None',
+ /**
+ */
+ Collation = 'Collation',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.js b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.js
new file mode 100644
index 0000000000..c9caa34aea
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.js
@@ -0,0 +1,17 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XLocaleFallbackSupplement_js_to_rust = {
+ "None": 0,
+ "Collation": 1,
+};
+
+export const ICU4XLocaleFallbackSupplement_rust_to_js = {
+ [0]: "None",
+ [1]: "Collation",
+};
+
+export const ICU4XLocaleFallbackSupplement = {
+ "None": "None",
+ "Collation": "Collation",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.d.ts
new file mode 100644
index 0000000000..9a2ea9a4fe
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.d.ts
@@ -0,0 +1,40 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocaleFallbackConfig } from "./ICU4XLocaleFallbackConfig";
+import { ICU4XLocaleFallbackerWithConfig } from "./ICU4XLocaleFallbackerWithConfig";
+
+/**
+
+ * An object that runs the ICU4X locale fallback algorithm.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html Rust documentation for `LocaleFallbacker`} for more information.
+ */
+export class ICU4XLocaleFallbacker {
+
+ /**
+
+ * Creates a new `ICU4XLocaleFallbacker` from a data provider.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XLocaleFallbacker | never;
+
+ /**
+
+ * Creates a new `ICU4XLocaleFallbacker` without data for limited functionality.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.new_without_data Rust documentation for `new_without_data`} for more information.
+ */
+ static create_without_data(): ICU4XLocaleFallbacker;
+
+ /**
+
+ * Associates this `ICU4XLocaleFallbacker` with configuration options.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.for_config Rust documentation for `for_config`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ for_config(config: ICU4XLocaleFallbackConfig): ICU4XLocaleFallbackerWithConfig | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.js b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.js
new file mode 100644
index 0000000000..8163c11bac
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.js
@@ -0,0 +1,65 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XLocaleFallbackPriority_js_to_rust, ICU4XLocaleFallbackPriority_rust_to_js } from "./ICU4XLocaleFallbackPriority.js"
+import { ICU4XLocaleFallbackSupplement_js_to_rust, ICU4XLocaleFallbackSupplement_rust_to_js } from "./ICU4XLocaleFallbackSupplement.js"
+import { ICU4XLocaleFallbackerWithConfig } from "./ICU4XLocaleFallbackerWithConfig.js"
+
+const ICU4XLocaleFallbacker_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocaleFallbacker_destroy(underlying);
+});
+
+export class ICU4XLocaleFallbacker {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocaleFallbacker_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleFallbacker_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleFallbacker(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_without_data() {
+ return new ICU4XLocaleFallbacker(wasm.ICU4XLocaleFallbacker_create_without_data(), true, []);
+ }
+
+ for_config(arg_config) {
+ const field_priority_arg_config = arg_config["priority"];
+ const field_extension_key_arg_config = arg_config["extension_key"];
+ const buf_field_extension_key_arg_config = diplomatRuntime.DiplomatBuf.str(wasm, field_extension_key_arg_config);
+ const field_fallback_supplement_arg_config = arg_config["fallback_supplement"];
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleFallbacker_for_config(diplomat_receive_buffer, this.underlying, ICU4XLocaleFallbackPriority_js_to_rust[field_priority_arg_config], buf_field_extension_key_arg_config.ptr, buf_field_extension_key_arg_config.size, ICU4XLocaleFallbackSupplement_js_to_rust[field_fallback_supplement_arg_config]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleFallbackerWithConfig(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, [this]);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_field_extension_key_arg_config.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.d.ts
new file mode 100644
index 0000000000..9df416ae90
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.d.ts
@@ -0,0 +1,21 @@
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XLocaleFallbackIterator } from "./ICU4XLocaleFallbackIterator";
+
+/**
+
+ * An object that runs the ICU4X locale fallback algorithm with specific configurations.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html Rust documentation for `LocaleFallbacker`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackerWithConfig.html Rust documentation for `LocaleFallbackerWithConfig`} for more information.
+ */
+export class ICU4XLocaleFallbackerWithConfig {
+
+ /**
+
+ * Creates an iterator from a locale with each step of fallback.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.fallback_for Rust documentation for `fallback_for`} for more information.
+ */
+ fallback_for_locale(locale: ICU4XLocale): ICU4XLocaleFallbackIterator;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.js b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.js
new file mode 100644
index 0000000000..632654df03
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.js
@@ -0,0 +1,22 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XLocaleFallbackIterator } from "./ICU4XLocaleFallbackIterator.js"
+
+const ICU4XLocaleFallbackerWithConfig_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocaleFallbackerWithConfig_destroy(underlying);
+});
+
+export class ICU4XLocaleFallbackerWithConfig {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocaleFallbackerWithConfig_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ fallback_for_locale(arg_locale) {
+ return new ICU4XLocaleFallbackIterator(wasm.ICU4XLocaleFallbackerWithConfig_fallback_for_locale(this.underlying, arg_locale.underlying), true, [this]);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLogger.d.ts b/intl/icu_capi/js/package/lib/ICU4XLogger.d.ts
new file mode 100644
index 0000000000..c44d9c4be2
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLogger.d.ts
@@ -0,0 +1,23 @@
+
+/**
+
+ * An object allowing control over the logging used
+ */
+export class ICU4XLogger {
+
+ /**
+
+ * Initialize the logger using `simple_logger`
+
+ * Requires the `simple_logger` Cargo feature.
+
+ * Returns `false` if there was already a logger set.
+ */
+ static init_simple_logger(): boolean;
+
+ /**
+
+ * Deprecated: since ICU4X 1.4, this now happens automatically if the `log` feature is enabled.
+ */
+ static init_console_logger(): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLogger.js b/intl/icu_capi/js/package/lib/ICU4XLogger.js
new file mode 100644
index 0000000000..e696f7fd9b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLogger.js
@@ -0,0 +1,25 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XLogger_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLogger_destroy(underlying);
+});
+
+export class ICU4XLogger {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLogger_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static init_simple_logger() {
+ return wasm.ICU4XLogger_init_simple_logger();
+ }
+
+ static init_console_logger() {
+ return wasm.ICU4XLogger_init_console_logger();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.d.ts b/intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.d.ts
new file mode 100644
index 0000000000..73b263c21f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.d.ts
@@ -0,0 +1,21 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * An object capable of computing the metazone from a timezone.
+
+ * This can be used via `maybe_calculate_metazone()` on {@link crate::timezone::ffi::ICU4XCustomTimeZone `ICU4XCustomTimeZone`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html Rust documentation for `MetazoneCalculator`} for more information.
+ */
+export class ICU4XMetazoneCalculator {
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XMetazoneCalculator | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.js b/intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.js
new file mode 100644
index 0000000000..a72b56af0c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.js
@@ -0,0 +1,35 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XMetazoneCalculator_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XMetazoneCalculator_destroy(underlying);
+});
+
+export class ICU4XMetazoneCalculator {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XMetazoneCalculator_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XMetazoneCalculator_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XMetazoneCalculator(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XOrdering.d.ts b/intl/icu_capi/js/package/lib/ICU4XOrdering.d.ts
new file mode 100644
index 0000000000..1567229a9b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XOrdering.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/core/latest/core/cmp/enum.Ordering.html Rust documentation for `Ordering`} for more information.
+ */
+export enum ICU4XOrdering {
+ /**
+ */
+ Less = 'Less',
+ /**
+ */
+ Equal = 'Equal',
+ /**
+ */
+ Greater = 'Greater',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XOrdering.js b/intl/icu_capi/js/package/lib/ICU4XOrdering.js
new file mode 100644
index 0000000000..fb86968e70
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XOrdering.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XOrdering_js_to_rust = {
+ "Less": -1,
+ "Equal": 0,
+ "Greater": 1,
+};
+
+export const ICU4XOrdering_rust_to_js = {
+ [-1]: "Less",
+ [0]: "Equal",
+ [1]: "Greater",
+};
+
+export const ICU4XOrdering = {
+ "Less": "Less",
+ "Equal": "Equal",
+ "Greater": "Greater",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralCategories.d.ts b/intl/icu_capi/js/package/lib/ICU4XPluralCategories.d.ts
new file mode 100644
index 0000000000..f74b1f4f93
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralCategories.d.ts
@@ -0,0 +1,13 @@
+
+/**
+
+ * FFI version of `PluralRules::categories()` data.
+ */
+export class ICU4XPluralCategories {
+ zero: boolean;
+ one: boolean;
+ two: boolean;
+ few: boolean;
+ many: boolean;
+ other: boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralCategories.js b/intl/icu_capi/js/package/lib/ICU4XPluralCategories.js
new file mode 100644
index 0000000000..84e8fcf1ce
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralCategories.js
@@ -0,0 +1,13 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export class ICU4XPluralCategories {
+ constructor(underlying) {
+ this.zero = (new Uint8Array(wasm.memory.buffer, underlying, 1))[0] == 1;
+ this.one = (new Uint8Array(wasm.memory.buffer, underlying + 1, 1))[0] == 1;
+ this.two = (new Uint8Array(wasm.memory.buffer, underlying + 2, 1))[0] == 1;
+ this.few = (new Uint8Array(wasm.memory.buffer, underlying + 3, 1))[0] == 1;
+ this.many = (new Uint8Array(wasm.memory.buffer, underlying + 4, 1))[0] == 1;
+ this.other = (new Uint8Array(wasm.memory.buffer, underlying + 5, 1))[0] == 1;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralCategory.d.ts b/intl/icu_capi/js/package/lib/ICU4XPluralCategory.d.ts
new file mode 100644
index 0000000000..7b1a9831c0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralCategory.d.ts
@@ -0,0 +1,28 @@
+import { FFIError } from "./diplomat-runtime"
+
+/**
+
+ * FFI version of `PluralCategory`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/enum.PluralCategory.html Rust documentation for `PluralCategory`} for more information.
+ */
+export enum ICU4XPluralCategory {
+ /**
+ */
+ Zero = 'Zero',
+ /**
+ */
+ One = 'One',
+ /**
+ */
+ Two = 'Two',
+ /**
+ */
+ Few = 'Few',
+ /**
+ */
+ Many = 'Many',
+ /**
+ */
+ Other = 'Other',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralCategory.js b/intl/icu_capi/js/package/lib/ICU4XPluralCategory.js
new file mode 100644
index 0000000000..299abbb4b0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralCategory.js
@@ -0,0 +1,29 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XPluralCategory_js_to_rust = {
+ "Zero": 0,
+ "One": 1,
+ "Two": 2,
+ "Few": 3,
+ "Many": 4,
+ "Other": 5,
+};
+
+export const ICU4XPluralCategory_rust_to_js = {
+ [0]: "Zero",
+ [1]: "One",
+ [2]: "Two",
+ [3]: "Few",
+ [4]: "Many",
+ [5]: "Other",
+};
+
+export const ICU4XPluralCategory = {
+ "Zero": "Zero",
+ "One": "One",
+ "Two": "Two",
+ "Few": "Few",
+ "Many": "Many",
+ "Other": "Other",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralOperands.d.ts b/intl/icu_capi/js/package/lib/ICU4XPluralOperands.d.ts
new file mode 100644
index 0000000000..a521100d17
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralOperands.d.ts
@@ -0,0 +1,20 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * FFI version of `PluralOperands`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralOperands.html Rust documentation for `PluralOperands`} for more information.
+ */
+export class ICU4XPluralOperands {
+
+ /**
+
+ * Construct for a given string representing a number
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralOperands.html#method.from_str Rust documentation for `from_str`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_string(s: string): ICU4XPluralOperands | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralOperands.js b/intl/icu_capi/js/package/lib/ICU4XPluralOperands.js
new file mode 100644
index 0000000000..6fdffaef2a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralOperands.js
@@ -0,0 +1,38 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XPluralOperands_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XPluralOperands_destroy(underlying);
+});
+
+export class ICU4XPluralOperands {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XPluralOperands_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_from_string(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPluralOperands_create_from_string(diplomat_receive_buffer, buf_arg_s.ptr, buf_arg_s.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPluralOperands(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralRules.d.ts b/intl/icu_capi/js/package/lib/ICU4XPluralRules.d.ts
new file mode 100644
index 0000000000..5092ae4218
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralRules.d.ts
@@ -0,0 +1,50 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XPluralCategories } from "./ICU4XPluralCategories";
+import { ICU4XPluralCategory } from "./ICU4XPluralCategory";
+import { ICU4XPluralOperands } from "./ICU4XPluralOperands";
+
+/**
+
+ * FFI version of `PluralRules`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html Rust documentation for `PluralRules`} for more information.
+ */
+export class ICU4XPluralRules {
+
+ /**
+
+ * Construct an {@link ICU4XPluralRules `ICU4XPluralRules`} for the given locale, for cardinal numbers
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_cardinal Rust documentation for `try_new_cardinal`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_cardinal(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XPluralRules | never;
+
+ /**
+
+ * Construct an {@link ICU4XPluralRules `ICU4XPluralRules`} for the given locale, for ordinal numbers
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_ordinal Rust documentation for `try_new_ordinal`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_ordinal(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XPluralRules | never;
+
+ /**
+
+ * Get the category for a given number represented as operands
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.category_for Rust documentation for `category_for`} for more information.
+ */
+ category_for(op: ICU4XPluralOperands): ICU4XPluralCategory;
+
+ /**
+
+ * Get all of the categories needed in the current locale
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.categories Rust documentation for `categories`} for more information.
+ */
+ categories(): ICU4XPluralCategories;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralRules.js b/intl/icu_capi/js/package/lib/ICU4XPluralRules.js
new file mode 100644
index 0000000000..bb78fd8ab5
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralRules.js
@@ -0,0 +1,68 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XPluralCategories } from "./ICU4XPluralCategories.js"
+import { ICU4XPluralCategory_js_to_rust, ICU4XPluralCategory_rust_to_js } from "./ICU4XPluralCategory.js"
+
+const ICU4XPluralRules_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XPluralRules_destroy(underlying);
+});
+
+export class ICU4XPluralRules {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XPluralRules_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_cardinal(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPluralRules_create_cardinal(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPluralRules(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_ordinal(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPluralRules_create_ordinal(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPluralRules(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ category_for(arg_op) {
+ return ICU4XPluralCategory_rust_to_js[wasm.ICU4XPluralRules_category_for(this.underlying, arg_op.underlying)];
+ }
+
+ categories() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(6, 1);
+ wasm.ICU4XPluralRules_categories(diplomat_receive_buffer, this.underlying);
+ const out = new ICU4XPluralCategories(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 6, 1);
+ return out;
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.d.ts b/intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.d.ts
new file mode 100644
index 0000000000..f12131e1e7
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.d.ts
@@ -0,0 +1,98 @@
+import { i16 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * A type capable of looking up a property value from a string name.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapper.html Rust documentation for `PropertyValueNameToEnumMapper`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html Rust documentation for `PropertyValueNameToEnumMapperBorrowed`} for more information.
+ */
+export class ICU4XPropertyValueNameToEnumMapper {
+
+ /**
+
+ * Get the property value matching the given name, using strict matching
+
+ * Returns -1 if the name is unknown for this property
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html#method.get_strict Rust documentation for `get_strict`} for more information.
+ */
+ get_strict(name: string): i16;
+
+ /**
+
+ * Get the property value matching the given name, using loose matching
+
+ * Returns -1 if the name is unknown for this property
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html#method.get_loose Rust documentation for `get_loose`} for more information.
+ */
+ get_loose(name: string): i16;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.GeneralCategory.html#method.get_name_to_enum_mapper Rust documentation for `get_name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_general_category(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.BidiClass.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_bidi_class(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.EastAsianWidth.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_east_asian_width(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.IndicSyllabicCategory.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_indic_syllabic_category(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.LineBreak.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_line_break(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.GraphemeClusterBreak.html#method.get_name_to_enum_mapper Rust documentation for `get_name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_grapheme_cluster_break(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.WordBreak.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_word_break(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.SentenceBreak.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_sentence_break(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.Script.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_script(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.js b/intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.js
new file mode 100644
index 0000000000..ef0ddf1f37
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.js
@@ -0,0 +1,185 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XPropertyValueNameToEnumMapper_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XPropertyValueNameToEnumMapper_destroy(underlying);
+});
+
+export class ICU4XPropertyValueNameToEnumMapper {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XPropertyValueNameToEnumMapper_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ get_strict(arg_name) {
+ const buf_arg_name = diplomatRuntime.DiplomatBuf.str(wasm, arg_name);
+ const diplomat_out = wasm.ICU4XPropertyValueNameToEnumMapper_get_strict(this.underlying, buf_arg_name.ptr, buf_arg_name.size);
+ buf_arg_name.free();
+ return diplomat_out;
+ }
+
+ get_loose(arg_name) {
+ const buf_arg_name = diplomatRuntime.DiplomatBuf.str(wasm, arg_name);
+ const diplomat_out = wasm.ICU4XPropertyValueNameToEnumMapper_get_loose(this.underlying, buf_arg_name.ptr, buf_arg_name.size);
+ buf_arg_name.free();
+ return diplomat_out;
+ }
+
+ static load_general_category(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_general_category(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_bidi_class(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_bidi_class(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_east_asian_width(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_east_asian_width(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_indic_syllabic_category(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_indic_syllabic_category(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_line_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_line_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_grapheme_cluster_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_grapheme_cluster_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_word_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_word_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_sentence_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_sentence_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_script(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_script(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.d.ts b/intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.d.ts
new file mode 100644
index 0000000000..6c0ee43d29
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.d.ts
@@ -0,0 +1,29 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html Rust documentation for `RegionDisplayNames`} for more information.
+ */
+export class ICU4XRegionDisplayNames {
+
+ /**
+
+ * Creates a new `RegionDisplayNames` from locale data and an options bag.
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XRegionDisplayNames | never;
+
+ /**
+
+ * Returns the locale specific display name of a region. Note that the funtion returns an empty string in case the display name for a given region code is not found.
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.of Rust documentation for `of`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ of(region: string): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.js b/intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.js
new file mode 100644
index 0000000000..afaf0a9d4d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.js
@@ -0,0 +1,57 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XRegionDisplayNames_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XRegionDisplayNames_destroy(underlying);
+});
+
+export class ICU4XRegionDisplayNames {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XRegionDisplayNames_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XRegionDisplayNames_create(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XRegionDisplayNames(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ of(arg_region) {
+ const buf_arg_region = diplomatRuntime.DiplomatBuf.str(wasm, arg_region);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XRegionDisplayNames_of(diplomat_receive_buffer, this.underlying, buf_arg_region.ptr, buf_arg_region.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_region.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.d.ts b/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.d.ts
new file mode 100644
index 0000000000..ef6889f2ae
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.d.ts
@@ -0,0 +1,30 @@
+import { usize } from "./diplomat-runtime"
+
+/**
+
+ * Thin wrapper around a vector that maps visual indices to source indices
+
+ * `map[visualIndex] = sourceIndex`
+
+ * Produced by `reorder_visual()` on {@link ICU4XBidi `ICU4XBidi`}.
+ */
+export class ICU4XReorderedIndexMap {
+
+ /**
+
+ * Get this as a slice/array of indices
+ */
+ as_slice(): Uint32Array;
+
+ /**
+
+ * The length of this map
+ */
+ len(): usize;
+
+ /**
+
+ * Get element at `index`. Returns 0 when out of bounds (note that 0 is also a valid in-bounds value, please use `len()` to avoid out-of-bounds)
+ */
+ get(index: usize): usize;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.js b/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.js
new file mode 100644
index 0000000000..46ad3060c1
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.js
@@ -0,0 +1,35 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XReorderedIndexMap_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XReorderedIndexMap_destroy(underlying);
+});
+
+export class ICU4XReorderedIndexMap {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XReorderedIndexMap_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ as_slice() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(8, 4);
+ wasm.ICU4XReorderedIndexMap_as_slice(diplomat_receive_buffer, this.underlying);
+ const [ptr, size] = new Uint32Array(wasm.memory.buffer, diplomat_receive_buffer, 2);
+ wasm.diplomat_free(diplomat_receive_buffer, 8, 4);
+ return new Uint32Array(wasm.memory.buffer, ptr, size);
+ })();
+ }
+
+ len() {
+ return wasm.ICU4XReorderedIndexMap_len(this.underlying);
+ }
+
+ get(arg_index) {
+ return wasm.ICU4XReorderedIndexMap_get(this.underlying, arg_index);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.d.ts b/intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.d.ts
new file mode 100644
index 0000000000..5d3c676318
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.d.ts
@@ -0,0 +1,21 @@
+
+/**
+
+ * Increment used in a rounding operation.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.RoundingIncrement.html Rust documentation for `RoundingIncrement`} for more information.
+ */
+export enum ICU4XRoundingIncrement {
+ /**
+ */
+ MultiplesOf1 = 'MultiplesOf1',
+ /**
+ */
+ MultiplesOf2 = 'MultiplesOf2',
+ /**
+ */
+ MultiplesOf5 = 'MultiplesOf5',
+ /**
+ */
+ MultiplesOf25 = 'MultiplesOf25',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.js b/intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.js
new file mode 100644
index 0000000000..c93a450e28
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.js
@@ -0,0 +1,23 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XRoundingIncrement_js_to_rust = {
+ "MultiplesOf1": 0,
+ "MultiplesOf2": 1,
+ "MultiplesOf5": 2,
+ "MultiplesOf25": 3,
+};
+
+export const ICU4XRoundingIncrement_rust_to_js = {
+ [0]: "MultiplesOf1",
+ [1]: "MultiplesOf2",
+ [2]: "MultiplesOf5",
+ [3]: "MultiplesOf25",
+};
+
+export const ICU4XRoundingIncrement = {
+ "MultiplesOf1": "MultiplesOf1",
+ "MultiplesOf2": "MultiplesOf2",
+ "MultiplesOf5": "MultiplesOf5",
+ "MultiplesOf25": "MultiplesOf25",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.d.ts b/intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.d.ts
new file mode 100644
index 0000000000..dcef951fcb
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.d.ts
@@ -0,0 +1,36 @@
+import { u16, usize } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+
+/**
+
+ * An object that represents the Script_Extensions property for a single character
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html Rust documentation for `ScriptExtensionsSet`} for more information.
+ */
+export class ICU4XScriptExtensionsSet {
+
+ /**
+
+ * Check if the Script_Extensions property of the given code point covers the given script
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.contains Rust documentation for `contains`} for more information.
+ */
+ contains(script: u16): boolean;
+
+ /**
+
+ * Get the number of scripts contained in here
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.iter Rust documentation for `iter`} for more information.
+ */
+ count(): usize;
+
+ /**
+
+ * Get script at index, returning an error if out of bounds
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.iter Rust documentation for `iter`} for more information.
+ * @throws {@link FFIError}<void>
+ */
+ script_at(index: usize): u16 | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.js b/intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.js
new file mode 100644
index 0000000000..c0a95a662b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.js
@@ -0,0 +1,42 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XScriptExtensionsSet_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XScriptExtensionsSet_destroy(underlying);
+});
+
+export class ICU4XScriptExtensionsSet {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XScriptExtensionsSet_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ contains(arg_script) {
+ return wasm.ICU4XScriptExtensionsSet_contains(this.underlying, arg_script);
+ }
+
+ count() {
+ return wasm.ICU4XScriptExtensionsSet_count(this.underlying);
+ }
+
+ script_at(arg_index) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(3, 2);
+ wasm.ICU4XScriptExtensionsSet_script_at(diplomat_receive_buffer, this.underlying, arg_index);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 2);
+ if (is_ok) {
+ const ok_value = (new Uint16Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0];
+ wasm.diplomat_free(diplomat_receive_buffer, 3, 2);
+ return ok_value;
+ } else {
+ const throw_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 3, 2);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.d.ts b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.d.ts
new file mode 100644
index 0000000000..1c994a1c59
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.d.ts
@@ -0,0 +1,54 @@
+import { u16, u32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { CodePointRangeIterator } from "./CodePointRangeIterator";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XScriptWithExtensionsBorrowed } from "./ICU4XScriptWithExtensionsBorrowed";
+
+/**
+
+ * An ICU4X ScriptWithExtensions map object, capable of holding a map of codepoints to scriptextensions values
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html Rust documentation for `ScriptWithExtensions`} for more information.
+ */
+export class ICU4XScriptWithExtensions {
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/fn.script_with_extensions.html Rust documentation for `script_with_extensions`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XScriptWithExtensions | never;
+
+ /**
+
+ * Get the Script property value for a code point
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_val Rust documentation for `get_script_val`} for more information.
+ */
+ get_script_val(code_point: u32): u16;
+
+ /**
+
+ * Check if the Script_Extensions property of the given code point covers the given script
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.has_script Rust documentation for `has_script`} for more information.
+ */
+ has_script(code_point: u32, script: u16): boolean;
+
+ /**
+
+ * Borrow this object for a slightly faster variant with more operations
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html#method.as_borrowed Rust documentation for `as_borrowed`} for more information.
+ */
+ as_borrowed(): ICU4XScriptWithExtensionsBorrowed;
+
+ /**
+
+ * Get a list of ranges of code points that contain this script in their Script_Extensions values
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_ranges Rust documentation for `get_script_extensions_ranges`} for more information.
+ */
+ iter_ranges_for_script(script: u16): CodePointRangeIterator;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.js b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.js
new file mode 100644
index 0000000000..fc5be89c87
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.js
@@ -0,0 +1,53 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { CodePointRangeIterator } from "./CodePointRangeIterator.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XScriptWithExtensionsBorrowed } from "./ICU4XScriptWithExtensionsBorrowed.js"
+
+const ICU4XScriptWithExtensions_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XScriptWithExtensions_destroy(underlying);
+});
+
+export class ICU4XScriptWithExtensions {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XScriptWithExtensions_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XScriptWithExtensions_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XScriptWithExtensions(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ get_script_val(arg_code_point) {
+ return wasm.ICU4XScriptWithExtensions_get_script_val(this.underlying, arg_code_point);
+ }
+
+ has_script(arg_code_point, arg_script) {
+ return wasm.ICU4XScriptWithExtensions_has_script(this.underlying, arg_code_point, arg_script);
+ }
+
+ as_borrowed() {
+ return new ICU4XScriptWithExtensionsBorrowed(wasm.ICU4XScriptWithExtensions_as_borrowed(this.underlying), true, [this]);
+ }
+
+ iter_ranges_for_script(arg_script) {
+ return new CodePointRangeIterator(wasm.ICU4XScriptWithExtensions_iter_ranges_for_script(this.underlying, arg_script), true, [this]);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.d.ts b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.d.ts
new file mode 100644
index 0000000000..0e44554e0e
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.d.ts
@@ -0,0 +1,44 @@
+import { u16, u32 } from "./diplomat-runtime"
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData";
+import { ICU4XScriptExtensionsSet } from "./ICU4XScriptExtensionsSet";
+
+/**
+
+ * A slightly faster ICU4XScriptWithExtensions object
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html Rust documentation for `ScriptWithExtensionsBorrowed`} for more information.
+ */
+export class ICU4XScriptWithExtensionsBorrowed {
+
+ /**
+
+ * Get the Script property value for a code point
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_val Rust documentation for `get_script_val`} for more information.
+ */
+ get_script_val(code_point: u32): u16;
+
+ /**
+
+ * Get the Script property value for a code point
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_val Rust documentation for `get_script_extensions_val`} for more information.
+ */
+ get_script_extensions_val(code_point: u32): ICU4XScriptExtensionsSet;
+
+ /**
+
+ * Check if the Script_Extensions property of the given code point covers the given script
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.has_script Rust documentation for `has_script`} for more information.
+ */
+ has_script(code_point: u32, script: u16): boolean;
+
+ /**
+
+ * Build the CodePointSetData corresponding to a codepoints matching a particular script in their Script_Extensions
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_set Rust documentation for `get_script_extensions_set`} for more information.
+ */
+ get_script_extensions_set(script: u16): ICU4XCodePointSetData;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.js b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.js
new file mode 100644
index 0000000000..073a493f8c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.js
@@ -0,0 +1,35 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData.js"
+import { ICU4XScriptExtensionsSet } from "./ICU4XScriptExtensionsSet.js"
+
+const ICU4XScriptWithExtensionsBorrowed_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XScriptWithExtensionsBorrowed_destroy(underlying);
+});
+
+export class ICU4XScriptWithExtensionsBorrowed {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XScriptWithExtensionsBorrowed_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ get_script_val(arg_code_point) {
+ return wasm.ICU4XScriptWithExtensionsBorrowed_get_script_val(this.underlying, arg_code_point);
+ }
+
+ get_script_extensions_val(arg_code_point) {
+ return new ICU4XScriptExtensionsSet(wasm.ICU4XScriptWithExtensionsBorrowed_get_script_extensions_val(this.underlying, arg_code_point), true, [this]);
+ }
+
+ has_script(arg_code_point, arg_script) {
+ return wasm.ICU4XScriptWithExtensionsBorrowed_has_script(this.underlying, arg_code_point, arg_script);
+ }
+
+ get_script_extensions_set(arg_script) {
+ return new ICU4XCodePointSetData(wasm.ICU4XScriptWithExtensionsBorrowed_get_script_extensions_set(this.underlying, arg_script), true, []);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.d.ts b/intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.d.ts
new file mode 100644
index 0000000000..35eae4becf
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/enum.WordType.html Rust documentation for `WordType`} for more information.
+ */
+export enum ICU4XSegmenterWordType {
+ /**
+ */
+ None = 'None',
+ /**
+ */
+ Number = 'Number',
+ /**
+ */
+ Letter = 'Letter',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.js b/intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.js
new file mode 100644
index 0000000000..390fdb45ca
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XSegmenterWordType_js_to_rust = {
+ "None": 0,
+ "Number": 1,
+ "Letter": 2,
+};
+
+export const ICU4XSegmenterWordType_rust_to_js = {
+ [0]: "None",
+ [1]: "Number",
+ [2]: "Letter",
+};
+
+export const ICU4XSegmenterWordType = {
+ "None": "None",
+ "Number": "Number",
+ "Letter": "Letter",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.d.ts b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.d.ts
new file mode 100644
index 0000000000..1601ae83ba
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.d.ts
@@ -0,0 +1,16 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html Rust documentation for `SentenceBreakIterator`} for more information.
+ */
+export class ICU4XSentenceBreakIteratorLatin1 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.js b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.js
new file mode 100644
index 0000000000..674e015a7d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XSentenceBreakIteratorLatin1_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XSentenceBreakIteratorLatin1_destroy(underlying);
+});
+
+export class ICU4XSentenceBreakIteratorLatin1 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XSentenceBreakIteratorLatin1_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XSentenceBreakIteratorLatin1_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.d.ts b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.d.ts
new file mode 100644
index 0000000000..76b4e04d32
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.d.ts
@@ -0,0 +1,16 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html Rust documentation for `SentenceBreakIterator`} for more information.
+ */
+export class ICU4XSentenceBreakIteratorUtf16 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.js b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.js
new file mode 100644
index 0000000000..8a69b6907e
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XSentenceBreakIteratorUtf16_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XSentenceBreakIteratorUtf16_destroy(underlying);
+});
+
+export class ICU4XSentenceBreakIteratorUtf16 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XSentenceBreakIteratorUtf16_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XSentenceBreakIteratorUtf16_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.d.ts b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.d.ts
new file mode 100644
index 0000000000..b4080e2112
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.d.ts
@@ -0,0 +1,16 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html Rust documentation for `SentenceBreakIterator`} for more information.
+ */
+export class ICU4XSentenceBreakIteratorUtf8 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.js b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.js
new file mode 100644
index 0000000000..cd140f513b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XSentenceBreakIteratorUtf8_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XSentenceBreakIteratorUtf8_destroy(underlying);
+});
+
+export class ICU4XSentenceBreakIteratorUtf8 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XSentenceBreakIteratorUtf8_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XSentenceBreakIteratorUtf8_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.d.ts b/intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.d.ts
new file mode 100644
index 0000000000..acda263fad
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.d.ts
@@ -0,0 +1,48 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XSentenceBreakIteratorLatin1 } from "./ICU4XSentenceBreakIteratorLatin1";
+import { ICU4XSentenceBreakIteratorUtf16 } from "./ICU4XSentenceBreakIteratorUtf16";
+import { ICU4XSentenceBreakIteratorUtf8 } from "./ICU4XSentenceBreakIteratorUtf8";
+
+/**
+
+ * An ICU4X sentence-break segmenter, capable of finding sentence breakpoints in strings.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html Rust documentation for `SentenceSegmenter`} for more information.
+ */
+export class ICU4XSentenceSegmenter {
+
+ /**
+
+ * Construct an {@link ICU4XSentenceSegmenter `ICU4XSentenceSegmenter`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XSentenceSegmenter | never;
+
+ /**
+
+ * Segments a (potentially ill-formed) UTF-8 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_utf8 Rust documentation for `segment_utf8`} for more information.
+ */
+ segment_utf8(input: string): ICU4XSentenceBreakIteratorUtf8;
+
+ /**
+
+ * Segments a UTF-16 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_utf16 Rust documentation for `segment_utf16`} for more information.
+ */
+ segment_utf16(input: Uint16Array): ICU4XSentenceBreakIteratorUtf16;
+
+ /**
+
+ * Segments a Latin-1 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_latin1 Rust documentation for `segment_latin1`} for more information.
+ */
+ segment_latin1(input: Uint8Array): ICU4XSentenceBreakIteratorLatin1;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.js b/intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.js
new file mode 100644
index 0000000000..de617070a2
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.js
@@ -0,0 +1,53 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XSentenceBreakIteratorLatin1 } from "./ICU4XSentenceBreakIteratorLatin1.js"
+import { ICU4XSentenceBreakIteratorUtf16 } from "./ICU4XSentenceBreakIteratorUtf16.js"
+import { ICU4XSentenceBreakIteratorUtf8 } from "./ICU4XSentenceBreakIteratorUtf8.js"
+
+const ICU4XSentenceSegmenter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XSentenceSegmenter_destroy(underlying);
+});
+
+export class ICU4XSentenceSegmenter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XSentenceSegmenter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XSentenceSegmenter_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XSentenceSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ segment_utf8(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.str(wasm, arg_input);
+ return new ICU4XSentenceBreakIteratorUtf8(wasm.ICU4XSentenceSegmenter_segment_utf8(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_utf16(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 2);
+ return new ICU4XSentenceBreakIteratorUtf16(wasm.ICU4XSentenceSegmenter_segment_utf16(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_latin1(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 1);
+ return new ICU4XSentenceBreakIteratorLatin1(wasm.ICU4XSentenceSegmenter_segment_latin1(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTime.d.ts b/intl/icu_capi/js/package/lib/ICU4XTime.d.ts
new file mode 100644
index 0000000000..14956745b6
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTime.d.ts
@@ -0,0 +1,62 @@
+import { u8, u32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html Rust documentation for `Time`} for more information.
+ */
+export class ICU4XTime {
+
+ /**
+
+ * Creates a new {@link ICU4XTime `ICU4XTime`} given field values
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html Rust documentation for `Time`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(hour: u8, minute: u8, second: u8, nanosecond: u32): ICU4XTime | never;
+
+ /**
+
+ * Creates a new {@link ICU4XTime `ICU4XTime`} representing midnight (00:00.000).
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html Rust documentation for `Time`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_midnight(): ICU4XTime | never;
+
+ /**
+
+ * Returns the hour in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour Rust documentation for `hour`} for more information.
+ */
+ hour(): u8;
+
+ /**
+
+ * Returns the minute in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute Rust documentation for `minute`} for more information.
+ */
+ minute(): u8;
+
+ /**
+
+ * Returns the second in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second Rust documentation for `second`} for more information.
+ */
+ second(): u8;
+
+ /**
+
+ * Returns the nanosecond in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond Rust documentation for `nanosecond`} for more information.
+ */
+ nanosecond(): u32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTime.js b/intl/icu_capi/js/package/lib/ICU4XTime.js
new file mode 100644
index 0000000000..7f87801e9c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTime.js
@@ -0,0 +1,68 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XTime_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XTime_destroy(underlying);
+});
+
+export class ICU4XTime {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XTime_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_hour, arg_minute, arg_second, arg_nanosecond) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTime_create(diplomat_receive_buffer, arg_hour, arg_minute, arg_second, arg_nanosecond);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XTime(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_midnight() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTime_create_midnight(diplomat_receive_buffer);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XTime(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ hour() {
+ return wasm.ICU4XTime_hour(this.underlying);
+ }
+
+ minute() {
+ return wasm.ICU4XTime_minute(this.underlying);
+ }
+
+ second() {
+ return wasm.ICU4XTime_second(this.underlying);
+ }
+
+ nanosecond() {
+ return wasm.ICU4XTime_nanosecond(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTimeFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XTimeFormatter.d.ts
new file mode 100644
index 0000000000..f5d3da0813
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTimeFormatter.d.ts
@@ -0,0 +1,53 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDateTime } from "./ICU4XDateTime";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTime } from "./ICU4XTime";
+import { ICU4XTimeLength } from "./ICU4XTimeLength";
+
+/**
+
+ * An ICU4X TimeFormatter object capable of formatting an {@link ICU4XTime `ICU4XTime`} type (and others) as a string
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html Rust documentation for `TimeFormatter`} for more information.
+ */
+export class ICU4XTimeFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XTimeFormatter `ICU4XTimeFormatter`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.try_new_with_length Rust documentation for `try_new_with_length`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, length: ICU4XTimeLength): ICU4XTimeFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XTime `ICU4XTime`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_time(value: ICU4XTime): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XDateTime `ICU4XDateTime`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_datetime(value: ICU4XDateTime): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_datetime(value: ICU4XIsoDateTime): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTimeFormatter.js b/intl/icu_capi/js/package/lib/ICU4XTimeFormatter.js
new file mode 100644
index 0000000000..9b7fb7e1a8
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTimeFormatter.js
@@ -0,0 +1,93 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XTimeLength_js_to_rust, ICU4XTimeLength_rust_to_js } from "./ICU4XTimeLength.js"
+
+const ICU4XTimeFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XTimeFormatter_destroy(underlying);
+});
+
+export class ICU4XTimeFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XTimeFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_length(arg_provider, arg_locale, arg_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeFormatter_create_with_length(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XTimeLength_js_to_rust[arg_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XTimeFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_time(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeFormatter_format_time(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeFormatter_format_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_iso_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeFormatter_format_iso_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTimeLength.d.ts b/intl/icu_capi/js/package/lib/ICU4XTimeLength.d.ts
new file mode 100644
index 0000000000..ac90d6175b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTimeLength.d.ts
@@ -0,0 +1,19 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/options/length/enum.Time.html Rust documentation for `Time`} for more information.
+ */
+export enum ICU4XTimeLength {
+ /**
+ */
+ Full = 'Full',
+ /**
+ */
+ Long = 'Long',
+ /**
+ */
+ Medium = 'Medium',
+ /**
+ */
+ Short = 'Short',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XTimeLength.js b/intl/icu_capi/js/package/lib/ICU4XTimeLength.js
new file mode 100644
index 0000000000..f8a9c7e5f0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTimeLength.js
@@ -0,0 +1,23 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XTimeLength_js_to_rust = {
+ "Full": 0,
+ "Long": 1,
+ "Medium": 2,
+ "Short": 3,
+};
+
+export const ICU4XTimeLength_rust_to_js = {
+ [0]: "Full",
+ [1]: "Long",
+ [2]: "Medium",
+ [3]: "Short",
+};
+
+export const ICU4XTimeLength = {
+ "Full": "Full",
+ "Long": "Long",
+ "Medium": "Medium",
+ "Short": "Short",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.d.ts
new file mode 100644
index 0000000000..feae2fc234
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.d.ts
@@ -0,0 +1,115 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCustomTimeZone } from "./ICU4XCustomTimeZone";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoTimeZoneOptions } from "./ICU4XIsoTimeZoneOptions";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * An ICU4X TimeZoneFormatter object capable of formatting an {@link ICU4XCustomTimeZone `ICU4XCustomTimeZone`} type (and others) as a string
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html Rust documentation for `TimeZoneFormatter`} for more information.
+ */
+export class ICU4XTimeZoneFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XTimeZoneFormatter `ICU4XTimeZoneFormatter`} from locale data.
+
+ * Uses localized GMT as the fallback format.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/datetime/time_zone/enum.FallbackFormat.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_localized_gmt_fallback(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XTimeZoneFormatter | never;
+
+ /**
+
+ * Creates a new {@link ICU4XTimeZoneFormatter `ICU4XTimeZoneFormatter`} from locale data.
+
+ * Uses ISO-8601 as the fallback format.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/datetime/time_zone/enum.FallbackFormat.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_iso_8601_fallback(provider: ICU4XDataProvider, locale: ICU4XLocale, options: ICU4XIsoTimeZoneOptions): ICU4XTimeZoneFormatter | never;
+
+ /**
+
+ * Loads generic non-location long format. Example: "Pacific Time"
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_non_location_long Rust documentation for `include_generic_non_location_long`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ load_generic_non_location_long(provider: ICU4XDataProvider): void | never;
+
+ /**
+
+ * Loads generic non-location short format. Example: "PT"
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_non_location_short Rust documentation for `include_generic_non_location_short`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ load_generic_non_location_short(provider: ICU4XDataProvider): void | never;
+
+ /**
+
+ * Loads specific non-location long format. Example: "Pacific Standard Time"
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_specific_non_location_long Rust documentation for `include_specific_non_location_long`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ load_specific_non_location_long(provider: ICU4XDataProvider): void | never;
+
+ /**
+
+ * Loads specific non-location short format. Example: "PST"
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_specific_non_location_short Rust documentation for `include_specific_non_location_short`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ load_specific_non_location_short(provider: ICU4XDataProvider): void | never;
+
+ /**
+
+ * Loads generic location format. Example: "Los Angeles Time"
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_location_format Rust documentation for `include_generic_location_format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ load_generic_location_format(provider: ICU4XDataProvider): void | never;
+
+ /**
+
+ * Loads localized GMT format. Example: "GMT-07:00"
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_localized_gmt_format Rust documentation for `include_localized_gmt_format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ include_localized_gmt_format(): void | never;
+
+ /**
+
+ * Loads ISO-8601 format. Example: "-07:00"
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_iso_8601_format Rust documentation for `include_iso_8601_format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ load_iso_8601_format(options: ICU4XIsoTimeZoneOptions): void | never;
+
+ /**
+
+ * Formats a {@link ICU4XCustomTimeZone `ICU4XCustomTimeZone`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format Rust documentation for `format`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format_to_string Rust documentation for `format_to_string`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_custom_time_zone(value: ICU4XCustomTimeZone): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.js b/intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.js
new file mode 100644
index 0000000000..9d2e4500de
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.js
@@ -0,0 +1,199 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoTimeZoneFormat_js_to_rust, ICU4XIsoTimeZoneFormat_rust_to_js } from "./ICU4XIsoTimeZoneFormat.js"
+import { ICU4XIsoTimeZoneMinuteDisplay_js_to_rust, ICU4XIsoTimeZoneMinuteDisplay_rust_to_js } from "./ICU4XIsoTimeZoneMinuteDisplay.js"
+import { ICU4XIsoTimeZoneSecondDisplay_js_to_rust, ICU4XIsoTimeZoneSecondDisplay_rust_to_js } from "./ICU4XIsoTimeZoneSecondDisplay.js"
+
+const ICU4XTimeZoneFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XTimeZoneFormatter_destroy(underlying);
+});
+
+export class ICU4XTimeZoneFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XTimeZoneFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_localized_gmt_fallback(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_create_with_localized_gmt_fallback(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XTimeZoneFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_with_iso_8601_fallback(arg_provider, arg_locale, arg_options) {
+ const field_format_arg_options = arg_options["format"];
+ const field_minutes_arg_options = arg_options["minutes"];
+ const field_seconds_arg_options = arg_options["seconds"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_create_with_iso_8601_fallback(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XIsoTimeZoneFormat_js_to_rust[field_format_arg_options], ICU4XIsoTimeZoneMinuteDisplay_js_to_rust[field_minutes_arg_options], ICU4XIsoTimeZoneSecondDisplay_js_to_rust[field_seconds_arg_options]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XTimeZoneFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ load_generic_non_location_long(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_load_generic_non_location_long(diplomat_receive_buffer, this.underlying, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ load_generic_non_location_short(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_load_generic_non_location_short(diplomat_receive_buffer, this.underlying, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ load_specific_non_location_long(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_load_specific_non_location_long(diplomat_receive_buffer, this.underlying, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ load_specific_non_location_short(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_load_specific_non_location_short(diplomat_receive_buffer, this.underlying, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ load_generic_location_format(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_load_generic_location_format(diplomat_receive_buffer, this.underlying, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ include_localized_gmt_format() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_include_localized_gmt_format(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ load_iso_8601_format(arg_options) {
+ const field_format_arg_options = arg_options["format"];
+ const field_minutes_arg_options = arg_options["minutes"];
+ const field_seconds_arg_options = arg_options["seconds"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_load_iso_8601_format(diplomat_receive_buffer, this.underlying, ICU4XIsoTimeZoneFormat_js_to_rust[field_format_arg_options], ICU4XIsoTimeZoneMinuteDisplay_js_to_rust[field_minutes_arg_options], ICU4XIsoTimeZoneSecondDisplay_js_to_rust[field_seconds_arg_options]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_custom_time_zone(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_format_custom_time_zone(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.d.ts b/intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.d.ts
new file mode 100644
index 0000000000..dc2f41f866
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.d.ts
@@ -0,0 +1,32 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTitlecaseOptionsV1 } from "./ICU4XTitlecaseOptionsV1";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html Rust documentation for `TitlecaseMapper`} for more information.
+ */
+export class ICU4XTitlecaseMapper {
+
+ /**
+
+ * Construct a new `ICU4XTitlecaseMapper` instance
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XTitlecaseMapper | never;
+
+ /**
+
+ * Returns the full titlecase mapping of the given string
+
+ * The `v1` refers to the version of the options struct, which may change as we add more options
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.titlecase_segment Rust documentation for `titlecase_segment`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ titlecase_segment_v1(s: string, locale: ICU4XLocale, options: ICU4XTitlecaseOptionsV1): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.js b/intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.js
new file mode 100644
index 0000000000..c25bf08702
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.js
@@ -0,0 +1,61 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XLeadingAdjustment_js_to_rust, ICU4XLeadingAdjustment_rust_to_js } from "./ICU4XLeadingAdjustment.js"
+import { ICU4XTrailingCase_js_to_rust, ICU4XTrailingCase_rust_to_js } from "./ICU4XTrailingCase.js"
+
+const ICU4XTitlecaseMapper_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XTitlecaseMapper_destroy(underlying);
+});
+
+export class ICU4XTitlecaseMapper {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XTitlecaseMapper_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTitlecaseMapper_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XTitlecaseMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ titlecase_segment_v1(arg_s, arg_locale, arg_options) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const field_leading_adjustment_arg_options = arg_options["leading_adjustment"];
+ const field_trailing_case_arg_options = arg_options["trailing_case"];
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTitlecaseMapper_titlecase_segment_v1(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, arg_locale.underlying, ICU4XLeadingAdjustment_js_to_rust[field_leading_adjustment_arg_options], ICU4XTrailingCase_js_to_rust[field_trailing_case_arg_options], writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.d.ts b/intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.d.ts
new file mode 100644
index 0000000000..949043ecac
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.d.ts
@@ -0,0 +1,17 @@
+import { ICU4XLeadingAdjustment } from "./ICU4XLeadingAdjustment";
+import { ICU4XTrailingCase } from "./ICU4XTrailingCase";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/titlecase/struct.TitlecaseOptions.html Rust documentation for `TitlecaseOptions`} for more information.
+ */
+export class ICU4XTitlecaseOptionsV1 {
+ leading_adjustment: ICU4XLeadingAdjustment;
+ trailing_case: ICU4XTrailingCase;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/titlecase/struct.TitlecaseOptions.html#method.default Rust documentation for `default`} for more information.
+ */
+ static default_options(): ICU4XTitlecaseOptionsV1;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.js b/intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.js
new file mode 100644
index 0000000000..e1325f6abc
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XLeadingAdjustment_js_to_rust, ICU4XLeadingAdjustment_rust_to_js } from "./ICU4XLeadingAdjustment.js"
+import { ICU4XTrailingCase_js_to_rust, ICU4XTrailingCase_rust_to_js } from "./ICU4XTrailingCase.js"
+
+export class ICU4XTitlecaseOptionsV1 {
+ constructor(underlying) {
+ this.leading_adjustment = ICU4XLeadingAdjustment_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying)];
+ this.trailing_case = ICU4XTrailingCase_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 4)];
+ }
+
+ static default_options() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(8, 4);
+ wasm.ICU4XTitlecaseOptionsV1_default_options(diplomat_receive_buffer);
+ const out = new ICU4XTitlecaseOptionsV1(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 8, 4);
+ return out;
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTrailingCase.d.ts b/intl/icu_capi/js/package/lib/ICU4XTrailingCase.d.ts
new file mode 100644
index 0000000000..efd1abe729
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTrailingCase.d.ts
@@ -0,0 +1,13 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/titlecase/enum.TrailingCase.html Rust documentation for `TrailingCase`} for more information.
+ */
+export enum ICU4XTrailingCase {
+ /**
+ */
+ Lower = 'Lower',
+ /**
+ */
+ Unchanged = 'Unchanged',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XTrailingCase.js b/intl/icu_capi/js/package/lib/ICU4XTrailingCase.js
new file mode 100644
index 0000000000..6630717842
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTrailingCase.js
@@ -0,0 +1,17 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XTrailingCase_js_to_rust = {
+ "Lower": 0,
+ "Unchanged": 1,
+};
+
+export const ICU4XTrailingCase_rust_to_js = {
+ [0]: "Lower",
+ [1]: "Unchanged",
+};
+
+export const ICU4XTrailingCase = {
+ "Lower": "Lower",
+ "Unchanged": "Unchanged",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XTransformResult.d.ts b/intl/icu_capi/js/package/lib/ICU4XTransformResult.d.ts
new file mode 100644
index 0000000000..e741659ea9
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTransformResult.d.ts
@@ -0,0 +1,15 @@
+
+/**
+
+ * FFI version of `TransformResult`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/enum.TransformResult.html Rust documentation for `TransformResult`} for more information.
+ */
+export enum ICU4XTransformResult {
+ /**
+ */
+ Modified = 'Modified',
+ /**
+ */
+ Unmodified = 'Unmodified',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XTransformResult.js b/intl/icu_capi/js/package/lib/ICU4XTransformResult.js
new file mode 100644
index 0000000000..db68a34f0f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTransformResult.js
@@ -0,0 +1,17 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XTransformResult_js_to_rust = {
+ "Modified": 0,
+ "Unmodified": 1,
+};
+
+export const ICU4XTransformResult_rust_to_js = {
+ [0]: "Modified",
+ [1]: "Unmodified",
+};
+
+export const ICU4XTransformResult = {
+ "Modified": "Modified",
+ "Unmodified": "Unmodified",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.d.ts b/intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.d.ts
new file mode 100644
index 0000000000..117ae86f2c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.d.ts
@@ -0,0 +1,82 @@
+import { u32, char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/index.html Rust documentation for `properties`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetData.html Rust documentation for `UnicodeSetData`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html Rust documentation for `UnicodeSetDataBorrowed`} for more information.
+ */
+export class ICU4XUnicodeSetData {
+
+ /**
+
+ * Checks whether the string is in the set.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html#method.contains Rust documentation for `contains`} for more information.
+ */
+ contains(s: string): boolean;
+
+ /**
+
+ * Checks whether the code point is in the set.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html#method.contains_char Rust documentation for `contains_char`} for more information.
+ */
+ contains_char(cp: char): boolean;
+
+ /**
+
+ * Checks whether the code point (specified as a 32 bit integer, in UTF-32) is in the set.
+ */
+ contains32(cp: u32): boolean;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.basic_emoji.html Rust documentation for `basic_emoji`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_basic_emoji(provider: ICU4XDataProvider): ICU4XUnicodeSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_main.html Rust documentation for `exemplars_main`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_exemplars_main(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XUnicodeSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_auxiliary.html Rust documentation for `exemplars_auxiliary`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_exemplars_auxiliary(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XUnicodeSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_punctuation.html Rust documentation for `exemplars_punctuation`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_exemplars_punctuation(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XUnicodeSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_numbers.html Rust documentation for `exemplars_numbers`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_exemplars_numbers(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XUnicodeSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_index.html Rust documentation for `exemplars_index`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_exemplars_index(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XUnicodeSetData | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.js b/intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.js
new file mode 100644
index 0000000000..b345a10123
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.js
@@ -0,0 +1,135 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XUnicodeSetData_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XUnicodeSetData_destroy(underlying);
+});
+
+export class ICU4XUnicodeSetData {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XUnicodeSetData_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ contains(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = wasm.ICU4XUnicodeSetData_contains(this.underlying, buf_arg_s.ptr, buf_arg_s.size);
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ contains_char(arg_cp) {
+ return wasm.ICU4XUnicodeSetData_contains_char(this.underlying, diplomatRuntime.extractCodePoint(arg_cp, 'arg_cp'));
+ }
+
+ contains32(arg_cp) {
+ return wasm.ICU4XUnicodeSetData_contains32(this.underlying, arg_cp);
+ }
+
+ static load_basic_emoji(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XUnicodeSetData_load_basic_emoji(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XUnicodeSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_exemplars_main(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XUnicodeSetData_load_exemplars_main(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XUnicodeSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_exemplars_auxiliary(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XUnicodeSetData_load_exemplars_auxiliary(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XUnicodeSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_exemplars_punctuation(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XUnicodeSetData_load_exemplars_punctuation(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XUnicodeSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_exemplars_numbers(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XUnicodeSetData_load_exemplars_numbers(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XUnicodeSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_exemplars_index(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XUnicodeSetData_load_exemplars_index(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XUnicodeSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWeekCalculator.d.ts b/intl/icu_capi/js/package/lib/ICU4XWeekCalculator.d.ts
new file mode 100644
index 0000000000..cf60ebbc18
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWeekCalculator.d.ts
@@ -0,0 +1,46 @@
+import { u8 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoWeekday } from "./ICU4XIsoWeekday";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * A Week calculator, useful to be passed in to `week_of_year()` on Date and DateTime types
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html Rust documentation for `WeekCalculator`} for more information.
+ */
+export class ICU4XWeekCalculator {
+
+ /**
+
+ * Creates a new {@link ICU4XWeekCalculator `ICU4XWeekCalculator`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XWeekCalculator | never;
+
+ /**
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.first_weekday 1}, {@link https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.min_week_days 2}
+ */
+ static create_from_first_day_of_week_and_min_week_days(first_weekday: ICU4XIsoWeekday, min_week_days: u8): ICU4XWeekCalculator;
+
+ /**
+
+ * Returns the weekday that starts the week for this object's locale
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.first_weekday Rust documentation for `first_weekday`} for more information.
+ */
+ first_weekday(): ICU4XIsoWeekday;
+
+ /**
+
+ * The minimum number of days overlapping a year required for a week to be considered part of that year
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.min_week_days Rust documentation for `min_week_days`} for more information.
+ */
+ min_week_days(): u8;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWeekCalculator.js b/intl/icu_capi/js/package/lib/ICU4XWeekCalculator.js
new file mode 100644
index 0000000000..7b3110538d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWeekCalculator.js
@@ -0,0 +1,48 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoWeekday_js_to_rust, ICU4XIsoWeekday_rust_to_js } from "./ICU4XIsoWeekday.js"
+
+const ICU4XWeekCalculator_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XWeekCalculator_destroy(underlying);
+});
+
+export class ICU4XWeekCalculator {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XWeekCalculator_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XWeekCalculator_create(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XWeekCalculator(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_from_first_day_of_week_and_min_week_days(arg_first_weekday, arg_min_week_days) {
+ return new ICU4XWeekCalculator(wasm.ICU4XWeekCalculator_create_from_first_day_of_week_and_min_week_days(ICU4XIsoWeekday_js_to_rust[arg_first_weekday], arg_min_week_days), true, []);
+ }
+
+ first_weekday() {
+ return ICU4XIsoWeekday_rust_to_js[wasm.ICU4XWeekCalculator_first_weekday(this.underlying)];
+ }
+
+ min_week_days() {
+ return wasm.ICU4XWeekCalculator_min_week_days(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWeekOf.d.ts b/intl/icu_capi/js/package/lib/ICU4XWeekOf.d.ts
new file mode 100644
index 0000000000..dfcf1eb97f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWeekOf.d.ts
@@ -0,0 +1,11 @@
+import { u16 } from "./diplomat-runtime"
+import { ICU4XWeekRelativeUnit } from "./ICU4XWeekRelativeUnit";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/week/struct.WeekOf.html Rust documentation for `WeekOf`} for more information.
+ */
+export class ICU4XWeekOf {
+ week: u16;
+ unit: ICU4XWeekRelativeUnit;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWeekOf.js b/intl/icu_capi/js/package/lib/ICU4XWeekOf.js
new file mode 100644
index 0000000000..5f74b5d1a5
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWeekOf.js
@@ -0,0 +1,10 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XWeekRelativeUnit_js_to_rust, ICU4XWeekRelativeUnit_rust_to_js } from "./ICU4XWeekRelativeUnit.js"
+
+export class ICU4XWeekOf {
+ constructor(underlying) {
+ this.week = (new Uint16Array(wasm.memory.buffer, underlying, 1))[0];
+ this.unit = ICU4XWeekRelativeUnit_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 4)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.d.ts b/intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.d.ts
new file mode 100644
index 0000000000..60a12eddb5
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/week/enum.RelativeUnit.html Rust documentation for `RelativeUnit`} for more information.
+ */
+export enum ICU4XWeekRelativeUnit {
+ /**
+ */
+ Previous = 'Previous',
+ /**
+ */
+ Current = 'Current',
+ /**
+ */
+ Next = 'Next',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.js b/intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.js
new file mode 100644
index 0000000000..685a296b20
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XWeekRelativeUnit_js_to_rust = {
+ "Previous": 0,
+ "Current": 1,
+ "Next": 2,
+};
+
+export const ICU4XWeekRelativeUnit_rust_to_js = {
+ [0]: "Previous",
+ [1]: "Current",
+ [2]: "Next",
+};
+
+export const ICU4XWeekRelativeUnit = {
+ "Previous": "Previous",
+ "Current": "Current",
+ "Next": "Next",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.d.ts b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.d.ts
new file mode 100644
index 0000000000..3bd6da5224
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.d.ts
@@ -0,0 +1,33 @@
+import { i32 } from "./diplomat-runtime"
+import { ICU4XSegmenterWordType } from "./ICU4XSegmenterWordType";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html Rust documentation for `WordBreakIterator`} for more information.
+ */
+export class ICU4XWordBreakIteratorLatin1 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+
+ /**
+
+ * Return the status value of break boundary.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type Rust documentation for `word_type`} for more information.
+ */
+ word_type(): ICU4XSegmenterWordType;
+
+ /**
+
+ * Return true when break boundary is word-like such as letter/number/CJK
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like Rust documentation for `is_word_like`} for more information.
+ */
+ is_word_like(): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.js b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.js
new file mode 100644
index 0000000000..bdeac9ae71
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.js
@@ -0,0 +1,30 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XSegmenterWordType_js_to_rust, ICU4XSegmenterWordType_rust_to_js } from "./ICU4XSegmenterWordType.js"
+
+const ICU4XWordBreakIteratorLatin1_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XWordBreakIteratorLatin1_destroy(underlying);
+});
+
+export class ICU4XWordBreakIteratorLatin1 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XWordBreakIteratorLatin1_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XWordBreakIteratorLatin1_next(this.underlying);
+ }
+
+ word_type() {
+ return ICU4XSegmenterWordType_rust_to_js[wasm.ICU4XWordBreakIteratorLatin1_word_type(this.underlying)];
+ }
+
+ is_word_like() {
+ return wasm.ICU4XWordBreakIteratorLatin1_is_word_like(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.d.ts b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.d.ts
new file mode 100644
index 0000000000..d0f67acd2d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.d.ts
@@ -0,0 +1,33 @@
+import { i32 } from "./diplomat-runtime"
+import { ICU4XSegmenterWordType } from "./ICU4XSegmenterWordType";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html Rust documentation for `WordBreakIterator`} for more information.
+ */
+export class ICU4XWordBreakIteratorUtf16 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+
+ /**
+
+ * Return the status value of break boundary.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type Rust documentation for `word_type`} for more information.
+ */
+ word_type(): ICU4XSegmenterWordType;
+
+ /**
+
+ * Return true when break boundary is word-like such as letter/number/CJK
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like Rust documentation for `is_word_like`} for more information.
+ */
+ is_word_like(): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.js b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.js
new file mode 100644
index 0000000000..7dd16d4ef0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.js
@@ -0,0 +1,30 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XSegmenterWordType_js_to_rust, ICU4XSegmenterWordType_rust_to_js } from "./ICU4XSegmenterWordType.js"
+
+const ICU4XWordBreakIteratorUtf16_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XWordBreakIteratorUtf16_destroy(underlying);
+});
+
+export class ICU4XWordBreakIteratorUtf16 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XWordBreakIteratorUtf16_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XWordBreakIteratorUtf16_next(this.underlying);
+ }
+
+ word_type() {
+ return ICU4XSegmenterWordType_rust_to_js[wasm.ICU4XWordBreakIteratorUtf16_word_type(this.underlying)];
+ }
+
+ is_word_like() {
+ return wasm.ICU4XWordBreakIteratorUtf16_is_word_like(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.d.ts b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.d.ts
new file mode 100644
index 0000000000..1a74af6d88
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.d.ts
@@ -0,0 +1,33 @@
+import { i32 } from "./diplomat-runtime"
+import { ICU4XSegmenterWordType } from "./ICU4XSegmenterWordType";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html Rust documentation for `WordBreakIterator`} for more information.
+ */
+export class ICU4XWordBreakIteratorUtf8 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+
+ /**
+
+ * Return the status value of break boundary.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type Rust documentation for `word_type`} for more information.
+ */
+ word_type(): ICU4XSegmenterWordType;
+
+ /**
+
+ * Return true when break boundary is word-like such as letter/number/CJK
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like Rust documentation for `is_word_like`} for more information.
+ */
+ is_word_like(): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.js b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.js
new file mode 100644
index 0000000000..f4517683d2
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.js
@@ -0,0 +1,30 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XSegmenterWordType_js_to_rust, ICU4XSegmenterWordType_rust_to_js } from "./ICU4XSegmenterWordType.js"
+
+const ICU4XWordBreakIteratorUtf8_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XWordBreakIteratorUtf8_destroy(underlying);
+});
+
+export class ICU4XWordBreakIteratorUtf8 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XWordBreakIteratorUtf8_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XWordBreakIteratorUtf8_next(this.underlying);
+ }
+
+ word_type() {
+ return ICU4XSegmenterWordType_rust_to_js[wasm.ICU4XWordBreakIteratorUtf8_word_type(this.underlying)];
+ }
+
+ is_word_like() {
+ return wasm.ICU4XWordBreakIteratorUtf8_is_word_like(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordSegmenter.d.ts b/intl/icu_capi/js/package/lib/ICU4XWordSegmenter.d.ts
new file mode 100644
index 0000000000..3c553428fd
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordSegmenter.d.ts
@@ -0,0 +1,70 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XWordBreakIteratorLatin1 } from "./ICU4XWordBreakIteratorLatin1";
+import { ICU4XWordBreakIteratorUtf16 } from "./ICU4XWordBreakIteratorUtf16";
+import { ICU4XWordBreakIteratorUtf8 } from "./ICU4XWordBreakIteratorUtf8";
+
+/**
+
+ * An ICU4X word-break segmenter, capable of finding word breakpoints in strings.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html Rust documentation for `WordSegmenter`} for more information.
+ */
+export class ICU4XWordSegmenter {
+
+ /**
+
+ * Construct an {@link ICU4XWordSegmenter `ICU4XWordSegmenter`} with automatically selecting the best available LSTM or dictionary payload data.
+
+ * Note: currently, it uses dictionary for Chinese and Japanese, and LSTM for Burmese, Khmer, Lao, and Thai.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_auto Rust documentation for `new_auto`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_auto(provider: ICU4XDataProvider): ICU4XWordSegmenter | never;
+
+ /**
+
+ * Construct an {@link ICU4XWordSegmenter `ICU4XWordSegmenter`} with LSTM payload data for Burmese, Khmer, Lao, and Thai.
+
+ * Warning: {@link ICU4XWordSegmenter `ICU4XWordSegmenter`} created by this function doesn't handle Chinese or Japanese.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_lstm Rust documentation for `new_lstm`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_lstm(provider: ICU4XDataProvider): ICU4XWordSegmenter | never;
+
+ /**
+
+ * Construct an {@link ICU4XWordSegmenter `ICU4XWordSegmenter`} with dictionary payload data for Chinese, Japanese, Burmese, Khmer, Lao, and Thai.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_dictionary Rust documentation for `new_dictionary`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_dictionary(provider: ICU4XDataProvider): ICU4XWordSegmenter | never;
+
+ /**
+
+ * Segments a (potentially ill-formed) UTF-8 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_utf8 Rust documentation for `segment_utf8`} for more information.
+ */
+ segment_utf8(input: string): ICU4XWordBreakIteratorUtf8;
+
+ /**
+
+ * Segments a UTF-16 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_utf16 Rust documentation for `segment_utf16`} for more information.
+ */
+ segment_utf16(input: Uint16Array): ICU4XWordBreakIteratorUtf16;
+
+ /**
+
+ * Segments a Latin-1 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_latin1 Rust documentation for `segment_latin1`} for more information.
+ */
+ segment_latin1(input: Uint8Array): ICU4XWordBreakIteratorLatin1;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordSegmenter.js b/intl/icu_capi/js/package/lib/ICU4XWordSegmenter.js
new file mode 100644
index 0000000000..f1a1b263ee
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordSegmenter.js
@@ -0,0 +1,87 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XWordBreakIteratorLatin1 } from "./ICU4XWordBreakIteratorLatin1.js"
+import { ICU4XWordBreakIteratorUtf16 } from "./ICU4XWordBreakIteratorUtf16.js"
+import { ICU4XWordBreakIteratorUtf8 } from "./ICU4XWordBreakIteratorUtf8.js"
+
+const ICU4XWordSegmenter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XWordSegmenter_destroy(underlying);
+});
+
+export class ICU4XWordSegmenter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XWordSegmenter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_auto(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XWordSegmenter_create_auto(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XWordSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_lstm(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XWordSegmenter_create_lstm(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XWordSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_dictionary(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XWordSegmenter_create_dictionary(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XWordSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ segment_utf8(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.str(wasm, arg_input);
+ return new ICU4XWordBreakIteratorUtf8(wasm.ICU4XWordSegmenter_segment_utf8(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_utf16(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 2);
+ return new ICU4XWordBreakIteratorUtf16(wasm.ICU4XWordSegmenter_segment_utf16(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_latin1(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 1);
+ return new ICU4XWordBreakIteratorLatin1(wasm.ICU4XWordSegmenter_segment_latin1(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.d.ts
new file mode 100644
index 0000000000..33dcacf995
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.d.ts
@@ -0,0 +1,59 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCustomTimeZone } from "./ICU4XCustomTimeZone";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDateLength } from "./ICU4XDateLength";
+import { ICU4XDateTime } from "./ICU4XDateTime";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XIsoTimeZoneOptions } from "./ICU4XIsoTimeZoneOptions";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTimeLength } from "./ICU4XTimeLength";
+
+/**
+
+ * An object capable of formatting a date time with time zone to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html Rust documentation for `ZonedDateTimeFormatter`} for more information.
+ */
+export class ICU4XZonedDateTimeFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XZonedDateTimeFormatter `ICU4XZonedDateTimeFormatter`} from locale data.
+
+ * This function has `date_length` and `time_length` arguments and uses default options for the time zone.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_lengths(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength, time_length: ICU4XTimeLength): ICU4XZonedDateTimeFormatter | never;
+
+ /**
+
+ * Creates a new {@link ICU4XZonedDateTimeFormatter `ICU4XZonedDateTimeFormatter`} from locale data.
+
+ * This function has `date_length` and `time_length` arguments and uses an ISO-8601 style fallback for the time zone with the given configurations.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_lengths_and_iso_8601_time_zone_fallback(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength, time_length: ICU4XTimeLength, zone_options: ICU4XIsoTimeZoneOptions): ICU4XZonedDateTimeFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XDateTime `ICU4XDateTime`} and {@link ICU4XCustomTimeZone `ICU4XCustomTimeZone`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_datetime_with_custom_time_zone(datetime: ICU4XDateTime, time_zone: ICU4XCustomTimeZone): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} and {@link ICU4XCustomTimeZone `ICU4XCustomTimeZone`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_datetime_with_custom_time_zone(datetime: ICU4XIsoDateTime, time_zone: ICU4XCustomTimeZone): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.js b/intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.js
new file mode 100644
index 0000000000..3dab173201
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.js
@@ -0,0 +1,98 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDateLength_js_to_rust, ICU4XDateLength_rust_to_js } from "./ICU4XDateLength.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoTimeZoneFormat_js_to_rust, ICU4XIsoTimeZoneFormat_rust_to_js } from "./ICU4XIsoTimeZoneFormat.js"
+import { ICU4XIsoTimeZoneMinuteDisplay_js_to_rust, ICU4XIsoTimeZoneMinuteDisplay_rust_to_js } from "./ICU4XIsoTimeZoneMinuteDisplay.js"
+import { ICU4XIsoTimeZoneSecondDisplay_js_to_rust, ICU4XIsoTimeZoneSecondDisplay_rust_to_js } from "./ICU4XIsoTimeZoneSecondDisplay.js"
+import { ICU4XTimeLength_js_to_rust, ICU4XTimeLength_rust_to_js } from "./ICU4XTimeLength.js"
+
+const ICU4XZonedDateTimeFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XZonedDateTimeFormatter_destroy(underlying);
+});
+
+export class ICU4XZonedDateTimeFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XZonedDateTimeFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_lengths(arg_provider, arg_locale, arg_date_length, arg_time_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XZonedDateTimeFormatter_create_with_lengths(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_date_length], ICU4XTimeLength_js_to_rust[arg_time_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XZonedDateTimeFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_with_lengths_and_iso_8601_time_zone_fallback(arg_provider, arg_locale, arg_date_length, arg_time_length, arg_zone_options) {
+ const field_format_arg_zone_options = arg_zone_options["format"];
+ const field_minutes_arg_zone_options = arg_zone_options["minutes"];
+ const field_seconds_arg_zone_options = arg_zone_options["seconds"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XZonedDateTimeFormatter_create_with_lengths_and_iso_8601_time_zone_fallback(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_date_length], ICU4XTimeLength_js_to_rust[arg_time_length], ICU4XIsoTimeZoneFormat_js_to_rust[field_format_arg_zone_options], ICU4XIsoTimeZoneMinuteDisplay_js_to_rust[field_minutes_arg_zone_options], ICU4XIsoTimeZoneSecondDisplay_js_to_rust[field_seconds_arg_zone_options]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XZonedDateTimeFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_datetime_with_custom_time_zone(arg_datetime, arg_time_zone) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XZonedDateTimeFormatter_format_datetime_with_custom_time_zone(diplomat_receive_buffer, this.underlying, arg_datetime.underlying, arg_time_zone.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_iso_datetime_with_custom_time_zone(arg_datetime, arg_time_zone) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XZonedDateTimeFormatter_format_iso_datetime_with_custom_time_zone(diplomat_receive_buffer, this.underlying, arg_datetime.underlying, arg_time_zone.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/diplomat-runtime.d.ts b/intl/icu_capi/js/package/lib/diplomat-runtime.d.ts
new file mode 100644
index 0000000000..8a8748b6a4
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/diplomat-runtime.d.ts
@@ -0,0 +1,20 @@
+/**
+ * An error that occurred in Rust.
+ */
+export class FFIError<E> extends Error {
+ error_value: E;
+}
+
+export type u8 = number;
+export type i8 = number;
+export type u16 = number;
+export type i16 = number;
+export type u32 = number;
+export type i32 = number;
+export type u64 = bigint;
+export type i64 = bigint;
+export type usize = number;
+export type isize = number;
+export type f32 = number;
+export type f64 = number;
+export type char = string;
diff --git a/intl/icu_capi/js/package/lib/diplomat-runtime.js b/intl/icu_capi/js/package/lib/diplomat-runtime.js
new file mode 100644
index 0000000000..75317d4a74
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/diplomat-runtime.js
@@ -0,0 +1,121 @@
+export function readString(wasm, ptr, len) {
+ const buf = new Uint8Array(wasm.memory.buffer, ptr, len);
+ return (new TextDecoder("utf-8")).decode(buf)
+}
+
+export function withWriteable(wasm, callback) {
+ const writeable = wasm.diplomat_buffer_writeable_create(0);
+ try {
+ callback(writeable);
+ const outStringPtr = wasm.diplomat_buffer_writeable_get_bytes(writeable);
+ const outStringLen = wasm.diplomat_buffer_writeable_len(writeable);
+ return readString(wasm, outStringPtr, outStringLen);
+ } finally {
+ wasm.diplomat_buffer_writeable_destroy(writeable);
+ }
+}
+
+export class FFIError extends Error {
+ constructor(error_value) {
+ super("Error over FFI");
+ this.error_value = error_value; // (2)
+ }
+}
+
+export function extractCodePoint(str, param) {
+ const cp = str.codePointAt?.(0);
+ if ((!cp && cp !== 0) || [...str]?.length != 1) {
+ throw new TypeError(`Expected single-character string for char parameter ${param}, found ${str}`);
+ }
+ return cp;
+}
+
+// Get the pointer returned by an FFI function
+//
+// It's tempting to call `(new Uint32Array(wasm.memory.buffer, FFI_func(), 1))[0]`.
+// However, there's a chance that `wasm.memory.buffer` will be resized between
+// the time it's accessed and the time it's used, invalidating the view.
+// This function ensures that the view into wasm memory is fresh.
+//
+// This is used for methods that return multiple types into a wasm buffer, where
+// one of those types is another ptr. Call this method to get access to the returned
+// ptr, so the return buffer can be freed.
+export function ptrRead(wasm, ptr) {
+ return (new Uint32Array(wasm.memory.buffer, ptr, 1))[0];
+}
+
+// Get the flag of a result type.
+export function resultFlag(wasm, ptr, offset) {
+ return (new Uint8Array(wasm.memory.buffer, ptr + offset, 1))[0];
+}
+
+// Get the discriminant of a Rust enum.
+export function enumDiscriminant(wasm, ptr) {
+ return (new Int32Array(wasm.memory.buffer, ptr, 1))[0]
+}
+
+// A wrapper around a slice of WASM memory that can be freed manually or
+// automatically by the garbage collector.
+//
+// This type is necessary for Rust functions that take a `&str` or `&[T]`, since
+// they can create an edge to this object if they borrow from the str/slice,
+// or we can manually free the WASM memory if they don't.
+export class DiplomatBuf {
+ static str = (wasm, string) => {
+ var utf8_len = 0;
+ for (const codepoint_string of string) {
+ let codepoint = codepoint_string.codePointAt(0);
+ if (codepoint < 0x80) {
+ utf8_len += 1
+ } else if (codepoint < 0x800) {
+ utf8_len += 2
+ } else if (codepoint < 0x10000) {
+ utf8_len += 3
+ } else {
+ utf8_len += 4
+ }
+ }
+ return new DiplomatBuf(wasm, utf8_len, 1, buf => {
+ const result = (new TextEncoder()).encodeInto(string, buf);
+ console.assert(string.length == result.read && utf8_len == result.written, "UTF-8 write error");
+ })
+}
+
+ static slice = (wasm, slice, align) => {
+ // If the slice is not a Uint8Array, we have to convert to one, as that's the only
+ // thing we can write into the wasm buffer.
+ const bytes = slice.constructor.name == "Uint8Array" ? slice : new Uint8Array(slice);
+ return new DiplomatBuf(wasm, bytes.length, align, buf => buf.set(bytes));
+ }
+
+ constructor(wasm, size, align, encodeCallback) {
+ const ptr = wasm.diplomat_alloc(size, align);
+ encodeCallback(new Uint8Array(wasm.memory.buffer, ptr, size));
+
+ this.ptr = ptr;
+ this.size = size;
+ this.free = () => {
+ const successfully_unregistered = DiplomatBuf_finalizer.unregister(this);
+ if (successfully_unregistered) {
+ wasm.diplomat_free(this.ptr, this.size, align);
+ } else {
+ console.error(`Failed to unregister DiplomatBuf at ${ptr}, this is a bug. Either it was never registered (leak), it was already unregistered (failed attempt to double free), or the unregister token was unrecognized (fallback to GC).`);
+ }
+ }
+
+ DiplomatBuf_finalizer.register(this, { wasm, ptr, size, align }, this);
+ }
+
+ leak = () => {
+ const successfully_unregistered = DiplomatBuf_finalizer.unregister(this);
+ if (successfully_unregistered) {
+ // leak
+ } else {
+ console.error(`Failed to unregister DiplomatBuf at ${this.ptr}, this is a bug. Either it was never registered (leak), it was already unregistered (failed attempt to double free), or the unregister token was unrecognized (fallback to GC).`);
+ }
+ }
+}
+
+const DiplomatBuf_finalizer = new FinalizationRegistry(({ wasm, ptr, size, align }) => {
+ wasm.diplomat_free(ptr, size, align);
+});
diff --git a/intl/icu_capi/js/package/lib/diplomat-wasm.mjs b/intl/icu_capi/js/package/lib/diplomat-wasm.mjs
new file mode 100644
index 0000000000..2dd3293ba0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/diplomat-wasm.mjs
@@ -0,0 +1,44 @@
+import cfg from '../diplomat.config.js';
+import {readString} from './diplomat-runtime.js'
+
+let wasm;
+
+const imports = {
+ env: {
+ diplomat_console_debug_js(ptr, len) {
+ console.debug(readString(wasm, ptr, len));
+ },
+ diplomat_console_error_js(ptr, len) {
+ console.error(readString(wasm, ptr, len));
+ },
+ diplomat_console_info_js(ptr, len) {
+ console.info(readString(wasm, ptr, len));
+ },
+ diplomat_console_log_js(ptr, len) {
+ console.log(readString(wasm, ptr, len));
+ },
+ diplomat_console_warn_js(ptr, len) {
+ console.warn(readString(wasm, ptr, len));
+ },
+ diplomat_throw_error_js(ptr, len) {
+ throw new Error(readString(wasm, ptr, len));
+ }
+ }
+}
+
+if (typeof fetch === 'undefined') { // Node
+ const fs = await import("fs");
+ const wasmFile = new Uint8Array(fs.readFileSync(cfg['wasm_path']));
+ const loadedWasm = await WebAssembly.instantiate(wasmFile, imports);
+ wasm = loadedWasm.instance.exports;
+} else { // Browser
+ const loadedWasm = await WebAssembly.instantiateStreaming(fetch(cfg['wasm_path']), imports);
+ wasm = loadedWasm.instance.exports;
+}
+
+wasm.diplomat_init();
+if (cfg['init'] !== undefined) {
+ cfg['init'](wasm);
+}
+
+export default wasm;
diff --git a/intl/icu_capi/js/package/lib/index.d.ts b/intl/icu_capi/js/package/lib/index.d.ts
new file mode 100644
index 0000000000..b8c013da3a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/index.d.ts
@@ -0,0 +1,124 @@
+export { FFIError, i8, u8, i16, u16, i32, u32, i64, u64, f32, f64, char } from './diplomat-runtime.js';
+export { CodePointRangeIterator } from './CodePointRangeIterator.js';
+export { CodePointRangeIteratorResult } from './CodePointRangeIteratorResult.js';
+export { ICU4XAnyCalendarKind } from './ICU4XAnyCalendarKind.js';
+export { ICU4XBcp47ToIanaMapper } from './ICU4XBcp47ToIanaMapper.js';
+export { ICU4XBidi } from './ICU4XBidi.js';
+export { ICU4XBidiDirection } from './ICU4XBidiDirection.js';
+export { ICU4XBidiInfo } from './ICU4XBidiInfo.js';
+export { ICU4XBidiParagraph } from './ICU4XBidiParagraph.js';
+export { ICU4XCalendar } from './ICU4XCalendar.js';
+export { ICU4XCanonicalCombiningClassMap } from './ICU4XCanonicalCombiningClassMap.js';
+export { ICU4XCanonicalComposition } from './ICU4XCanonicalComposition.js';
+export { ICU4XCanonicalDecomposition } from './ICU4XCanonicalDecomposition.js';
+export { ICU4XCaseMapCloser } from './ICU4XCaseMapCloser.js';
+export { ICU4XCaseMapper } from './ICU4XCaseMapper.js';
+export { ICU4XCodePointMapData16 } from './ICU4XCodePointMapData16.js';
+export { ICU4XCodePointMapData8 } from './ICU4XCodePointMapData8.js';
+export { ICU4XCodePointSetBuilder } from './ICU4XCodePointSetBuilder.js';
+export { ICU4XCodePointSetData } from './ICU4XCodePointSetData.js';
+export { ICU4XCollator } from './ICU4XCollator.js';
+export { ICU4XCollatorAlternateHandling } from './ICU4XCollatorAlternateHandling.js';
+export { ICU4XCollatorBackwardSecondLevel } from './ICU4XCollatorBackwardSecondLevel.js';
+export { ICU4XCollatorCaseFirst } from './ICU4XCollatorCaseFirst.js';
+export { ICU4XCollatorCaseLevel } from './ICU4XCollatorCaseLevel.js';
+export { ICU4XCollatorMaxVariable } from './ICU4XCollatorMaxVariable.js';
+export { ICU4XCollatorNumeric } from './ICU4XCollatorNumeric.js';
+export { ICU4XCollatorOptionsV1 } from './ICU4XCollatorOptionsV1.js';
+export { ICU4XCollatorStrength } from './ICU4XCollatorStrength.js';
+export { ICU4XComposingNormalizer } from './ICU4XComposingNormalizer.js';
+export { ICU4XCustomTimeZone } from './ICU4XCustomTimeZone.js';
+export { ICU4XDataProvider } from './ICU4XDataProvider.js';
+export { ICU4XDataStruct } from './ICU4XDataStruct.js';
+export { ICU4XDate } from './ICU4XDate.js';
+export { ICU4XDateFormatter } from './ICU4XDateFormatter.js';
+export { ICU4XDateLength } from './ICU4XDateLength.js';
+export { ICU4XDateTime } from './ICU4XDateTime.js';
+export { ICU4XDateTimeFormatter } from './ICU4XDateTimeFormatter.js';
+export { ICU4XDecomposed } from './ICU4XDecomposed.js';
+export { ICU4XDecomposingNormalizer } from './ICU4XDecomposingNormalizer.js';
+export { ICU4XDisplayNamesFallback } from './ICU4XDisplayNamesFallback.js';
+export { ICU4XDisplayNamesOptionsV1 } from './ICU4XDisplayNamesOptionsV1.js';
+export { ICU4XDisplayNamesStyle } from './ICU4XDisplayNamesStyle.js';
+export { ICU4XError } from './ICU4XError.js';
+export { ICU4XFixedDecimal } from './ICU4XFixedDecimal.js';
+export { ICU4XFixedDecimalFormatter } from './ICU4XFixedDecimalFormatter.js';
+export { ICU4XFixedDecimalGroupingStrategy } from './ICU4XFixedDecimalGroupingStrategy.js';
+export { ICU4XFixedDecimalSign } from './ICU4XFixedDecimalSign.js';
+export { ICU4XFixedDecimalSignDisplay } from './ICU4XFixedDecimalSignDisplay.js';
+export { ICU4XGeneralCategoryNameToMaskMapper } from './ICU4XGeneralCategoryNameToMaskMapper.js';
+export { ICU4XGraphemeClusterBreakIteratorLatin1 } from './ICU4XGraphemeClusterBreakIteratorLatin1.js';
+export { ICU4XGraphemeClusterBreakIteratorUtf16 } from './ICU4XGraphemeClusterBreakIteratorUtf16.js';
+export { ICU4XGraphemeClusterBreakIteratorUtf8 } from './ICU4XGraphemeClusterBreakIteratorUtf8.js';
+export { ICU4XGraphemeClusterSegmenter } from './ICU4XGraphemeClusterSegmenter.js';
+export { ICU4XGregorianDateFormatter } from './ICU4XGregorianDateFormatter.js';
+export { ICU4XGregorianDateTimeFormatter } from './ICU4XGregorianDateTimeFormatter.js';
+export { ICU4XGregorianZonedDateTimeFormatter } from './ICU4XGregorianZonedDateTimeFormatter.js';
+export { ICU4XIanaToBcp47Mapper } from './ICU4XIanaToBcp47Mapper.js';
+export { ICU4XIsoDate } from './ICU4XIsoDate.js';
+export { ICU4XIsoDateTime } from './ICU4XIsoDateTime.js';
+export { ICU4XIsoTimeZoneFormat } from './ICU4XIsoTimeZoneFormat.js';
+export { ICU4XIsoTimeZoneMinuteDisplay } from './ICU4XIsoTimeZoneMinuteDisplay.js';
+export { ICU4XIsoTimeZoneOptions } from './ICU4XIsoTimeZoneOptions.js';
+export { ICU4XIsoTimeZoneSecondDisplay } from './ICU4XIsoTimeZoneSecondDisplay.js';
+export { ICU4XIsoWeekday } from './ICU4XIsoWeekday.js';
+export { ICU4XLanguageDisplay } from './ICU4XLanguageDisplay.js';
+export { ICU4XLeadingAdjustment } from './ICU4XLeadingAdjustment.js';
+export { ICU4XLineBreakIteratorLatin1 } from './ICU4XLineBreakIteratorLatin1.js';
+export { ICU4XLineBreakIteratorUtf16 } from './ICU4XLineBreakIteratorUtf16.js';
+export { ICU4XLineBreakIteratorUtf8 } from './ICU4XLineBreakIteratorUtf8.js';
+export { ICU4XLineBreakOptionsV1 } from './ICU4XLineBreakOptionsV1.js';
+export { ICU4XLineBreakStrictness } from './ICU4XLineBreakStrictness.js';
+export { ICU4XLineBreakWordOption } from './ICU4XLineBreakWordOption.js';
+export { ICU4XLineSegmenter } from './ICU4XLineSegmenter.js';
+export { ICU4XList } from './ICU4XList.js';
+export { ICU4XListFormatter } from './ICU4XListFormatter.js';
+export { ICU4XListLength } from './ICU4XListLength.js';
+export { ICU4XLocale } from './ICU4XLocale.js';
+export { ICU4XLocaleCanonicalizer } from './ICU4XLocaleCanonicalizer.js';
+export { ICU4XLocaleDirection } from './ICU4XLocaleDirection.js';
+export { ICU4XLocaleDirectionality } from './ICU4XLocaleDirectionality.js';
+export { ICU4XLocaleDisplayNamesFormatter } from './ICU4XLocaleDisplayNamesFormatter.js';
+export { ICU4XLocaleExpander } from './ICU4XLocaleExpander.js';
+export { ICU4XLocaleFallbackConfig } from './ICU4XLocaleFallbackConfig.js';
+export { ICU4XLocaleFallbackIterator } from './ICU4XLocaleFallbackIterator.js';
+export { ICU4XLocaleFallbackPriority } from './ICU4XLocaleFallbackPriority.js';
+export { ICU4XLocaleFallbackSupplement } from './ICU4XLocaleFallbackSupplement.js';
+export { ICU4XLocaleFallbacker } from './ICU4XLocaleFallbacker.js';
+export { ICU4XLocaleFallbackerWithConfig } from './ICU4XLocaleFallbackerWithConfig.js';
+export { ICU4XLogger } from './ICU4XLogger.js';
+export { ICU4XMetazoneCalculator } from './ICU4XMetazoneCalculator.js';
+export { ICU4XOrdering } from './ICU4XOrdering.js';
+export { ICU4XPluralCategories } from './ICU4XPluralCategories.js';
+export { ICU4XPluralCategory } from './ICU4XPluralCategory.js';
+export { ICU4XPluralOperands } from './ICU4XPluralOperands.js';
+export { ICU4XPluralRules } from './ICU4XPluralRules.js';
+export { ICU4XPropertyValueNameToEnumMapper } from './ICU4XPropertyValueNameToEnumMapper.js';
+export { ICU4XRegionDisplayNames } from './ICU4XRegionDisplayNames.js';
+export { ICU4XReorderedIndexMap } from './ICU4XReorderedIndexMap.js';
+export { ICU4XRoundingIncrement } from './ICU4XRoundingIncrement.js';
+export { ICU4XScriptExtensionsSet } from './ICU4XScriptExtensionsSet.js';
+export { ICU4XScriptWithExtensions } from './ICU4XScriptWithExtensions.js';
+export { ICU4XScriptWithExtensionsBorrowed } from './ICU4XScriptWithExtensionsBorrowed.js';
+export { ICU4XSegmenterWordType } from './ICU4XSegmenterWordType.js';
+export { ICU4XSentenceBreakIteratorLatin1 } from './ICU4XSentenceBreakIteratorLatin1.js';
+export { ICU4XSentenceBreakIteratorUtf16 } from './ICU4XSentenceBreakIteratorUtf16.js';
+export { ICU4XSentenceBreakIteratorUtf8 } from './ICU4XSentenceBreakIteratorUtf8.js';
+export { ICU4XSentenceSegmenter } from './ICU4XSentenceSegmenter.js';
+export { ICU4XTime } from './ICU4XTime.js';
+export { ICU4XTimeFormatter } from './ICU4XTimeFormatter.js';
+export { ICU4XTimeLength } from './ICU4XTimeLength.js';
+export { ICU4XTimeZoneFormatter } from './ICU4XTimeZoneFormatter.js';
+export { ICU4XTitlecaseMapper } from './ICU4XTitlecaseMapper.js';
+export { ICU4XTitlecaseOptionsV1 } from './ICU4XTitlecaseOptionsV1.js';
+export { ICU4XTrailingCase } from './ICU4XTrailingCase.js';
+export { ICU4XTransformResult } from './ICU4XTransformResult.js';
+export { ICU4XUnicodeSetData } from './ICU4XUnicodeSetData.js';
+export { ICU4XWeekCalculator } from './ICU4XWeekCalculator.js';
+export { ICU4XWeekOf } from './ICU4XWeekOf.js';
+export { ICU4XWeekRelativeUnit } from './ICU4XWeekRelativeUnit.js';
+export { ICU4XWordBreakIteratorLatin1 } from './ICU4XWordBreakIteratorLatin1.js';
+export { ICU4XWordBreakIteratorUtf16 } from './ICU4XWordBreakIteratorUtf16.js';
+export { ICU4XWordBreakIteratorUtf8 } from './ICU4XWordBreakIteratorUtf8.js';
+export { ICU4XWordSegmenter } from './ICU4XWordSegmenter.js';
+export { ICU4XZonedDateTimeFormatter } from './ICU4XZonedDateTimeFormatter.js';
diff --git a/intl/icu_capi/js/package/lib/index.js b/intl/icu_capi/js/package/lib/index.js
new file mode 100644
index 0000000000..52509139e4
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/index.js
@@ -0,0 +1,124 @@
+export { FFIError } from './diplomat-runtime.js';
+export { CodePointRangeIterator } from './CodePointRangeIterator.js';
+export { CodePointRangeIteratorResult } from './CodePointRangeIteratorResult.js';
+export { ICU4XAnyCalendarKind } from './ICU4XAnyCalendarKind.js';
+export { ICU4XBcp47ToIanaMapper } from './ICU4XBcp47ToIanaMapper.js';
+export { ICU4XBidi } from './ICU4XBidi.js';
+export { ICU4XBidiDirection } from './ICU4XBidiDirection.js';
+export { ICU4XBidiInfo } from './ICU4XBidiInfo.js';
+export { ICU4XBidiParagraph } from './ICU4XBidiParagraph.js';
+export { ICU4XCalendar } from './ICU4XCalendar.js';
+export { ICU4XCanonicalCombiningClassMap } from './ICU4XCanonicalCombiningClassMap.js';
+export { ICU4XCanonicalComposition } from './ICU4XCanonicalComposition.js';
+export { ICU4XCanonicalDecomposition } from './ICU4XCanonicalDecomposition.js';
+export { ICU4XCaseMapCloser } from './ICU4XCaseMapCloser.js';
+export { ICU4XCaseMapper } from './ICU4XCaseMapper.js';
+export { ICU4XCodePointMapData16 } from './ICU4XCodePointMapData16.js';
+export { ICU4XCodePointMapData8 } from './ICU4XCodePointMapData8.js';
+export { ICU4XCodePointSetBuilder } from './ICU4XCodePointSetBuilder.js';
+export { ICU4XCodePointSetData } from './ICU4XCodePointSetData.js';
+export { ICU4XCollator } from './ICU4XCollator.js';
+export { ICU4XCollatorAlternateHandling } from './ICU4XCollatorAlternateHandling.js';
+export { ICU4XCollatorBackwardSecondLevel } from './ICU4XCollatorBackwardSecondLevel.js';
+export { ICU4XCollatorCaseFirst } from './ICU4XCollatorCaseFirst.js';
+export { ICU4XCollatorCaseLevel } from './ICU4XCollatorCaseLevel.js';
+export { ICU4XCollatorMaxVariable } from './ICU4XCollatorMaxVariable.js';
+export { ICU4XCollatorNumeric } from './ICU4XCollatorNumeric.js';
+export { ICU4XCollatorOptionsV1 } from './ICU4XCollatorOptionsV1.js';
+export { ICU4XCollatorStrength } from './ICU4XCollatorStrength.js';
+export { ICU4XComposingNormalizer } from './ICU4XComposingNormalizer.js';
+export { ICU4XCustomTimeZone } from './ICU4XCustomTimeZone.js';
+export { ICU4XDataProvider } from './ICU4XDataProvider.js';
+export { ICU4XDataStruct } from './ICU4XDataStruct.js';
+export { ICU4XDate } from './ICU4XDate.js';
+export { ICU4XDateFormatter } from './ICU4XDateFormatter.js';
+export { ICU4XDateLength } from './ICU4XDateLength.js';
+export { ICU4XDateTime } from './ICU4XDateTime.js';
+export { ICU4XDateTimeFormatter } from './ICU4XDateTimeFormatter.js';
+export { ICU4XDecomposed } from './ICU4XDecomposed.js';
+export { ICU4XDecomposingNormalizer } from './ICU4XDecomposingNormalizer.js';
+export { ICU4XDisplayNamesFallback } from './ICU4XDisplayNamesFallback.js';
+export { ICU4XDisplayNamesOptionsV1 } from './ICU4XDisplayNamesOptionsV1.js';
+export { ICU4XDisplayNamesStyle } from './ICU4XDisplayNamesStyle.js';
+export { ICU4XError } from './ICU4XError.js';
+export { ICU4XFixedDecimal } from './ICU4XFixedDecimal.js';
+export { ICU4XFixedDecimalFormatter } from './ICU4XFixedDecimalFormatter.js';
+export { ICU4XFixedDecimalGroupingStrategy } from './ICU4XFixedDecimalGroupingStrategy.js';
+export { ICU4XFixedDecimalSign } from './ICU4XFixedDecimalSign.js';
+export { ICU4XFixedDecimalSignDisplay } from './ICU4XFixedDecimalSignDisplay.js';
+export { ICU4XGeneralCategoryNameToMaskMapper } from './ICU4XGeneralCategoryNameToMaskMapper.js';
+export { ICU4XGraphemeClusterBreakIteratorLatin1 } from './ICU4XGraphemeClusterBreakIteratorLatin1.js';
+export { ICU4XGraphemeClusterBreakIteratorUtf16 } from './ICU4XGraphemeClusterBreakIteratorUtf16.js';
+export { ICU4XGraphemeClusterBreakIteratorUtf8 } from './ICU4XGraphemeClusterBreakIteratorUtf8.js';
+export { ICU4XGraphemeClusterSegmenter } from './ICU4XGraphemeClusterSegmenter.js';
+export { ICU4XGregorianDateFormatter } from './ICU4XGregorianDateFormatter.js';
+export { ICU4XGregorianDateTimeFormatter } from './ICU4XGregorianDateTimeFormatter.js';
+export { ICU4XGregorianZonedDateTimeFormatter } from './ICU4XGregorianZonedDateTimeFormatter.js';
+export { ICU4XIanaToBcp47Mapper } from './ICU4XIanaToBcp47Mapper.js';
+export { ICU4XIsoDate } from './ICU4XIsoDate.js';
+export { ICU4XIsoDateTime } from './ICU4XIsoDateTime.js';
+export { ICU4XIsoTimeZoneFormat } from './ICU4XIsoTimeZoneFormat.js';
+export { ICU4XIsoTimeZoneMinuteDisplay } from './ICU4XIsoTimeZoneMinuteDisplay.js';
+export { ICU4XIsoTimeZoneOptions } from './ICU4XIsoTimeZoneOptions.js';
+export { ICU4XIsoTimeZoneSecondDisplay } from './ICU4XIsoTimeZoneSecondDisplay.js';
+export { ICU4XIsoWeekday } from './ICU4XIsoWeekday.js';
+export { ICU4XLanguageDisplay } from './ICU4XLanguageDisplay.js';
+export { ICU4XLeadingAdjustment } from './ICU4XLeadingAdjustment.js';
+export { ICU4XLineBreakIteratorLatin1 } from './ICU4XLineBreakIteratorLatin1.js';
+export { ICU4XLineBreakIteratorUtf16 } from './ICU4XLineBreakIteratorUtf16.js';
+export { ICU4XLineBreakIteratorUtf8 } from './ICU4XLineBreakIteratorUtf8.js';
+export { ICU4XLineBreakOptionsV1 } from './ICU4XLineBreakOptionsV1.js';
+export { ICU4XLineBreakStrictness } from './ICU4XLineBreakStrictness.js';
+export { ICU4XLineBreakWordOption } from './ICU4XLineBreakWordOption.js';
+export { ICU4XLineSegmenter } from './ICU4XLineSegmenter.js';
+export { ICU4XList } from './ICU4XList.js';
+export { ICU4XListFormatter } from './ICU4XListFormatter.js';
+export { ICU4XListLength } from './ICU4XListLength.js';
+export { ICU4XLocale } from './ICU4XLocale.js';
+export { ICU4XLocaleCanonicalizer } from './ICU4XLocaleCanonicalizer.js';
+export { ICU4XLocaleDirection } from './ICU4XLocaleDirection.js';
+export { ICU4XLocaleDirectionality } from './ICU4XLocaleDirectionality.js';
+export { ICU4XLocaleDisplayNamesFormatter } from './ICU4XLocaleDisplayNamesFormatter.js';
+export { ICU4XLocaleExpander } from './ICU4XLocaleExpander.js';
+export { ICU4XLocaleFallbackConfig } from './ICU4XLocaleFallbackConfig.js';
+export { ICU4XLocaleFallbackIterator } from './ICU4XLocaleFallbackIterator.js';
+export { ICU4XLocaleFallbackPriority } from './ICU4XLocaleFallbackPriority.js';
+export { ICU4XLocaleFallbackSupplement } from './ICU4XLocaleFallbackSupplement.js';
+export { ICU4XLocaleFallbacker } from './ICU4XLocaleFallbacker.js';
+export { ICU4XLocaleFallbackerWithConfig } from './ICU4XLocaleFallbackerWithConfig.js';
+export { ICU4XLogger } from './ICU4XLogger.js';
+export { ICU4XMetazoneCalculator } from './ICU4XMetazoneCalculator.js';
+export { ICU4XOrdering } from './ICU4XOrdering.js';
+export { ICU4XPluralCategories } from './ICU4XPluralCategories.js';
+export { ICU4XPluralCategory } from './ICU4XPluralCategory.js';
+export { ICU4XPluralOperands } from './ICU4XPluralOperands.js';
+export { ICU4XPluralRules } from './ICU4XPluralRules.js';
+export { ICU4XPropertyValueNameToEnumMapper } from './ICU4XPropertyValueNameToEnumMapper.js';
+export { ICU4XRegionDisplayNames } from './ICU4XRegionDisplayNames.js';
+export { ICU4XReorderedIndexMap } from './ICU4XReorderedIndexMap.js';
+export { ICU4XRoundingIncrement } from './ICU4XRoundingIncrement.js';
+export { ICU4XScriptExtensionsSet } from './ICU4XScriptExtensionsSet.js';
+export { ICU4XScriptWithExtensions } from './ICU4XScriptWithExtensions.js';
+export { ICU4XScriptWithExtensionsBorrowed } from './ICU4XScriptWithExtensionsBorrowed.js';
+export { ICU4XSegmenterWordType } from './ICU4XSegmenterWordType.js';
+export { ICU4XSentenceBreakIteratorLatin1 } from './ICU4XSentenceBreakIteratorLatin1.js';
+export { ICU4XSentenceBreakIteratorUtf16 } from './ICU4XSentenceBreakIteratorUtf16.js';
+export { ICU4XSentenceBreakIteratorUtf8 } from './ICU4XSentenceBreakIteratorUtf8.js';
+export { ICU4XSentenceSegmenter } from './ICU4XSentenceSegmenter.js';
+export { ICU4XTime } from './ICU4XTime.js';
+export { ICU4XTimeFormatter } from './ICU4XTimeFormatter.js';
+export { ICU4XTimeLength } from './ICU4XTimeLength.js';
+export { ICU4XTimeZoneFormatter } from './ICU4XTimeZoneFormatter.js';
+export { ICU4XTitlecaseMapper } from './ICU4XTitlecaseMapper.js';
+export { ICU4XTitlecaseOptionsV1 } from './ICU4XTitlecaseOptionsV1.js';
+export { ICU4XTrailingCase } from './ICU4XTrailingCase.js';
+export { ICU4XTransformResult } from './ICU4XTransformResult.js';
+export { ICU4XUnicodeSetData } from './ICU4XUnicodeSetData.js';
+export { ICU4XWeekCalculator } from './ICU4XWeekCalculator.js';
+export { ICU4XWeekOf } from './ICU4XWeekOf.js';
+export { ICU4XWeekRelativeUnit } from './ICU4XWeekRelativeUnit.js';
+export { ICU4XWordBreakIteratorLatin1 } from './ICU4XWordBreakIteratorLatin1.js';
+export { ICU4XWordBreakIteratorUtf16 } from './ICU4XWordBreakIteratorUtf16.js';
+export { ICU4XWordBreakIteratorUtf8 } from './ICU4XWordBreakIteratorUtf8.js';
+export { ICU4XWordSegmenter } from './ICU4XWordSegmenter.js';
+export { ICU4XZonedDateTimeFormatter } from './ICU4XZonedDateTimeFormatter.js';
diff --git a/intl/icu_capi/js/package/package-lock.json b/intl/icu_capi/js/package/package-lock.json
new file mode 100644
index 0000000000..d154e8a0e3
--- /dev/null
+++ b/intl/icu_capi/js/package/package-lock.json
@@ -0,0 +1,2948 @@
+{
+ "name": "icu4x",
+ "version": "0.0.1",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "icu4x",
+ "version": "0.0.1",
+ "license": "Apache-2.0",
+ "devDependencies": {
+ "ava": "^5.3.1",
+ "benchmark": "^2.1.4"
+ }
+ },
+ "node_modules/@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.stat": "2.0.5",
+ "run-parallel": "^1.1.9"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.stat": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.walk": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.scandir": "2.1.5",
+ "fastq": "^1.6.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.10.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
+ "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
+ "dev": true,
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-walk": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
+ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/aggregate-error": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz",
+ "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==",
+ "dev": true,
+ "dependencies": {
+ "clean-stack": "^4.0.0",
+ "indent-string": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
+ "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "dev": true,
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "dev": true,
+ "dependencies": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
+ "node_modules/array-find-index": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
+ "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/arrgv": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/arrgv/-/arrgv-1.0.2.tgz",
+ "integrity": "sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/arrify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/arrify/-/arrify-3.0.0.tgz",
+ "integrity": "sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ava": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/ava/-/ava-5.3.1.tgz",
+ "integrity": "sha512-Scv9a4gMOXB6+ni4toLuhAm9KYWEjsgBglJl+kMGI5+IVDt120CCDZyB5HNU9DjmLI2t4I0GbnxGLmmRfGTJGg==",
+ "dev": true,
+ "dependencies": {
+ "acorn": "^8.8.2",
+ "acorn-walk": "^8.2.0",
+ "ansi-styles": "^6.2.1",
+ "arrgv": "^1.0.2",
+ "arrify": "^3.0.0",
+ "callsites": "^4.0.0",
+ "cbor": "^8.1.0",
+ "chalk": "^5.2.0",
+ "chokidar": "^3.5.3",
+ "chunkd": "^2.0.1",
+ "ci-info": "^3.8.0",
+ "ci-parallel-vars": "^1.0.1",
+ "clean-yaml-object": "^0.1.0",
+ "cli-truncate": "^3.1.0",
+ "code-excerpt": "^4.0.0",
+ "common-path-prefix": "^3.0.0",
+ "concordance": "^5.0.4",
+ "currently-unhandled": "^0.4.1",
+ "debug": "^4.3.4",
+ "emittery": "^1.0.1",
+ "figures": "^5.0.0",
+ "globby": "^13.1.4",
+ "ignore-by-default": "^2.1.0",
+ "indent-string": "^5.0.0",
+ "is-error": "^2.2.2",
+ "is-plain-object": "^5.0.0",
+ "is-promise": "^4.0.0",
+ "matcher": "^5.0.0",
+ "mem": "^9.0.2",
+ "ms": "^2.1.3",
+ "p-event": "^5.0.1",
+ "p-map": "^5.5.0",
+ "picomatch": "^2.3.1",
+ "pkg-conf": "^4.0.0",
+ "plur": "^5.1.0",
+ "pretty-ms": "^8.0.0",
+ "resolve-cwd": "^3.0.0",
+ "stack-utils": "^2.0.6",
+ "strip-ansi": "^7.0.1",
+ "supertap": "^3.0.1",
+ "temp-dir": "^3.0.0",
+ "write-file-atomic": "^5.0.1",
+ "yargs": "^17.7.2"
+ },
+ "bin": {
+ "ava": "entrypoints/cli.mjs"
+ },
+ "engines": {
+ "node": ">=14.19 <15 || >=16.15 <17 || >=18"
+ },
+ "peerDependencies": {
+ "@ava/typescript": "*"
+ },
+ "peerDependenciesMeta": {
+ "@ava/typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/benchmark": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz",
+ "integrity": "sha512-l9MlfN4M1K/H2fbhfMy3B7vJd6AGKJVQn2h6Sg/Yx+KckoUA7ewS5Vv6TjSq18ooE1kS9hhAlQRH3AkXIh/aOQ==",
+ "dev": true,
+ "dependencies": {
+ "lodash": "^4.17.4",
+ "platform": "^1.3.3"
+ }
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/blueimp-md5": {
+ "version": "2.19.0",
+ "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz",
+ "integrity": "sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==",
+ "dev": true
+ },
+ "node_modules/braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "dependencies": {
+ "fill-range": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/callsites": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.1.0.tgz",
+ "integrity": "sha512-aBMbD1Xxay75ViYezwT40aQONfr+pSXTHwNKvIXhXD6+LY3F1dLIcceoC5OZKBVHbXcysz1hL9D2w0JJIMXpUw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12.20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cbor": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz",
+ "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==",
+ "dev": true,
+ "dependencies": {
+ "nofilter": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=12.19"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+ "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+ "dev": true,
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ],
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/chunkd": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/chunkd/-/chunkd-2.0.1.tgz",
+ "integrity": "sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==",
+ "dev": true
+ },
+ "node_modules/ci-info": {
+ "version": "3.9.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz",
+ "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/sibiraj-s"
+ }
+ ],
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ci-parallel-vars": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/ci-parallel-vars/-/ci-parallel-vars-1.0.1.tgz",
+ "integrity": "sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==",
+ "dev": true
+ },
+ "node_modules/clean-stack": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz",
+ "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==",
+ "dev": true,
+ "dependencies": {
+ "escape-string-regexp": "5.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/clean-yaml-object": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz",
+ "integrity": "sha512-3yONmlN9CSAkzNwnRCiJQ7Q2xK5mWuEfL3PuTZcAUzhObbXsfsnMptJzXwz93nc5zn9V9TwCVMmV7w4xsm43dw==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/cli-truncate": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz",
+ "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==",
+ "dev": true,
+ "dependencies": {
+ "slice-ansi": "^5.0.0",
+ "string-width": "^5.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "dev": true,
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/cliui/node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/cliui/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "node_modules/cliui/node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/cliui/node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/cliui/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/code-excerpt": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz",
+ "integrity": "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==",
+ "dev": true,
+ "dependencies": {
+ "convert-to-spaces": "^2.0.1"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/common-path-prefix": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz",
+ "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==",
+ "dev": true
+ },
+ "node_modules/concordance": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/concordance/-/concordance-5.0.4.tgz",
+ "integrity": "sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==",
+ "dev": true,
+ "dependencies": {
+ "date-time": "^3.1.0",
+ "esutils": "^2.0.3",
+ "fast-diff": "^1.2.0",
+ "js-string-escape": "^1.0.1",
+ "lodash": "^4.17.15",
+ "md5-hex": "^3.0.1",
+ "semver": "^7.3.2",
+ "well-known-symbols": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=14"
+ }
+ },
+ "node_modules/convert-to-spaces": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz",
+ "integrity": "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==",
+ "dev": true,
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ }
+ },
+ "node_modules/currently-unhandled": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
+ "integrity": "sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==",
+ "dev": true,
+ "dependencies": {
+ "array-find-index": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/date-time": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/date-time/-/date-time-3.1.0.tgz",
+ "integrity": "sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==",
+ "dev": true,
+ "dependencies": {
+ "time-zone": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/debug/node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
+ "node_modules/dir-glob": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
+ "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
+ "dev": true,
+ "dependencies": {
+ "path-type": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/eastasianwidth": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
+ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
+ "dev": true
+ },
+ "node_modules/emittery": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/emittery/-/emittery-1.0.1.tgz",
+ "integrity": "sha512-2ID6FdrMD9KDLldGesP6317G78K7km/kMcwItRtVFva7I/cSEOIaLpewaUb+YLXVwdAp3Ctfxh/V5zIl1sj7dQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/emittery?sponsor=1"
+ }
+ },
+ "node_modules/emoji-regex": {
+ "version": "9.2.2",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
+ "dev": true
+ },
+ "node_modules/escalade": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
+ "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true,
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/fast-diff": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz",
+ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==",
+ "dev": true
+ },
+ "node_modules/fast-glob": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
+ "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/fastq": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
+ "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
+ "dev": true,
+ "dependencies": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "node_modules/figures": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz",
+ "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==",
+ "dev": true,
+ "dependencies": {
+ "escape-string-regexp": "^5.0.0",
+ "is-unicode-supported": "^1.2.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/find-up": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz",
+ "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==",
+ "dev": true,
+ "dependencies": {
+ "locate-path": "^7.1.0",
+ "path-exists": "^5.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "dev": true,
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/globby": {
+ "version": "13.2.2",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz",
+ "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==",
+ "dev": true,
+ "dependencies": {
+ "dir-glob": "^3.0.1",
+ "fast-glob": "^3.3.0",
+ "ignore": "^5.2.4",
+ "merge2": "^1.4.1",
+ "slash": "^4.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ignore": {
+ "version": "5.2.4",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
+ "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/ignore-by-default": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-2.1.0.tgz",
+ "integrity": "sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw==",
+ "dev": true,
+ "engines": {
+ "node": ">=10 <11 || >=12 <13 || >=14"
+ }
+ },
+ "node_modules/imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.19"
+ }
+ },
+ "node_modules/indent-string": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
+ "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/irregular-plurals": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.5.0.tgz",
+ "integrity": "sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-error": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz",
+ "integrity": "sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==",
+ "dev": true
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",
+ "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/is-plain-object": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
+ "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-promise": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
+ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
+ "dev": true
+ },
+ "node_modules/is-unicode-supported": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",
+ "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/js-string-escape": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz",
+ "integrity": "sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/js-yaml": {
+ "version": "3.14.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
+ "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
+ "dev": true,
+ "dependencies": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/load-json-file": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-7.0.1.tgz",
+ "integrity": "sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==",
+ "dev": true,
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/locate-path": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz",
+ "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==",
+ "dev": true,
+ "dependencies": {
+ "p-locate": "^6.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true
+ },
+ "node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/map-age-cleaner": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
+ "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
+ "dev": true,
+ "dependencies": {
+ "p-defer": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/matcher": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/matcher/-/matcher-5.0.0.tgz",
+ "integrity": "sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==",
+ "dev": true,
+ "dependencies": {
+ "escape-string-regexp": "^5.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/md5-hex": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-3.0.1.tgz",
+ "integrity": "sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==",
+ "dev": true,
+ "dependencies": {
+ "blueimp-md5": "^2.10.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/mem": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz",
+ "integrity": "sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==",
+ "dev": true,
+ "dependencies": {
+ "map-age-cleaner": "^0.1.3",
+ "mimic-fn": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=12.20"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/mem?sponsor=1"
+ }
+ },
+ "node_modules/merge2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/micromatch": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "dev": true,
+ "dependencies": {
+ "braces": "^3.0.2",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/mimic-fn": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
+ "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true
+ },
+ "node_modules/nofilter": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz",
+ "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==",
+ "dev": true,
+ "engines": {
+ "node": ">=12.19"
+ }
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/p-defer": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
+ "integrity": "sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/p-event": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/p-event/-/p-event-5.0.1.tgz",
+ "integrity": "sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==",
+ "dev": true,
+ "dependencies": {
+ "p-timeout": "^5.0.2"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
+ "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
+ "dev": true,
+ "dependencies": {
+ "yocto-queue": "^1.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz",
+ "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==",
+ "dev": true,
+ "dependencies": {
+ "p-limit": "^4.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-map": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz",
+ "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==",
+ "dev": true,
+ "dependencies": {
+ "aggregate-error": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-timeout": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz",
+ "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/parse-ms": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz",
+ "integrity": "sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/path-exists": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz",
+ "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==",
+ "dev": true,
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ }
+ },
+ "node_modules/path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pkg-conf": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-4.0.0.tgz",
+ "integrity": "sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w==",
+ "dev": true,
+ "dependencies": {
+ "find-up": "^6.0.0",
+ "load-json-file": "^7.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/platform": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
+ "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==",
+ "dev": true
+ },
+ "node_modules/plur": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/plur/-/plur-5.1.0.tgz",
+ "integrity": "sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==",
+ "dev": true,
+ "dependencies": {
+ "irregular-plurals": "^3.3.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/pretty-ms": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-8.0.0.tgz",
+ "integrity": "sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==",
+ "dev": true,
+ "dependencies": {
+ "parse-ms": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/queue-microtask": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dev": true,
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/resolve-cwd": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
+ "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
+ "dev": true,
+ "dependencies": {
+ "resolve-from": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/resolve-from": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/reusify": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
+ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
+ "dev": true,
+ "engines": {
+ "iojs": ">=1.0.0",
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/run-parallel": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "dependencies": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "node_modules/semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "dev": true,
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/serialize-error": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz",
+ "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==",
+ "dev": true,
+ "dependencies": {
+ "type-fest": "^0.13.1"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/signal-exit": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
+ "dev": true,
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/slash": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",
+ "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/slice-ansi": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz",
+ "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^6.0.0",
+ "is-fullwidth-code-point": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/slice-ansi?sponsor=1"
+ }
+ },
+ "node_modules/sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
+ "dev": true
+ },
+ "node_modules/stack-utils": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
+ "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==",
+ "dev": true,
+ "dependencies": {
+ "escape-string-regexp": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/stack-utils/node_modules/escape-string-regexp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+ "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/string-width": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
+ "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
+ "dev": true,
+ "dependencies": {
+ "eastasianwidth": "^0.2.0",
+ "emoji-regex": "^9.2.2",
+ "strip-ansi": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+ }
+ },
+ "node_modules/supertap": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/supertap/-/supertap-3.0.1.tgz",
+ "integrity": "sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==",
+ "dev": true,
+ "dependencies": {
+ "indent-string": "^5.0.0",
+ "js-yaml": "^3.14.1",
+ "serialize-error": "^7.0.1",
+ "strip-ansi": "^7.0.1"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ }
+ },
+ "node_modules/temp-dir": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-3.0.0.tgz",
+ "integrity": "sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==",
+ "dev": true,
+ "engines": {
+ "node": ">=14.16"
+ }
+ },
+ "node_modules/time-zone": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz",
+ "integrity": "sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/type-fest": {
+ "version": "0.13.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
+ "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/well-known-symbols": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz",
+ "integrity": "sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/write-file-atomic": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz",
+ "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==",
+ "dev": true,
+ "dependencies": {
+ "imurmurhash": "^0.1.4",
+ "signal-exit": "^4.0.1"
+ },
+ "engines": {
+ "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ }
+ },
+ "node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "node_modules/yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "dev": true,
+ "dependencies": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yargs/node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yargs/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "node_modules/yargs/node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yargs/node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yargs/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yocto-queue": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz",
+ "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==",
+ "dev": true,
+ "engines": {
+ "node": ">=12.20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ }
+ },
+ "dependencies": {
+ "@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+ "dev": true,
+ "requires": {
+ "@nodelib/fs.stat": "2.0.5",
+ "run-parallel": "^1.1.9"
+ }
+ },
+ "@nodelib/fs.stat": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+ "dev": true
+ },
+ "@nodelib/fs.walk": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+ "dev": true,
+ "requires": {
+ "@nodelib/fs.scandir": "2.1.5",
+ "fastq": "^1.6.0"
+ }
+ },
+ "acorn": {
+ "version": "8.10.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
+ "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
+ "dev": true
+ },
+ "acorn-walk": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
+ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
+ "dev": true
+ },
+ "aggregate-error": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz",
+ "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==",
+ "dev": true,
+ "requires": {
+ "clean-stack": "^4.0.0",
+ "indent-string": "^5.0.0"
+ }
+ },
+ "ansi-regex": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
+ "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
+ "dev": true
+ },
+ "anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "dev": true,
+ "requires": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ }
+ },
+ "argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "dev": true,
+ "requires": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
+ "array-find-index": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
+ "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==",
+ "dev": true
+ },
+ "arrgv": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/arrgv/-/arrgv-1.0.2.tgz",
+ "integrity": "sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==",
+ "dev": true
+ },
+ "arrify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/arrify/-/arrify-3.0.0.tgz",
+ "integrity": "sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==",
+ "dev": true
+ },
+ "ava": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/ava/-/ava-5.3.1.tgz",
+ "integrity": "sha512-Scv9a4gMOXB6+ni4toLuhAm9KYWEjsgBglJl+kMGI5+IVDt120CCDZyB5HNU9DjmLI2t4I0GbnxGLmmRfGTJGg==",
+ "dev": true,
+ "requires": {
+ "acorn": "^8.8.2",
+ "acorn-walk": "^8.2.0",
+ "ansi-styles": "^6.2.1",
+ "arrgv": "^1.0.2",
+ "arrify": "^3.0.0",
+ "callsites": "^4.0.0",
+ "cbor": "^8.1.0",
+ "chalk": "^5.2.0",
+ "chokidar": "^3.5.3",
+ "chunkd": "^2.0.1",
+ "ci-info": "^3.8.0",
+ "ci-parallel-vars": "^1.0.1",
+ "clean-yaml-object": "^0.1.0",
+ "cli-truncate": "^3.1.0",
+ "code-excerpt": "^4.0.0",
+ "common-path-prefix": "^3.0.0",
+ "concordance": "^5.0.4",
+ "currently-unhandled": "^0.4.1",
+ "debug": "^4.3.4",
+ "emittery": "^1.0.1",
+ "figures": "^5.0.0",
+ "globby": "^13.1.4",
+ "ignore-by-default": "^2.1.0",
+ "indent-string": "^5.0.0",
+ "is-error": "^2.2.2",
+ "is-plain-object": "^5.0.0",
+ "is-promise": "^4.0.0",
+ "matcher": "^5.0.0",
+ "mem": "^9.0.2",
+ "ms": "^2.1.3",
+ "p-event": "^5.0.1",
+ "p-map": "^5.5.0",
+ "picomatch": "^2.3.1",
+ "pkg-conf": "^4.0.0",
+ "plur": "^5.1.0",
+ "pretty-ms": "^8.0.0",
+ "resolve-cwd": "^3.0.0",
+ "stack-utils": "^2.0.6",
+ "strip-ansi": "^7.0.1",
+ "supertap": "^3.0.1",
+ "temp-dir": "^3.0.0",
+ "write-file-atomic": "^5.0.1",
+ "yargs": "^17.7.2"
+ }
+ },
+ "benchmark": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz",
+ "integrity": "sha512-l9MlfN4M1K/H2fbhfMy3B7vJd6AGKJVQn2h6Sg/Yx+KckoUA7ewS5Vv6TjSq18ooE1kS9hhAlQRH3AkXIh/aOQ==",
+ "dev": true,
+ "requires": {
+ "lodash": "^4.17.4",
+ "platform": "^1.3.3"
+ }
+ },
+ "binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "dev": true
+ },
+ "blueimp-md5": {
+ "version": "2.19.0",
+ "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz",
+ "integrity": "sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==",
+ "dev": true
+ },
+ "braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "requires": {
+ "fill-range": "^7.0.1"
+ }
+ },
+ "callsites": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.1.0.tgz",
+ "integrity": "sha512-aBMbD1Xxay75ViYezwT40aQONfr+pSXTHwNKvIXhXD6+LY3F1dLIcceoC5OZKBVHbXcysz1hL9D2w0JJIMXpUw==",
+ "dev": true
+ },
+ "cbor": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz",
+ "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==",
+ "dev": true,
+ "requires": {
+ "nofilter": "^3.1.0"
+ }
+ },
+ "chalk": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+ "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+ "dev": true
+ },
+ "chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "dev": true,
+ "requires": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "fsevents": "~2.3.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ }
+ },
+ "chunkd": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/chunkd/-/chunkd-2.0.1.tgz",
+ "integrity": "sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==",
+ "dev": true
+ },
+ "ci-info": {
+ "version": "3.9.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz",
+ "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==",
+ "dev": true
+ },
+ "ci-parallel-vars": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/ci-parallel-vars/-/ci-parallel-vars-1.0.1.tgz",
+ "integrity": "sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==",
+ "dev": true
+ },
+ "clean-stack": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz",
+ "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==",
+ "dev": true,
+ "requires": {
+ "escape-string-regexp": "5.0.0"
+ }
+ },
+ "clean-yaml-object": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz",
+ "integrity": "sha512-3yONmlN9CSAkzNwnRCiJQ7Q2xK5mWuEfL3PuTZcAUzhObbXsfsnMptJzXwz93nc5zn9V9TwCVMmV7w4xsm43dw==",
+ "dev": true
+ },
+ "cli-truncate": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz",
+ "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==",
+ "dev": true,
+ "requires": {
+ "slice-ansi": "^5.0.0",
+ "string-width": "^5.0.0"
+ }
+ },
+ "cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "dev": true,
+ "requires": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ }
+ }
+ },
+ "code-excerpt": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz",
+ "integrity": "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==",
+ "dev": true,
+ "requires": {
+ "convert-to-spaces": "^2.0.1"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "common-path-prefix": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz",
+ "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==",
+ "dev": true
+ },
+ "concordance": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/concordance/-/concordance-5.0.4.tgz",
+ "integrity": "sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==",
+ "dev": true,
+ "requires": {
+ "date-time": "^3.1.0",
+ "esutils": "^2.0.3",
+ "fast-diff": "^1.2.0",
+ "js-string-escape": "^1.0.1",
+ "lodash": "^4.17.15",
+ "md5-hex": "^3.0.1",
+ "semver": "^7.3.2",
+ "well-known-symbols": "^2.0.0"
+ }
+ },
+ "convert-to-spaces": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz",
+ "integrity": "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==",
+ "dev": true
+ },
+ "currently-unhandled": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
+ "integrity": "sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==",
+ "dev": true,
+ "requires": {
+ "array-find-index": "^1.0.1"
+ }
+ },
+ "date-time": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/date-time/-/date-time-3.1.0.tgz",
+ "integrity": "sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==",
+ "dev": true,
+ "requires": {
+ "time-zone": "^1.0.0"
+ }
+ },
+ "debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "requires": {
+ "ms": "2.1.2"
+ },
+ "dependencies": {
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ }
+ }
+ },
+ "dir-glob": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
+ "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
+ "dev": true,
+ "requires": {
+ "path-type": "^4.0.0"
+ }
+ },
+ "eastasianwidth": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
+ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
+ "dev": true
+ },
+ "emittery": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/emittery/-/emittery-1.0.1.tgz",
+ "integrity": "sha512-2ID6FdrMD9KDLldGesP6317G78K7km/kMcwItRtVFva7I/cSEOIaLpewaUb+YLXVwdAp3Ctfxh/V5zIl1sj7dQ==",
+ "dev": true
+ },
+ "emoji-regex": {
+ "version": "9.2.2",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
+ "dev": true
+ },
+ "escalade": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+ "dev": true
+ },
+ "escape-string-regexp": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
+ "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
+ "dev": true
+ },
+ "esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true
+ },
+ "esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true
+ },
+ "fast-diff": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz",
+ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==",
+ "dev": true
+ },
+ "fast-glob": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
+ "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
+ "dev": true,
+ "requires": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.4"
+ }
+ },
+ "fastq": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
+ "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
+ "dev": true,
+ "requires": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "figures": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz",
+ "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==",
+ "dev": true,
+ "requires": {
+ "escape-string-regexp": "^5.0.0",
+ "is-unicode-supported": "^1.2.0"
+ }
+ },
+ "fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "requires": {
+ "to-regex-range": "^5.0.1"
+ }
+ },
+ "find-up": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz",
+ "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^7.1.0",
+ "path-exists": "^5.0.0"
+ }
+ },
+ "fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "optional": true
+ },
+ "get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "dev": true
+ },
+ "glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "requires": {
+ "is-glob": "^4.0.1"
+ }
+ },
+ "globby": {
+ "version": "13.2.2",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz",
+ "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==",
+ "dev": true,
+ "requires": {
+ "dir-glob": "^3.0.1",
+ "fast-glob": "^3.3.0",
+ "ignore": "^5.2.4",
+ "merge2": "^1.4.1",
+ "slash": "^4.0.0"
+ }
+ },
+ "ignore": {
+ "version": "5.2.4",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
+ "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
+ "dev": true
+ },
+ "ignore-by-default": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-2.1.0.tgz",
+ "integrity": "sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw==",
+ "dev": true
+ },
+ "imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
+ "dev": true
+ },
+ "indent-string": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
+ "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",
+ "dev": true
+ },
+ "irregular-plurals": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.5.0.tgz",
+ "integrity": "sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==",
+ "dev": true
+ },
+ "is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "requires": {
+ "binary-extensions": "^2.0.0"
+ }
+ },
+ "is-error": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz",
+ "integrity": "sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==",
+ "dev": true
+ },
+ "is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",
+ "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",
+ "dev": true
+ },
+ "is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^2.1.1"
+ }
+ },
+ "is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true
+ },
+ "is-plain-object": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
+ "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
+ "dev": true
+ },
+ "is-promise": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
+ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
+ "dev": true
+ },
+ "is-unicode-supported": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",
+ "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==",
+ "dev": true
+ },
+ "js-string-escape": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz",
+ "integrity": "sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==",
+ "dev": true
+ },
+ "js-yaml": {
+ "version": "3.14.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
+ "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
+ "dev": true,
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ }
+ },
+ "load-json-file": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-7.0.1.tgz",
+ "integrity": "sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==",
+ "dev": true
+ },
+ "locate-path": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz",
+ "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^6.0.0"
+ }
+ },
+ "lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true
+ },
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "map-age-cleaner": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
+ "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
+ "dev": true,
+ "requires": {
+ "p-defer": "^1.0.0"
+ }
+ },
+ "matcher": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/matcher/-/matcher-5.0.0.tgz",
+ "integrity": "sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==",
+ "dev": true,
+ "requires": {
+ "escape-string-regexp": "^5.0.0"
+ }
+ },
+ "md5-hex": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-3.0.1.tgz",
+ "integrity": "sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==",
+ "dev": true,
+ "requires": {
+ "blueimp-md5": "^2.10.0"
+ }
+ },
+ "mem": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz",
+ "integrity": "sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==",
+ "dev": true,
+ "requires": {
+ "map-age-cleaner": "^0.1.3",
+ "mimic-fn": "^4.0.0"
+ }
+ },
+ "merge2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+ "dev": true
+ },
+ "micromatch": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "dev": true,
+ "requires": {
+ "braces": "^3.0.2",
+ "picomatch": "^2.3.1"
+ }
+ },
+ "mimic-fn": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
+ "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
+ "dev": true
+ },
+ "ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true
+ },
+ "nofilter": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz",
+ "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==",
+ "dev": true
+ },
+ "normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true
+ },
+ "p-defer": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
+ "integrity": "sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==",
+ "dev": true
+ },
+ "p-event": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/p-event/-/p-event-5.0.1.tgz",
+ "integrity": "sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==",
+ "dev": true,
+ "requires": {
+ "p-timeout": "^5.0.2"
+ }
+ },
+ "p-limit": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
+ "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
+ "dev": true,
+ "requires": {
+ "yocto-queue": "^1.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz",
+ "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^4.0.0"
+ }
+ },
+ "p-map": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz",
+ "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==",
+ "dev": true,
+ "requires": {
+ "aggregate-error": "^4.0.0"
+ }
+ },
+ "p-timeout": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz",
+ "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==",
+ "dev": true
+ },
+ "parse-ms": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz",
+ "integrity": "sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==",
+ "dev": true
+ },
+ "path-exists": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz",
+ "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==",
+ "dev": true
+ },
+ "path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true
+ },
+ "picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true
+ },
+ "pkg-conf": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-4.0.0.tgz",
+ "integrity": "sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w==",
+ "dev": true,
+ "requires": {
+ "find-up": "^6.0.0",
+ "load-json-file": "^7.0.0"
+ }
+ },
+ "platform": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
+ "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==",
+ "dev": true
+ },
+ "plur": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/plur/-/plur-5.1.0.tgz",
+ "integrity": "sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==",
+ "dev": true,
+ "requires": {
+ "irregular-plurals": "^3.3.0"
+ }
+ },
+ "pretty-ms": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-8.0.0.tgz",
+ "integrity": "sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==",
+ "dev": true,
+ "requires": {
+ "parse-ms": "^3.0.0"
+ }
+ },
+ "queue-microtask": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
+ "dev": true
+ },
+ "readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dev": true,
+ "requires": {
+ "picomatch": "^2.2.1"
+ }
+ },
+ "require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+ "dev": true
+ },
+ "resolve-cwd": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
+ "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
+ "dev": true,
+ "requires": {
+ "resolve-from": "^5.0.0"
+ }
+ },
+ "resolve-from": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+ "dev": true
+ },
+ "reusify": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
+ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
+ "dev": true
+ },
+ "run-parallel": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+ "dev": true,
+ "requires": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "serialize-error": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz",
+ "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==",
+ "dev": true,
+ "requires": {
+ "type-fest": "^0.13.1"
+ }
+ },
+ "signal-exit": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
+ "dev": true
+ },
+ "slash": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",
+ "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==",
+ "dev": true
+ },
+ "slice-ansi": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz",
+ "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^6.0.0",
+ "is-fullwidth-code-point": "^4.0.0"
+ }
+ },
+ "sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
+ "dev": true
+ },
+ "stack-utils": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
+ "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==",
+ "dev": true,
+ "requires": {
+ "escape-string-regexp": "^2.0.0"
+ },
+ "dependencies": {
+ "escape-string-regexp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+ "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
+ "dev": true
+ }
+ }
+ },
+ "string-width": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
+ "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
+ "dev": true,
+ "requires": {
+ "eastasianwidth": "^0.2.0",
+ "emoji-regex": "^9.2.2",
+ "strip-ansi": "^7.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^6.0.1"
+ }
+ },
+ "supertap": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/supertap/-/supertap-3.0.1.tgz",
+ "integrity": "sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==",
+ "dev": true,
+ "requires": {
+ "indent-string": "^5.0.0",
+ "js-yaml": "^3.14.1",
+ "serialize-error": "^7.0.1",
+ "strip-ansi": "^7.0.1"
+ }
+ },
+ "temp-dir": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-3.0.0.tgz",
+ "integrity": "sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==",
+ "dev": true
+ },
+ "time-zone": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz",
+ "integrity": "sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==",
+ "dev": true
+ },
+ "to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "requires": {
+ "is-number": "^7.0.0"
+ }
+ },
+ "type-fest": {
+ "version": "0.13.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
+ "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
+ "dev": true
+ },
+ "well-known-symbols": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz",
+ "integrity": "sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==",
+ "dev": true
+ },
+ "wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ }
+ }
+ },
+ "write-file-atomic": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz",
+ "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==",
+ "dev": true,
+ "requires": {
+ "imurmurhash": "^0.1.4",
+ "signal-exit": "^4.0.1"
+ }
+ },
+ "y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "dev": true
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "dev": true,
+ "requires": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ }
+ }
+ },
+ "yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "dev": true
+ },
+ "yocto-queue": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz",
+ "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==",
+ "dev": true
+ }
+ }
+}
diff --git a/intl/icu_capi/js/package/package.json b/intl/icu_capi/js/package/package.json
new file mode 100644
index 0000000000..2fc98113ef
--- /dev/null
+++ b/intl/icu_capi/js/package/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "icu4x",
+ "version": "0.0.1",
+ "description": "ICU4X JavaScript bindings via WebAssembly",
+ "main": "index.js",
+ "type": "module",
+ "directories": {
+ "lib": "lib",
+ "test": "test",
+ "bench": "bench"
+ },
+ "ava": {
+ "files": [
+ "test/*.mjs"
+ ]
+ },
+ "scripts": {
+ "test": "ava",
+ "bench": "node bench/all.mjs",
+ "prepare": "make"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/unicode-org/icu4x.git"
+ },
+ "keywords": [
+ "i18n"
+ ],
+ "bugs": {
+ "url": "https://github.com/unicode-org/icu4x/issues"
+ },
+ "homepage": "https://github.com/unicode-org/icu4x#readme",
+ "author": "The ICU4X Project Developers",
+ "license": "Apache-2.0",
+ "devDependencies": {
+ "ava": "^5.3.1",
+ "benchmark": "^2.1.4"
+ }
+}
diff --git a/intl/icu_capi/js/package/test/data-providers.mjs b/intl/icu_capi/js/package/test/data-providers.mjs
new file mode 100644
index 0000000000..9d1ba68350
--- /dev/null
+++ b/intl/icu_capi/js/package/test/data-providers.mjs
@@ -0,0 +1,19 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+import test from 'ava';
+
+import { ICU4XFixedDecimal, ICU4XLocale, ICU4XDataProvider, ICU4XFixedDecimalFormatter } from "../index.js"
+
+test("use create_compiled to format a simple decimal", async t => {
+ const locale = ICU4XLocale.create_from_string("bn");
+ const provider = ICU4XDataProvider.create_compiled();
+
+ const format = ICU4XFixedDecimalFormatter.create_with_grouping_strategy(provider, locale, "Auto");
+
+ const decimal = ICU4XFixedDecimal.create_from_i32(1234);
+ decimal.multiply_pow10(-2);
+
+ t.is(format.format(decimal), "১২.৩৪");
+});
diff --git a/intl/icu_capi/js/package/test/fixed-decimal-format.mjs b/intl/icu_capi/js/package/test/fixed-decimal-format.mjs
new file mode 100644
index 0000000000..f49a0494cf
--- /dev/null
+++ b/intl/icu_capi/js/package/test/fixed-decimal-format.mjs
@@ -0,0 +1,32 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+import test from 'ava';
+
+import { ICU4XFixedDecimal, ICU4XLocale, ICU4XDataProvider, ICU4XFixedDecimalFormatter } from "../index.js"
+
+const locale = ICU4XLocale.create_from_string("bn");
+const provider = ICU4XDataProvider.create_compiled();
+const format = ICU4XFixedDecimalFormatter.create_with_grouping_strategy(provider, locale, "Auto");
+
+test("format a simple decimal", t => {
+ const decimal = ICU4XFixedDecimal.create_from_i32(1234);
+ decimal.multiply_pow10(-2);
+
+ t.is(format.format(decimal), "১২.৩৪");
+});
+
+test("format a long decimal", t => {
+ const decimal = ICU4XFixedDecimal.create_from_i32(1000007);
+
+ t.is(format.format(decimal), "১০,০০,০০৭");
+});
+
+test("format a negated, scaled decimal", t => {
+ const decimal = ICU4XFixedDecimal.create_from_i32(1000007);
+ decimal.multiply_pow10(2);
+ decimal.set_sign("Negative");
+
+ t.is(format.format(decimal), "-১০,০০,০০,৭০০");
+});
diff --git a/intl/icu_capi/js/package/test/fixed-decimal.mjs b/intl/icu_capi/js/package/test/fixed-decimal.mjs
new file mode 100644
index 0000000000..1295d47c0e
--- /dev/null
+++ b/intl/icu_capi/js/package/test/fixed-decimal.mjs
@@ -0,0 +1,27 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+import test from 'ava';
+
+import { ICU4XFixedDecimal } from "../lib/index.js"
+
+test("convert a simple decimal to a string", t => {
+ const decimal = ICU4XFixedDecimal.create_from_i64(1234n);
+
+ t.is(decimal.to_string(), "1234");
+});
+
+test("multiply a decimal by a power of 10", t => {
+ const decimal = ICU4XFixedDecimal.create_from_i32(1234);
+ decimal.multiply_pow10(-2);
+
+ t.is(decimal.to_string(), "12.34");
+});
+
+test("negate a decimal", t => {
+ const decimal = ICU4XFixedDecimal.create_from_i32(1234);
+ decimal.set_sign("Negative");
+
+ t.is(decimal.to_string(), "-1234");
+});
diff --git a/intl/icu_capi/src/bidi.rs b/intl/icu_capi/src/bidi.rs
new file mode 100644
index 0000000000..cf4c8af98b
--- /dev/null
+++ b/intl/icu_capi/src/bidi.rs
@@ -0,0 +1,267 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+ use alloc::vec::Vec;
+ use diplomat_runtime::DiplomatWriteable;
+
+ use core::fmt::Write;
+ use icu_properties::bidi::BidiClassAdapter;
+ use icu_properties::maps;
+ use icu_properties::BidiClass;
+ use unicode_bidi::BidiInfo;
+ use unicode_bidi::Level;
+ use unicode_bidi::Paragraph;
+
+ use crate::errors::ffi::ICU4XError;
+ use crate::provider::ffi::ICU4XDataProvider;
+
+ pub enum ICU4XBidiDirection {
+ Ltr,
+ Rtl,
+ Mixed,
+ }
+
+ #[diplomat::opaque]
+ /// An ICU4X Bidi object, containing loaded bidi data
+ #[diplomat::rust_link(icu::properties::bidi::BidiClassAdapter, Struct)]
+ // #[diplomat::rust_link(icu::properties::maps::load_bidi_class, Struct)]
+ pub struct ICU4XBidi(pub maps::CodePointMapData<BidiClass>);
+
+ impl ICU4XBidi {
+ /// Creates a new [`ICU4XBidi`] from locale data.
+ #[diplomat::rust_link(icu::properties::bidi::BidiClassAdapter::new, FnInStruct)]
+ pub fn create(provider: &ICU4XDataProvider) -> Result<Box<ICU4XBidi>, ICU4XError> {
+ Ok(Box::new(ICU4XBidi(call_constructor_unstable!(
+ maps::bidi_class [m => Ok(m.static_to_owned())],
+ maps::load_bidi_class,
+ provider,
+ )?)))
+ }
+
+ /// Use the data loaded in this object to process a string and calculate bidi information
+ ///
+ /// Takes in a Level for the default level, if it is an invalid value it will default to LTR
+ #[diplomat::rust_link(unicode_bidi::BidiInfo::new_with_data_source, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::properties::bidi::BidiClassAdapter::bidi_class,
+ FnInStruct,
+ hidden
+ )]
+ pub fn for_text<'text>(
+ &self,
+ text: &'text str,
+ default_level: u8,
+ ) -> Box<ICU4XBidiInfo<'text>> {
+ let data = self.0.as_borrowed();
+ let adapter = BidiClassAdapter::new(data);
+
+ Box::new(ICU4XBidiInfo(BidiInfo::new_with_data_source(
+ &adapter,
+ text,
+ Level::new(default_level).ok(),
+ )))
+ }
+ /// Utility function for producing reorderings given a list of levels
+ ///
+ /// Produces a map saying which visual index maps to which source index.
+ ///
+ /// The levels array must not have values greater than 126 (this is the
+ /// Bidi maximum explicit depth plus one).
+ /// Failure to follow this invariant may lead to incorrect results,
+ /// but is still safe.
+ #[diplomat::rust_link(unicode_bidi::BidiInfo::reorder_visual, FnInStruct)]
+ pub fn reorder_visual(&self, levels: &[u8]) -> Box<ICU4XReorderedIndexMap> {
+ let levels = Level::from_slice_unchecked(levels);
+ Box::new(ICU4XReorderedIndexMap(BidiInfo::reorder_visual(levels)))
+ }
+
+ /// Check if a Level returned by level_at is an RTL level.
+ ///
+ /// Invalid levels (numbers greater than 125) will be assumed LTR
+ #[diplomat::rust_link(unicode_bidi::Level::is_rtl, FnInStruct)]
+ pub fn level_is_rtl(level: u8) -> bool {
+ Level::new(level).unwrap_or_else(|_| Level::ltr()).is_rtl()
+ }
+
+ /// Check if a Level returned by level_at is an LTR level.
+ ///
+ /// Invalid levels (numbers greater than 125) will be assumed LTR
+ #[diplomat::rust_link(unicode_bidi::Level::is_ltr, FnInStruct)]
+ pub fn level_is_ltr(level: u8) -> bool {
+ Level::new(level).unwrap_or_else(|_| Level::ltr()).is_ltr()
+ }
+
+ /// Get a basic RTL Level value
+ #[diplomat::rust_link(unicode_bidi::Level::rtl, FnInStruct)]
+ pub fn level_rtl() -> u8 {
+ Level::rtl().number()
+ }
+
+ /// Get a simple LTR Level value
+ #[diplomat::rust_link(unicode_bidi::Level::ltr, FnInStruct)]
+ pub fn level_ltr() -> u8 {
+ Level::ltr().number()
+ }
+ }
+
+ /// Thin wrapper around a vector that maps visual indices to source indices
+ ///
+ /// `map[visualIndex] = sourceIndex`
+ ///
+ /// Produced by `reorder_visual()` on [`ICU4XBidi`].
+ #[diplomat::opaque]
+ pub struct ICU4XReorderedIndexMap(pub Vec<usize>);
+
+ impl ICU4XReorderedIndexMap {
+ /// Get this as a slice/array of indices
+ pub fn as_slice<'a>(&'a self) -> &'a [usize] {
+ &self.0
+ }
+
+ /// The length of this map
+ #[allow(clippy::len_without_is_empty)]
+ #[diplomat::attr(dart, rename = "length")]
+ pub fn len(&self) -> usize {
+ self.0.len()
+ }
+
+ /// Get element at `index`. Returns 0 when out of bounds
+ /// (note that 0 is also a valid in-bounds value, please use `len()`
+ /// to avoid out-of-bounds)
+ pub fn get(&self, index: usize) -> usize {
+ self.0.get(index).copied().unwrap_or(0)
+ }
+ }
+
+ /// An object containing bidi information for a given string, produced by `for_text()` on `ICU4XBidi`
+ #[diplomat::rust_link(unicode_bidi::BidiInfo, Struct)]
+ #[diplomat::opaque]
+ pub struct ICU4XBidiInfo<'text>(pub BidiInfo<'text>);
+
+ impl<'text> ICU4XBidiInfo<'text> {
+ /// The number of paragraphs contained here
+ pub fn paragraph_count(&self) -> usize {
+ self.0.paragraphs.len()
+ }
+
+ /// Get the nth paragraph, returning `None` if out of bounds
+ pub fn paragraph_at(&'text self, n: usize) -> Option<Box<ICU4XBidiParagraph<'text>>> {
+ self.0
+ .paragraphs
+ .get(n)
+ .map(|p| Box::new(ICU4XBidiParagraph(Paragraph::new(&self.0, p))))
+ }
+
+ /// The number of bytes in this full text
+ pub fn size(&self) -> usize {
+ self.0.levels.len()
+ }
+
+ /// Get the BIDI level at a particular byte index in the full text.
+ /// This integer is conceptually a `unicode_bidi::Level`,
+ /// and can be further inspected using the static methods on ICU4XBidi.
+ ///
+ /// Returns 0 (equivalent to `Level::ltr()`) on error
+ pub fn level_at(&self, pos: usize) -> u8 {
+ if let Some(l) = self.0.levels.get(pos) {
+ l.number()
+ } else {
+ 0
+ }
+ }
+ }
+
+ /// Bidi information for a single processed paragraph
+ #[diplomat::opaque]
+ pub struct ICU4XBidiParagraph<'info>(pub Paragraph<'info, 'info>);
+
+ impl<'info> ICU4XBidiParagraph<'info> {
+ /// Given a paragraph index `n` within the surrounding text, this sets this
+ /// object to the paragraph at that index. Returns `ICU4XError::OutOfBoundsError` when out of bounds.
+ ///
+ /// This is equivalent to calling `paragraph_at()` on `ICU4XBidiInfo` but doesn't
+ /// create a new object
+ pub fn set_paragraph_in_text(&mut self, n: usize) -> Result<(), ICU4XError> {
+ let para = self
+ .0
+ .info
+ .paragraphs
+ .get(n)
+ .ok_or(ICU4XError::OutOfBoundsError)?;
+ self.0 = Paragraph::new(self.0.info, para);
+ Ok(())
+ }
+ #[diplomat::rust_link(unicode_bidi::Paragraph::level_at, FnInStruct)]
+ /// The primary direction of this paragraph
+ pub fn direction(&self) -> ICU4XBidiDirection {
+ self.0.direction().into()
+ }
+
+ /// The number of bytes in this paragraph
+ #[diplomat::rust_link(unicode_bidi::ParagraphInfo::len, FnInStruct)]
+ pub fn size(&self) -> usize {
+ self.0.para.len()
+ }
+
+ /// The start index of this paragraph within the source text
+ pub fn range_start(&self) -> usize {
+ self.0.para.range.start
+ }
+
+ /// The end index of this paragraph within the source text
+ pub fn range_end(&self) -> usize {
+ self.0.para.range.end
+ }
+
+ /// Reorder a line based on display order. The ranges are specified relative to the source text and must be contained
+ /// within this paragraph's range.
+ #[diplomat::rust_link(unicode_bidi::Paragraph::level_at, FnInStruct)]
+ pub fn reorder_line(
+ &self,
+ range_start: usize,
+ range_end: usize,
+ out: &mut DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ if range_start < self.range_start() || range_end > self.range_end() {
+ return Err(ICU4XError::OutOfBoundsError);
+ }
+
+ let info = self.0.info;
+ let para = self.0.para;
+
+ let reordered = info.reorder_line(para, range_start..range_end);
+
+ Ok(out.write_str(&reordered)?)
+ }
+
+ /// Get the BIDI level at a particular byte index in this paragraph.
+ /// This integer is conceptually a `unicode_bidi::Level`,
+ /// and can be further inspected using the static methods on ICU4XBidi.
+ ///
+ /// Returns 0 (equivalent to `Level::ltr()`) on error
+ #[diplomat::rust_link(unicode_bidi::Paragraph::level_at, FnInStruct)]
+ pub fn level_at(&self, pos: usize) -> u8 {
+ if pos >= self.size() {
+ return 0;
+ }
+
+ self.0.level_at(pos).number()
+ }
+ }
+}
+
+use unicode_bidi::Direction;
+
+impl From<Direction> for ffi::ICU4XBidiDirection {
+ fn from(other: Direction) -> Self {
+ match other {
+ Direction::Ltr => Self::Ltr,
+ Direction::Rtl => Self::Rtl,
+ Direction::Mixed => Self::Mixed,
+ }
+ }
+}
diff --git a/intl/icu_capi/src/calendar.rs b/intl/icu_capi/src/calendar.rs
new file mode 100644
index 0000000000..dd4b2dcbaa
--- /dev/null
+++ b/intl/icu_capi/src/calendar.rs
@@ -0,0 +1,148 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+ use alloc::sync::Arc;
+
+ use core::fmt::Write;
+ use icu_calendar::{AnyCalendar, AnyCalendarKind};
+
+ use crate::errors::ffi::ICU4XError;
+ use crate::locale::ffi::ICU4XLocale;
+ use crate::provider::ffi::ICU4XDataProvider;
+
+ /// The various calendar types currently supported by [`ICU4XCalendar`]
+ #[diplomat::enum_convert(AnyCalendarKind, needs_wildcard)]
+ #[diplomat::rust_link(icu::calendar::AnyCalendarKind, Enum)]
+ pub enum ICU4XAnyCalendarKind {
+ /// The kind of an Iso calendar
+ Iso = 0,
+ /// The kind of a Gregorian calendar
+ Gregorian = 1,
+ /// The kind of a Buddhist calendar
+ Buddhist = 2,
+ /// The kind of a Japanese calendar with modern eras
+ Japanese = 3,
+ /// The kind of a Japanese calendar with modern and historic eras
+ JapaneseExtended = 4,
+ /// The kind of an Ethiopian calendar, with Amete Mihret era
+ Ethiopian = 5,
+ /// The kind of an Ethiopian calendar, with Amete Alem era
+ EthiopianAmeteAlem = 6,
+ /// The kind of a Indian calendar
+ Indian = 7,
+ /// The kind of a Coptic calendar
+ Coptic = 8,
+ /// The kind of a Dangi calendar
+ Dangi = 9,
+ /// The kind of a Chinese calendar
+ Chinese = 10,
+ /// The kind of a Hebrew calendar
+ Hebrew = 11,
+ /// The kind of a Islamic civil calendar
+ IslamicCivil = 12,
+ /// The kind of a Islamic observational calendar
+ IslamicObservational = 13,
+ /// The kind of a Islamic tabular calendar
+ IslamicTabular = 14,
+ /// The kind of a Islamic Umm al-Qura calendar
+ IslamicUmmAlQura = 15,
+ /// The kind of a Persian calendar
+ Persian = 16,
+ /// The kind of a Roc calendar
+ Roc = 17,
+ }
+
+ impl ICU4XAnyCalendarKind {
+ /// Read the calendar type off of the -u-ca- extension on a locale.
+ ///
+ /// Errors if there is no calendar on the locale or if the locale's calendar
+ /// is not known or supported.
+ #[diplomat::rust_link(icu::calendar::AnyCalendarKind::get_for_locale, FnInEnum)]
+ pub fn get_for_locale(locale: &ICU4XLocale) -> Result<ICU4XAnyCalendarKind, ()> {
+ AnyCalendarKind::get_for_locale(&locale.0)
+ .map(Into::into)
+ .ok_or(())
+ }
+
+ /// Obtain the calendar type given a BCP-47 -u-ca- extension string.
+ ///
+ /// Errors if the calendar is not known or supported.
+ #[diplomat::rust_link(icu::calendar::AnyCalendarKind::get_for_bcp47_value, FnInEnum)]
+ #[diplomat::rust_link(
+ icu::calendar::AnyCalendarKind::get_for_bcp47_string,
+ FnInEnum,
+ hidden
+ )]
+ #[diplomat::rust_link(
+ icu::calendar::AnyCalendarKind::get_for_bcp47_bytes,
+ FnInEnum,
+ hidden
+ )]
+ pub fn get_for_bcp47(s: &str) -> Result<ICU4XAnyCalendarKind, ()> {
+ let s = s.as_bytes(); // #2520
+ AnyCalendarKind::get_for_bcp47_bytes(s)
+ .map(Into::into)
+ .ok_or(())
+ }
+
+ /// Obtain the string suitable for use in the -u-ca- extension in a BCP47 locale.
+ #[diplomat::rust_link(icu::calendar::AnyCalendarKind::as_bcp47_string, FnInEnum)]
+ #[diplomat::rust_link(icu::calendar::AnyCalendarKind::as_bcp47_value, FnInEnum, hidden)]
+ pub fn bcp47(
+ self,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ let kind = AnyCalendarKind::from(self);
+ Ok(write.write_str(kind.as_bcp47_string())?)
+ }
+ }
+
+ #[diplomat::opaque]
+ #[diplomat::transparent_convert]
+ #[diplomat::rust_link(icu::calendar::AnyCalendar, Enum)]
+ pub struct ICU4XCalendar(pub Arc<AnyCalendar>);
+
+ impl ICU4XCalendar {
+ /// Creates a new [`ICU4XCalendar`] from the specified date and time.
+ #[diplomat::rust_link(icu::calendar::AnyCalendar::new_for_locale, FnInEnum)]
+ pub fn create_for_locale(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ ) -> Result<Box<ICU4XCalendar>, ICU4XError> {
+ let locale = locale.to_datalocale();
+
+ Ok(Box::new(ICU4XCalendar(Arc::new(call_constructor!(
+ AnyCalendar::new_for_locale [r => Ok(r)],
+ AnyCalendar::try_new_for_locale_with_any_provider,
+ AnyCalendar::try_new_for_locale_with_buffer_provider,
+ provider,
+ &locale
+ )?))))
+ }
+
+ /// Creates a new [`ICU4XCalendar`] from the specified date and time.
+ #[diplomat::rust_link(icu::calendar::AnyCalendar::new, FnInEnum)]
+ pub fn create_for_kind(
+ provider: &ICU4XDataProvider,
+ kind: ICU4XAnyCalendarKind,
+ ) -> Result<Box<ICU4XCalendar>, ICU4XError> {
+ Ok(Box::new(ICU4XCalendar(Arc::new(call_constructor!(
+ AnyCalendar::new [r => Ok(r)],
+ AnyCalendar::try_new_with_any_provider,
+ AnyCalendar::try_new_with_buffer_provider,
+ provider,
+ kind.into()
+ )?))))
+ }
+
+ /// Returns the kind of this calendar
+ #[diplomat::rust_link(icu::calendar::AnyCalendar::kind, FnInEnum)]
+ pub fn kind(&self) -> ICU4XAnyCalendarKind {
+ self.0.kind().into()
+ }
+ }
+}
diff --git a/intl/icu_capi/src/casemap.rs b/intl/icu_capi/src/casemap.rs
new file mode 100644
index 0000000000..cc20ccccec
--- /dev/null
+++ b/intl/icu_capi/src/casemap.rs
@@ -0,0 +1,336 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+use icu_casemap::titlecase::TitlecaseOptions;
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::{
+ errors::ffi::ICU4XError, locale::ffi::ICU4XLocale, provider::ffi::ICU4XDataProvider,
+ };
+ use alloc::boxed::Box;
+ use diplomat_runtime::DiplomatWriteable;
+ use icu_casemap::titlecase::{LeadingAdjustment, TrailingCase};
+ use icu_casemap::{CaseMapCloser, CaseMapper, TitlecaseMapper};
+ use writeable::Writeable;
+
+ #[diplomat::enum_convert(LeadingAdjustment, needs_wildcard)]
+ #[diplomat::rust_link(icu::casemap::titlecase::LeadingAdjustment, Enum)]
+ pub enum ICU4XLeadingAdjustment {
+ Auto,
+ None,
+ ToCased,
+ }
+
+ #[diplomat::enum_convert(TrailingCase, needs_wildcard)]
+ #[diplomat::rust_link(icu::casemap::titlecase::TrailingCase, Enum)]
+ pub enum ICU4XTrailingCase {
+ Lower,
+ Unchanged,
+ }
+
+ #[diplomat::rust_link(icu::casemap::titlecase::TitlecaseOptions, Struct)]
+ pub struct ICU4XTitlecaseOptionsV1 {
+ pub leading_adjustment: ICU4XLeadingAdjustment,
+ pub trailing_case: ICU4XTrailingCase,
+ }
+
+ impl ICU4XTitlecaseOptionsV1 {
+ #[diplomat::rust_link(icu::casemap::titlecase::TitlecaseOptions::default, FnInStruct)]
+ pub fn default_options() -> ICU4XTitlecaseOptionsV1 {
+ // named default_options to avoid keyword clashes
+ Self {
+ leading_adjustment: ICU4XLeadingAdjustment::Auto,
+ trailing_case: ICU4XTrailingCase::Lower,
+ }
+ }
+ }
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::casemap::CaseMapper, Struct)]
+ pub struct ICU4XCaseMapper(pub CaseMapper);
+
+ impl ICU4XCaseMapper {
+ /// Construct a new ICU4XCaseMapper instance
+ #[diplomat::rust_link(icu::casemap::CaseMapper::new, FnInStruct)]
+ pub fn create(provider: &ICU4XDataProvider) -> Result<Box<ICU4XCaseMapper>, ICU4XError> {
+ Ok(Box::new(ICU4XCaseMapper(call_constructor!(
+ CaseMapper::new [r => Ok(r)],
+ CaseMapper::try_new_with_any_provider,
+ CaseMapper::try_new_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Returns the full lowercase mapping of the given string
+ #[diplomat::rust_link(icu::casemap::CaseMapper::lowercase, FnInStruct)]
+ #[diplomat::rust_link(icu::casemap::CaseMapper::lowercase_to_string, FnInStruct, hidden)]
+ pub fn lowercase(
+ &self,
+ s: &str,
+ locale: &ICU4XLocale,
+ write: &mut DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ // #2520
+ // In the future we should be able to make assumptions based on backend
+ core::str::from_utf8(s.as_bytes())
+ .map_err(|e| ICU4XError::DataIoError.log_original(&e))?;
+ self.0.lowercase(s, &locale.0.id).write_to(write)?;
+
+ Ok(())
+ }
+
+ /// Returns the full uppercase mapping of the given string
+ #[diplomat::rust_link(icu::casemap::CaseMapper::uppercase, FnInStruct)]
+ #[diplomat::rust_link(icu::casemap::CaseMapper::uppercase_to_string, FnInStruct, hidden)]
+ pub fn uppercase(
+ &self,
+ s: &str,
+ locale: &ICU4XLocale,
+ write: &mut DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ // #2520
+ // In the future we should be able to make assumptions based on backend
+ core::str::from_utf8(s.as_bytes())
+ .map_err(|e| ICU4XError::DataIoError.log_original(&e))?;
+ self.0.uppercase(s, &locale.0.id).write_to(write)?;
+
+ Ok(())
+ }
+
+ /// Returns the full titlecase mapping of the given string, performing head adjustment without
+ /// loading additional data.
+ /// (if head adjustment is enabled in the options)
+ ///
+ /// The `v1` refers to the version of the options struct, which may change as we add more options
+ #[diplomat::rust_link(
+ icu::casemap::CaseMapper::titlecase_segment_with_only_case_data,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::casemap::CaseMapper::titlecase_segment_with_only_case_data_to_string,
+ FnInStruct,
+ hidden
+ )]
+ pub fn titlecase_segment_with_only_case_data_v1(
+ &self,
+ s: &str,
+ locale: &ICU4XLocale,
+ options: ICU4XTitlecaseOptionsV1,
+ write: &mut DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ // #2520
+ // In the future we should be able to make assumptions based on backend
+ core::str::from_utf8(s.as_bytes())
+ .map_err(|e| ICU4XError::DataIoError.log_original(&e))?;
+ self.0
+ .titlecase_segment_with_only_case_data(s, &locale.0.id, options.into())
+ .write_to(write)?;
+
+ Ok(())
+ }
+
+ /// Case-folds the characters in the given string
+ #[diplomat::rust_link(icu::casemap::CaseMapper::fold, FnInStruct)]
+ #[diplomat::rust_link(icu::casemap::CaseMapper::fold_string, FnInStruct, hidden)]
+ pub fn fold(&self, s: &str, write: &mut DiplomatWriteable) -> Result<(), ICU4XError> {
+ // #2520
+ // In the future we should be able to make assumptions based on backend
+ core::str::from_utf8(s.as_bytes())
+ .map_err(|e| ICU4XError::DataIoError.log_original(&e))?;
+ self.0.fold(s).write_to(write)?;
+
+ Ok(())
+ }
+ /// Case-folds the characters in the given string
+ /// using Turkic (T) mappings for dotted/dotless I.
+ #[diplomat::rust_link(icu::casemap::CaseMapper::fold_turkic, FnInStruct)]
+ #[diplomat::rust_link(icu::casemap::CaseMapper::fold_turkic_string, FnInStruct, hidden)]
+ pub fn fold_turkic(
+ &self,
+ s: &str,
+ write: &mut DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ // #2520
+ // In the future we should be able to make assumptions based on backend
+ core::str::from_utf8(s.as_bytes())
+ .map_err(|e| ICU4XError::DataIoError.log_original(&e))?;
+ self.0.fold_turkic(s).write_to(write)?;
+
+ Ok(())
+ }
+
+ /// Adds all simple case mappings and the full case folding for `c` to `builder`.
+ /// Also adds special case closure mappings.
+ ///
+ /// In other words, this adds all characters that this casemaps to, as
+ /// well as all characters that may casemap to this one.
+ ///
+ /// Note that since ICU4XCodePointSetBuilder does not contain strings, this will
+ /// ignore string mappings.
+ ///
+ /// Identical to the similarly named method on `ICU4XCaseMapCloser`, use that if you
+ /// plan on using string case closure mappings too.
+ #[cfg(feature = "icu_properties")]
+ #[diplomat::rust_link(icu::casemap::CaseMapper::add_case_closure_to, FnInStruct)]
+ pub fn add_case_closure_to(
+ &self,
+ c: char,
+ builder: &mut crate::collections_sets::ffi::ICU4XCodePointSetBuilder,
+ ) {
+ self.0.add_case_closure_to(c, &mut builder.0)
+ }
+
+ /// Returns the simple lowercase mapping of the given character.
+ ///
+ /// This function only implements simple and common mappings.
+ /// Full mappings, which can map one char to a string, are not included.
+ /// For full mappings, use `ICU4XCaseMapper::lowercase`.
+ #[diplomat::rust_link(icu::casemap::CaseMapper::simple_lowercase, FnInStruct)]
+ pub fn simple_lowercase(&self, ch: char) -> char {
+ self.0.simple_lowercase(ch)
+ }
+
+ /// Returns the simple uppercase mapping of the given character.
+ ///
+ /// This function only implements simple and common mappings.
+ /// Full mappings, which can map one char to a string, are not included.
+ /// For full mappings, use `ICU4XCaseMapper::uppercase`.
+ #[diplomat::rust_link(icu::casemap::CaseMapper::simple_uppercase, FnInStruct)]
+ pub fn simple_uppercase(&self, ch: char) -> char {
+ self.0.simple_uppercase(ch)
+ }
+
+ /// Returns the simple titlecase mapping of the given character.
+ ///
+ /// This function only implements simple and common mappings.
+ /// Full mappings, which can map one char to a string, are not included.
+ /// For full mappings, use `ICU4XCaseMapper::titlecase_segment`.
+ #[diplomat::rust_link(icu::casemap::CaseMapper::simple_titlecase, FnInStruct)]
+ pub fn simple_titlecase(&self, ch: char) -> char {
+ self.0.simple_titlecase(ch)
+ }
+
+ /// Returns the simple casefolding of the given character.
+ ///
+ /// This function only implements simple folding.
+ /// For full folding, use `ICU4XCaseMapper::fold`.
+ #[diplomat::rust_link(icu::casemap::CaseMapper::simple_fold, FnInStruct)]
+ pub fn simple_fold(&self, ch: char) -> char {
+ self.0.simple_fold(ch)
+ }
+ /// Returns the simple casefolding of the given character in the Turkic locale
+ ///
+ /// This function only implements simple folding.
+ /// For full folding, use `ICU4XCaseMapper::fold_turkic`.
+ #[diplomat::rust_link(icu::casemap::CaseMapper::simple_fold_turkic, FnInStruct)]
+ pub fn simple_fold_turkic(&self, ch: char) -> char {
+ self.0.simple_fold_turkic(ch)
+ }
+ }
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::casemap::CaseMapCloser, Struct)]
+ pub struct ICU4XCaseMapCloser(pub CaseMapCloser<CaseMapper>);
+
+ impl ICU4XCaseMapCloser {
+ /// Construct a new ICU4XCaseMapper instance
+ #[diplomat::rust_link(icu::casemap::CaseMapCloser::new, FnInStruct)]
+ #[diplomat::rust_link(icu::casemap::CaseMapCloser::new_with_mapper, FnInStruct, hidden)]
+ pub fn create(provider: &ICU4XDataProvider) -> Result<Box<ICU4XCaseMapCloser>, ICU4XError> {
+ Ok(Box::new(ICU4XCaseMapCloser(call_constructor!(
+ CaseMapCloser::new [r => Ok(r)],
+ CaseMapCloser::try_new_with_any_provider,
+ CaseMapCloser::try_new_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Adds all simple case mappings and the full case folding for `c` to `builder`.
+ /// Also adds special case closure mappings.
+ #[cfg(feature = "icu_properties")]
+ #[diplomat::rust_link(icu::casemap::CaseMapCloser::add_case_closure_to, FnInStruct)]
+ pub fn add_case_closure_to(
+ &self,
+ c: char,
+ builder: &mut crate::collections_sets::ffi::ICU4XCodePointSetBuilder,
+ ) {
+ self.0.add_case_closure_to(c, &mut builder.0)
+ }
+
+ /// Finds all characters and strings which may casemap to `s` as their full case folding string
+ /// and adds them to the set.
+ ///
+ /// Returns true if the string was found
+ #[cfg(feature = "icu_properties")]
+ #[diplomat::rust_link(icu::casemap::CaseMapCloser::add_string_case_closure_to, FnInStruct)]
+ pub fn add_string_case_closure_to(
+ &self,
+ s: &str,
+ builder: &mut crate::collections_sets::ffi::ICU4XCodePointSetBuilder,
+ ) -> bool {
+ // #2520
+ // In the future we should be able to make assumptions based on backend
+ let s = core::str::from_utf8(s.as_bytes()).unwrap_or("");
+ self.0.add_string_case_closure_to(s, &mut builder.0)
+ }
+ }
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::casemap::TitlecaseMapper, Struct)]
+ pub struct ICU4XTitlecaseMapper(pub TitlecaseMapper<CaseMapper>);
+
+ impl ICU4XTitlecaseMapper {
+ /// Construct a new `ICU4XTitlecaseMapper` instance
+ #[diplomat::rust_link(icu::casemap::TitlecaseMapper::new, FnInStruct)]
+ #[diplomat::rust_link(icu::casemap::TitlecaseMapper::new_with_mapper, FnInStruct, hidden)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XTitlecaseMapper>, ICU4XError> {
+ Ok(Box::new(ICU4XTitlecaseMapper(call_constructor!(
+ TitlecaseMapper::new [r => Ok(r)],
+ TitlecaseMapper::try_new_with_any_provider,
+ TitlecaseMapper::try_new_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Returns the full titlecase mapping of the given string
+ ///
+ /// The `v1` refers to the version of the options struct, which may change as we add more options
+ #[diplomat::rust_link(icu::casemap::TitlecaseMapper::titlecase_segment, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::casemap::TitlecaseMapper::titlecase_segment_to_string,
+ FnInStruct,
+ hidden
+ )]
+ pub fn titlecase_segment_v1(
+ &self,
+ s: &str,
+ locale: &ICU4XLocale,
+ options: ICU4XTitlecaseOptionsV1,
+ write: &mut DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ // #2520
+ // In the future we should be able to make assumptions based on backend
+ core::str::from_utf8(s.as_bytes())
+ .map_err(|e| ICU4XError::DataIoError.log_original(&e))?;
+ self.0
+ .titlecase_segment(s, &locale.0.id, options.into())
+ .write_to(write)?;
+
+ Ok(())
+ }
+ }
+}
+
+impl From<ffi::ICU4XTitlecaseOptionsV1> for TitlecaseOptions {
+ fn from(other: ffi::ICU4XTitlecaseOptionsV1) -> Self {
+ let mut ret = Self::default();
+
+ ret.leading_adjustment = other.leading_adjustment.into();
+ ret.trailing_case = other.trailing_case.into();
+ ret
+ }
+}
diff --git a/intl/icu_capi/src/collator.rs b/intl/icu_capi/src/collator.rs
new file mode 100644
index 0000000000..bbf56786b7
--- /dev/null
+++ b/intl/icu_capi/src/collator.rs
@@ -0,0 +1,237 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+ use icu_collator::{Collator, CollatorOptions};
+
+ use crate::{
+ common::ffi::ICU4XOrdering, errors::ffi::ICU4XError, locale::ffi::ICU4XLocale,
+ provider::ffi::ICU4XDataProvider,
+ };
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::collator::Collator, Struct)]
+ pub struct ICU4XCollator(pub Collator);
+
+ #[diplomat::rust_link(icu::collator::CollatorOptions, Struct)]
+ #[diplomat::rust_link(icu::collator::CollatorOptions::new, FnInStruct, hidden)]
+ pub struct ICU4XCollatorOptionsV1 {
+ pub strength: ICU4XCollatorStrength,
+ pub alternate_handling: ICU4XCollatorAlternateHandling,
+ pub case_first: ICU4XCollatorCaseFirst,
+ pub max_variable: ICU4XCollatorMaxVariable,
+ pub case_level: ICU4XCollatorCaseLevel,
+ pub numeric: ICU4XCollatorNumeric,
+ pub backward_second_level: ICU4XCollatorBackwardSecondLevel,
+ }
+
+ #[diplomat::rust_link(icu::collator::Strength, Enum)]
+ pub enum ICU4XCollatorStrength {
+ Auto = 0,
+ Primary = 1,
+ Secondary = 2,
+ Tertiary = 3,
+ Quaternary = 4,
+ Identical = 5,
+ }
+
+ #[diplomat::rust_link(icu::collator::AlternateHandling, Enum)]
+ pub enum ICU4XCollatorAlternateHandling {
+ Auto = 0,
+ NonIgnorable = 1,
+ Shifted = 2,
+ }
+
+ #[diplomat::rust_link(icu::collator::CaseFirst, Enum)]
+ pub enum ICU4XCollatorCaseFirst {
+ Auto = 0,
+ Off = 1,
+ LowerFirst = 2,
+ UpperFirst = 3,
+ }
+
+ #[diplomat::rust_link(icu::collator::MaxVariable, Enum)]
+ pub enum ICU4XCollatorMaxVariable {
+ Auto = 0,
+ Space = 1,
+ Punctuation = 2,
+ Symbol = 3,
+ Currency = 4,
+ }
+
+ #[diplomat::rust_link(icu::collator::CaseLevel, Enum)]
+ pub enum ICU4XCollatorCaseLevel {
+ Auto = 0,
+ Off = 1,
+ On = 2,
+ }
+
+ #[diplomat::rust_link(icu::collator::Numeric, Enum)]
+ pub enum ICU4XCollatorNumeric {
+ Auto = 0,
+ Off = 1,
+ On = 2,
+ }
+
+ #[diplomat::rust_link(icu::collator::BackwardSecondLevel, Enum)]
+ pub enum ICU4XCollatorBackwardSecondLevel {
+ Auto = 0,
+ Off = 1,
+ On = 2,
+ }
+
+ impl ICU4XCollator {
+ /// Construct a new Collator instance.
+ #[diplomat::rust_link(icu::collator::Collator::try_new, FnInStruct)]
+ pub fn create_v1(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ options: ICU4XCollatorOptionsV1,
+ ) -> Result<Box<ICU4XCollator>, ICU4XError> {
+ let locale = locale.to_datalocale();
+ let options = CollatorOptions::from(options);
+
+ Ok(Box::new(ICU4XCollator(call_constructor!(
+ Collator::try_new,
+ Collator::try_new_with_any_provider,
+ Collator::try_new_with_buffer_provider,
+ provider,
+ &locale,
+ options,
+ )?)))
+ }
+
+ /// Compare potentially ill-formed UTF-8 strings.
+ ///
+ /// Ill-formed input is compared
+ /// as if errors had been replaced with REPLACEMENT CHARACTERs according
+ /// to the WHATWG Encoding Standard.
+ #[diplomat::rust_link(icu::collator::Collator::compare_utf8, FnInStruct)]
+ #[diplomat::attr(dart, disable)]
+ pub fn compare(&self, left: &str, right: &str) -> ICU4XOrdering {
+ let left = left.as_bytes(); // #2520
+ let right = right.as_bytes(); // #2520
+ self.0.compare_utf8(left, right).into()
+ }
+
+ /// Compare guaranteed well-formed UTF-8 strings.
+ ///
+ /// Note: In C++, passing ill-formed UTF-8 strings is undefined behavior
+ /// (and may be memory-unsafe to do so, too).
+ #[diplomat::rust_link(icu::collator::Collator::compare, FnInStruct)]
+ #[diplomat::attr(dart, rename = "compare")]
+ pub fn compare_valid_utf8(&self, left: &str, right: &str) -> ICU4XOrdering {
+ self.0.compare(left, right).into()
+ }
+
+ /// Compare potentially ill-formed UTF-16 strings, with unpaired surrogates
+ /// compared as REPLACEMENT CHARACTER.
+ #[diplomat::rust_link(icu::collator::Collator::compare_utf16, FnInStruct)]
+ pub fn compare_utf16(&self, left: &[u16], right: &[u16]) -> ICU4XOrdering {
+ self.0.compare_utf16(left, right).into()
+ }
+ }
+}
+
+use icu_collator::{
+ AlternateHandling, BackwardSecondLevel, CaseFirst, CaseLevel, CollatorOptions, MaxVariable,
+ Numeric, Strength,
+};
+
+impl From<ffi::ICU4XCollatorStrength> for Option<Strength> {
+ fn from(strength: ffi::ICU4XCollatorStrength) -> Option<Strength> {
+ match strength {
+ ffi::ICU4XCollatorStrength::Auto => None,
+ ffi::ICU4XCollatorStrength::Primary => Some(Strength::Primary),
+ ffi::ICU4XCollatorStrength::Secondary => Some(Strength::Secondary),
+ ffi::ICU4XCollatorStrength::Tertiary => Some(Strength::Tertiary),
+ ffi::ICU4XCollatorStrength::Quaternary => Some(Strength::Quaternary),
+ ffi::ICU4XCollatorStrength::Identical => Some(Strength::Identical),
+ }
+ }
+}
+
+impl From<ffi::ICU4XCollatorAlternateHandling> for Option<AlternateHandling> {
+ fn from(alternate_handling: ffi::ICU4XCollatorAlternateHandling) -> Option<AlternateHandling> {
+ match alternate_handling {
+ ffi::ICU4XCollatorAlternateHandling::Auto => None,
+ ffi::ICU4XCollatorAlternateHandling::NonIgnorable => {
+ Some(AlternateHandling::NonIgnorable)
+ }
+ ffi::ICU4XCollatorAlternateHandling::Shifted => Some(AlternateHandling::Shifted),
+ }
+ }
+}
+
+impl From<ffi::ICU4XCollatorCaseFirst> for Option<CaseFirst> {
+ fn from(case_first: ffi::ICU4XCollatorCaseFirst) -> Option<CaseFirst> {
+ match case_first {
+ ffi::ICU4XCollatorCaseFirst::Auto => None,
+ ffi::ICU4XCollatorCaseFirst::Off => Some(CaseFirst::Off),
+ ffi::ICU4XCollatorCaseFirst::LowerFirst => Some(CaseFirst::LowerFirst),
+ ffi::ICU4XCollatorCaseFirst::UpperFirst => Some(CaseFirst::UpperFirst),
+ }
+ }
+}
+
+impl From<ffi::ICU4XCollatorMaxVariable> for Option<MaxVariable> {
+ fn from(max_variable: ffi::ICU4XCollatorMaxVariable) -> Option<MaxVariable> {
+ match max_variable {
+ ffi::ICU4XCollatorMaxVariable::Auto => None,
+ ffi::ICU4XCollatorMaxVariable::Space => Some(MaxVariable::Space),
+ ffi::ICU4XCollatorMaxVariable::Punctuation => Some(MaxVariable::Punctuation),
+ ffi::ICU4XCollatorMaxVariable::Symbol => Some(MaxVariable::Symbol),
+ ffi::ICU4XCollatorMaxVariable::Currency => Some(MaxVariable::Currency),
+ }
+ }
+}
+
+impl From<ffi::ICU4XCollatorCaseLevel> for Option<CaseLevel> {
+ fn from(case_level: ffi::ICU4XCollatorCaseLevel) -> Option<CaseLevel> {
+ match case_level {
+ ffi::ICU4XCollatorCaseLevel::Auto => None,
+ ffi::ICU4XCollatorCaseLevel::Off => Some(CaseLevel::Off),
+ ffi::ICU4XCollatorCaseLevel::On => Some(CaseLevel::On),
+ }
+ }
+}
+
+impl From<ffi::ICU4XCollatorNumeric> for Option<Numeric> {
+ fn from(numeric: ffi::ICU4XCollatorNumeric) -> Option<Numeric> {
+ match numeric {
+ ffi::ICU4XCollatorNumeric::Auto => None,
+ ffi::ICU4XCollatorNumeric::Off => Some(Numeric::Off),
+ ffi::ICU4XCollatorNumeric::On => Some(Numeric::On),
+ }
+ }
+}
+
+impl From<ffi::ICU4XCollatorBackwardSecondLevel> for Option<BackwardSecondLevel> {
+ fn from(
+ backward_second_level: ffi::ICU4XCollatorBackwardSecondLevel,
+ ) -> Option<BackwardSecondLevel> {
+ match backward_second_level {
+ ffi::ICU4XCollatorBackwardSecondLevel::Auto => None,
+ ffi::ICU4XCollatorBackwardSecondLevel::Off => Some(BackwardSecondLevel::Off),
+ ffi::ICU4XCollatorBackwardSecondLevel::On => Some(BackwardSecondLevel::On),
+ }
+ }
+}
+
+impl From<ffi::ICU4XCollatorOptionsV1> for CollatorOptions {
+ fn from(options: ffi::ICU4XCollatorOptionsV1) -> CollatorOptions {
+ let mut result = CollatorOptions::new();
+ result.strength = options.strength.into();
+ result.alternate_handling = options.alternate_handling.into();
+ result.case_first = options.case_first.into();
+ result.max_variable = options.max_variable.into();
+ result.case_level = options.case_level.into();
+ result.numeric = options.numeric.into();
+ result.backward_second_level = options.backward_second_level.into();
+
+ result
+ }
+}
diff --git a/intl/icu_capi/src/collections_sets.rs b/intl/icu_capi/src/collections_sets.rs
new file mode 100644
index 0000000000..68ce1dfd1a
--- /dev/null
+++ b/intl/icu_capi/src/collections_sets.rs
@@ -0,0 +1,223 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::properties_sets::ffi::ICU4XCodePointSetData;
+ use alloc::boxed::Box;
+ use core::mem;
+ use icu_collections::codepointinvlist::CodePointInversionListBuilder;
+ use icu_properties::sets::CodePointSetData;
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder,
+ Struct
+ )]
+ pub struct ICU4XCodePointSetBuilder(pub CodePointInversionListBuilder);
+
+ impl ICU4XCodePointSetBuilder {
+ /// Make a new set builder containing nothing
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::new,
+ FnInStruct
+ )]
+ pub fn create() -> Box<Self> {
+ Box::new(Self(CodePointInversionListBuilder::new()))
+ }
+
+ /// Build this into a set
+ ///
+ /// This object is repopulated with an empty builder
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::build,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::properties::sets::CodePointSetData::from_code_point_inversion_list,
+ FnInStruct,
+ hidden
+ )]
+ pub fn build(&mut self) -> Box<ICU4XCodePointSetData> {
+ let inner = mem::take(&mut self.0);
+ let built = inner.build();
+ let set = CodePointSetData::from_code_point_inversion_list(built);
+ Box::new(ICU4XCodePointSetData(set))
+ }
+
+ /// Complements this set
+ ///
+ /// (Elements in this set are removed and vice versa)
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::complement,
+ FnInStruct
+ )]
+ pub fn complement(&mut self) {
+ self.0.complement()
+ }
+
+ /// Returns whether this set is empty
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::is_empty,
+ FnInStruct
+ )]
+ pub fn is_empty(&self) -> bool {
+ self.0.is_empty()
+ }
+
+ /// Add a single character to the set
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::add_char,
+ FnInStruct
+ )]
+ pub fn add_char(&mut self, ch: char) {
+ self.0.add_char(ch)
+ }
+
+ /// Add a single u32 value to the set
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::add_u32,
+ FnInStruct
+ )]
+ #[diplomat::attr(dart, disable)]
+ pub fn add_u32(&mut self, ch: u32) {
+ self.0.add_u32(ch)
+ }
+
+ /// Add an inclusive range of characters to the set
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::add_range,
+ FnInStruct
+ )]
+ pub fn add_inclusive_range(&mut self, start: char, end: char) {
+ self.0.add_range(&(start..=end))
+ }
+
+ /// Add an inclusive range of u32s to the set
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::add_range_u32,
+ FnInStruct
+ )]
+ #[diplomat::attr(dart, disable)]
+ pub fn add_inclusive_range_u32(&mut self, start: u32, end: u32) {
+ self.0.add_range_u32(&(start..=end))
+ }
+
+ /// Add all elements that belong to the provided set to the set
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::add_set,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::properties::sets::CodePointSetData::as_code_point_inversion_list,
+ FnInStruct,
+ hidden
+ )]
+ #[diplomat::rust_link(
+ icu::properties::sets::CodePointSetData::to_code_point_inversion_list,
+ FnInStruct,
+ hidden
+ )]
+ pub fn add_set(&mut self, data: &ICU4XCodePointSetData) {
+ // This is a ZeroFrom and always cheap for a CPIL, may be expensive
+ // for other impls. In the future we can make this builder support multiple impls
+ // if we ever add them
+ let list = data.0.to_code_point_inversion_list();
+ self.0.add_set(&list);
+ }
+
+ /// Remove a single character to the set
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::remove_char,
+ FnInStruct
+ )]
+ pub fn remove_char(&mut self, ch: char) {
+ self.0.remove_char(ch)
+ }
+
+ /// Remove an inclusive range of characters from the set
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::remove_range,
+ FnInStruct
+ )]
+ pub fn remove_inclusive_range(&mut self, start: char, end: char) {
+ self.0.remove_range(&(start..=end))
+ }
+
+ /// Remove all elements that belong to the provided set from the set
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::remove_set,
+ FnInStruct
+ )]
+ pub fn remove_set(&mut self, data: &ICU4XCodePointSetData) {
+ // (see comment in add_set)
+ let list = data.0.to_code_point_inversion_list();
+ self.0.remove_set(&list);
+ }
+
+ /// Removes all elements from the set except a single character
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::retain_char,
+ FnInStruct
+ )]
+ pub fn retain_char(&mut self, ch: char) {
+ self.0.retain_char(ch)
+ }
+
+ /// Removes all elements from the set except an inclusive range of characters f
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::retain_range,
+ FnInStruct
+ )]
+ pub fn retain_inclusive_range(&mut self, start: char, end: char) {
+ self.0.retain_range(&(start..=end))
+ }
+
+ /// Removes all elements from the set except all elements in the provided set
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::retain_set,
+ FnInStruct
+ )]
+ pub fn retain_set(&mut self, data: &ICU4XCodePointSetData) {
+ // (see comment in add_set)
+ let list = data.0.to_code_point_inversion_list();
+ self.0.retain_set(&list);
+ }
+
+ /// Complement a single character to the set
+ ///
+ /// (Characters which are in this set are removed and vice versa)
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::complement_char,
+ FnInStruct
+ )]
+ pub fn complement_char(&mut self, ch: char) {
+ self.0.complement_char(ch)
+ }
+
+ /// Complement an inclusive range of characters from the set
+ ///
+ /// (Characters which are in this set are removed and vice versa)
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::complement_range,
+ FnInStruct
+ )]
+ pub fn complement_inclusive_range(&mut self, start: char, end: char) {
+ self.0.complement_range(&(start..=end))
+ }
+
+ /// Complement all elements that belong to the provided set from the set
+ ///
+ /// (Characters which are in this set are removed and vice versa)
+ #[diplomat::rust_link(
+ icu::collections::codepointinvlist::CodePointInversionListBuilder::complement_set,
+ FnInStruct
+ )]
+ pub fn complement_set(&mut self, data: &ICU4XCodePointSetData) {
+ // (see comment in add_set)
+ let list = data.0.to_code_point_inversion_list();
+ self.0.complement_set(&list);
+ }
+ }
+}
diff --git a/intl/icu_capi/src/common.rs b/intl/icu_capi/src/common.rs
new file mode 100644
index 0000000000..d11ca26044
--- /dev/null
+++ b/intl/icu_capi/src/common.rs
@@ -0,0 +1,16 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+
+ #[diplomat::enum_convert(core::cmp::Ordering)]
+ #[diplomat::rust_link(core::cmp::Ordering, Enum)]
+ pub enum ICU4XOrdering {
+ Less = -1,
+ Equal = 0,
+ Greater = 1,
+ }
+}
diff --git a/intl/icu_capi/src/data_struct.rs b/intl/icu_capi/src/data_struct.rs
new file mode 100644
index 0000000000..60765cec24
--- /dev/null
+++ b/intl/icu_capi/src/data_struct.rs
@@ -0,0 +1,90 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[cfg(feature = "icu_decimal")]
+use alloc::borrow::{Cow, ToOwned};
+
+#[diplomat::bridge]
+pub mod ffi {
+
+ #[cfg(feature = "icu_decimal")]
+ use crate::errors::ffi::ICU4XError;
+ use alloc::boxed::Box;
+ use icu_provider::AnyPayload;
+ #[cfg(feature = "icu_decimal")]
+ use icu_provider::DataPayload;
+
+ #[diplomat::opaque]
+ /// A generic data struct to be used by ICU4X
+ ///
+ /// This can be used to construct a StructDataProvider.
+ #[diplomat::attr(dart, disable)]
+ pub struct ICU4XDataStruct(#[allow(dead_code)] AnyPayload);
+
+ impl ICU4XDataStruct {
+ /// Construct a new DecimalSymbolsV1 data struct.
+ ///
+ /// C++ users: All string arguments must be valid UTF8
+ #[diplomat::rust_link(icu::decimal::provider::DecimalSymbolsV1, Struct)]
+ #[allow(clippy::too_many_arguments)]
+ #[cfg(feature = "icu_decimal")]
+ pub fn create_decimal_symbols_v1(
+ plus_sign_prefix: &str,
+ plus_sign_suffix: &str,
+ minus_sign_prefix: &str,
+ minus_sign_suffix: &str,
+ decimal_separator: &str,
+ grouping_separator: &str,
+ primary_group_size: u8,
+ secondary_group_size: u8,
+ min_group_size: u8,
+ digits: &[char],
+ ) -> Result<Box<ICU4XDataStruct>, ICU4XError> {
+ use super::str_to_cow;
+ use icu_decimal::provider::{
+ AffixesV1, DecimalSymbolsV1, DecimalSymbolsV1Marker, GroupingSizesV1,
+ };
+ let digits = if digits.len() == 10 {
+ let mut new_digits = ['\0'; 10];
+ new_digits.copy_from_slice(digits);
+ new_digits
+ } else {
+ return Err(ICU4XError::DataStructValidityError);
+ };
+ let plus_sign_affixes = AffixesV1 {
+ prefix: str_to_cow(plus_sign_prefix),
+ suffix: str_to_cow(plus_sign_suffix),
+ };
+ let minus_sign_affixes = AffixesV1 {
+ prefix: str_to_cow(minus_sign_prefix),
+ suffix: str_to_cow(minus_sign_suffix),
+ };
+ let grouping_sizes = GroupingSizesV1 {
+ primary: primary_group_size,
+ secondary: secondary_group_size,
+ min_grouping: min_group_size,
+ };
+
+ let symbols = DecimalSymbolsV1 {
+ plus_sign_affixes,
+ minus_sign_affixes,
+ decimal_separator: str_to_cow(decimal_separator),
+ grouping_separator: str_to_cow(grouping_separator),
+ grouping_sizes,
+ digits,
+ };
+
+ let payload: DataPayload<DecimalSymbolsV1Marker> = DataPayload::from_owned(symbols);
+ Ok(Box::new(ICU4XDataStruct(payload.wrap_into_any_payload())))
+ }
+ }
+}
+#[cfg(feature = "icu_decimal")]
+fn str_to_cow(s: &str) -> Cow<'static, str> {
+ if s.is_empty() {
+ Cow::default()
+ } else {
+ Cow::from(s.to_owned())
+ }
+}
diff --git a/intl/icu_capi/src/date.rs b/intl/icu_capi/src/date.rs
new file mode 100644
index 0000000000..39fd03835c
--- /dev/null
+++ b/intl/icu_capi/src/date.rs
@@ -0,0 +1,300 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+ use alloc::sync::Arc;
+ use core::fmt::Write;
+ use icu_calendar::types::IsoWeekday;
+ use icu_calendar::AnyCalendar;
+ use icu_calendar::{Date, Iso};
+ use tinystr::TinyAsciiStr;
+
+ use crate::calendar::ffi::ICU4XCalendar;
+ use crate::errors::ffi::ICU4XError;
+
+ #[cfg(feature = "icu_calendar")]
+ use crate::week::ffi::ICU4XWeekCalculator;
+
+ #[diplomat::enum_convert(IsoWeekday)]
+ pub enum ICU4XIsoWeekday {
+ Monday = 1,
+ Tuesday,
+ Wednesday,
+ Thursday,
+ Friday,
+ Saturday,
+ Sunday,
+ }
+ #[diplomat::opaque]
+ #[diplomat::transparent_convert]
+ /// An ICU4X Date object capable of containing a ISO-8601 date
+ #[diplomat::rust_link(icu::calendar::Date, Struct)]
+ pub struct ICU4XIsoDate(pub Date<Iso>);
+
+ impl ICU4XIsoDate {
+ /// Creates a new [`ICU4XIsoDate`] from the specified date and time.
+ #[diplomat::rust_link(icu::calendar::Date::try_new_iso_date, FnInStruct)]
+ pub fn create(year: i32, month: u8, day: u8) -> Result<Box<ICU4XIsoDate>, ICU4XError> {
+ Ok(Box::new(ICU4XIsoDate(Date::try_new_iso_date(
+ year, month, day,
+ )?)))
+ }
+
+ /// Creates a new [`ICU4XIsoDate`] representing January 1, 1970.
+ #[diplomat::rust_link(icu::calendar::Date::unix_epoch, FnInStruct)]
+ pub fn create_for_unix_epoch() -> Box<ICU4XIsoDate> {
+ Box::new(ICU4XIsoDate(Date::unix_epoch()))
+ }
+
+ /// Convert this date to one in a different calendar
+ #[diplomat::rust_link(icu::calendar::Date::to_calendar, FnInStruct)]
+ pub fn to_calendar(&self, calendar: &ICU4XCalendar) -> Box<ICU4XDate> {
+ Box::new(ICU4XDate(self.0.to_calendar(calendar.0.clone())))
+ }
+
+ #[diplomat::rust_link(icu::calendar::Date::to_any, FnInStruct)]
+ pub fn to_any(&self) -> Box<ICU4XDate> {
+ Box::new(ICU4XDate(self.0.to_any().wrap_calendar_in_arc()))
+ }
+
+ /// Returns the 1-indexed day in the month for this date
+ #[diplomat::rust_link(icu::calendar::Date::day_of_month, FnInStruct)]
+ pub fn day_of_month(&self) -> u32 {
+ self.0.day_of_month().0
+ }
+
+ /// Returns the day in the week for this day
+ #[diplomat::rust_link(icu::calendar::Date::day_of_week, FnInStruct)]
+ pub fn day_of_week(&self) -> ICU4XIsoWeekday {
+ self.0.day_of_week().into()
+ }
+
+ /// Returns the week number in this month, 1-indexed, based on what
+ /// is considered the first day of the week (often a locale preference).
+ ///
+ /// `first_weekday` can be obtained via `first_weekday()` on [`ICU4XWeekCalculator`]
+ #[diplomat::rust_link(icu::calendar::Date::week_of_month, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::calendar::week::WeekCalculator::week_of_month,
+ FnInStruct,
+ hidden
+ )]
+ pub fn week_of_month(&self, first_weekday: ICU4XIsoWeekday) -> u32 {
+ self.0.week_of_month(first_weekday.into()).0
+ }
+
+ /// Returns the week number in this year, using week data
+ #[diplomat::rust_link(icu::calendar::Date::week_of_year, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::calendar::week::WeekCalculator::week_of_year,
+ FnInStruct,
+ hidden
+ )]
+ #[cfg(feature = "icu_calendar")]
+ pub fn week_of_year(
+ &self,
+ calculator: &ICU4XWeekCalculator,
+ ) -> Result<crate::week::ffi::ICU4XWeekOf, ICU4XError> {
+ Ok(self.0.week_of_year(&calculator.0)?.into())
+ }
+
+ /// Returns 1-indexed number of the month of this date in its year
+ #[diplomat::rust_link(icu::calendar::Date::month, FnInStruct)]
+ pub fn month(&self) -> u32 {
+ self.0.month().ordinal
+ }
+
+ /// Returns the year number for this date
+ #[diplomat::rust_link(icu::calendar::Date::year, FnInStruct)]
+ pub fn year(&self) -> i32 {
+ self.0.year().number
+ }
+
+ /// Returns if the year is a leap year for this date
+ #[diplomat::rust_link(icu::calendar::Date::is_in_leap_year, FnInStruct)]
+ pub fn is_in_leap_year(&self) -> bool {
+ self.0.is_in_leap_year()
+ }
+
+ /// Returns the number of months in the year represented by this date
+ #[diplomat::rust_link(icu::calendar::Date::months_in_year, FnInStruct)]
+ pub fn months_in_year(&self) -> u8 {
+ self.0.months_in_year()
+ }
+
+ /// Returns the number of days in the month represented by this date
+ #[diplomat::rust_link(icu::calendar::Date::days_in_month, FnInStruct)]
+ pub fn days_in_month(&self) -> u8 {
+ self.0.days_in_month()
+ }
+
+ /// Returns the number of days in the year represented by this date
+ #[diplomat::rust_link(icu::calendar::Date::days_in_year, FnInStruct)]
+ pub fn days_in_year(&self) -> u16 {
+ self.0.days_in_year()
+ }
+ }
+
+ #[diplomat::opaque]
+ #[diplomat::transparent_convert]
+ /// An ICU4X Date object capable of containing a date and time for any calendar.
+ #[diplomat::rust_link(icu::calendar::Date, Struct)]
+ pub struct ICU4XDate(pub Date<Arc<AnyCalendar>>);
+
+ impl ICU4XDate {
+ /// Creates a new [`ICU4XDate`] representing the ISO date and time
+ /// given but in a given calendar
+ #[diplomat::rust_link(icu::calendar::Date::new_from_iso, FnInStruct)]
+ pub fn create_from_iso_in_calendar(
+ year: i32,
+ month: u8,
+ day: u8,
+ calendar: &ICU4XCalendar,
+ ) -> Result<Box<ICU4XDate>, ICU4XError> {
+ let cal = calendar.0.clone();
+ Ok(Box::new(ICU4XDate(
+ Date::try_new_iso_date(year, month, day)?.to_calendar(cal),
+ )))
+ }
+
+ /// Creates a new [`ICU4XDate`] from the given codes, which are interpreted in the given calendar system
+ #[diplomat::rust_link(icu::calendar::Date::try_new_from_codes, FnInStruct)]
+ pub fn create_from_codes_in_calendar(
+ era_code: &str,
+ year: i32,
+ month_code: &str,
+ day: u8,
+ calendar: &ICU4XCalendar,
+ ) -> Result<Box<ICU4XDate>, ICU4XError> {
+ let era_code = era_code.as_bytes(); // #2520
+ let month_code = month_code.as_bytes(); // #2520
+ let era = TinyAsciiStr::from_bytes(era_code)?.into();
+ let month = TinyAsciiStr::from_bytes(month_code)?.into();
+ let cal = calendar.0.clone();
+ Ok(Box::new(ICU4XDate(Date::try_new_from_codes(
+ era, year, month, day, cal,
+ )?)))
+ }
+
+ /// Convert this date to one in a different calendar
+ #[diplomat::rust_link(icu::calendar::Date::to_calendar, FnInStruct)]
+ pub fn to_calendar(&self, calendar: &ICU4XCalendar) -> Box<ICU4XDate> {
+ Box::new(ICU4XDate(self.0.to_calendar(calendar.0.clone())))
+ }
+
+ /// Converts this date to ISO
+ #[diplomat::rust_link(icu::calendar::Date::to_iso, FnInStruct)]
+ pub fn to_iso(&self) -> Box<ICU4XIsoDate> {
+ Box::new(ICU4XIsoDate(self.0.to_iso()))
+ }
+
+ /// Returns the 1-indexed day in the month for this date
+ #[diplomat::rust_link(icu::calendar::Date::day_of_month, FnInStruct)]
+ pub fn day_of_month(&self) -> u32 {
+ self.0.day_of_month().0
+ }
+
+ /// Returns the day in the week for this day
+ #[diplomat::rust_link(icu::calendar::Date::day_of_week, FnInStruct)]
+ pub fn day_of_week(&self) -> ICU4XIsoWeekday {
+ self.0.day_of_week().into()
+ }
+
+ /// Returns the week number in this month, 1-indexed, based on what
+ /// is considered the first day of the week (often a locale preference).
+ ///
+ /// `first_weekday` can be obtained via `first_weekday()` on [`ICU4XWeekCalculator`]
+ #[diplomat::rust_link(icu::calendar::Date::week_of_month, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::calendar::week::WeekCalculator::week_of_month,
+ FnInStruct,
+ hidden
+ )]
+ pub fn week_of_month(&self, first_weekday: ICU4XIsoWeekday) -> u32 {
+ self.0.week_of_month(first_weekday.into()).0
+ }
+
+ /// Returns the week number in this year, using week data
+ #[diplomat::rust_link(icu::calendar::Date::week_of_year, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::calendar::week::WeekCalculator::week_of_year,
+ FnInStruct,
+ hidden
+ )]
+ #[cfg(feature = "icu_calendar")]
+ pub fn week_of_year(
+ &self,
+ calculator: &ICU4XWeekCalculator,
+ ) -> Result<crate::week::ffi::ICU4XWeekOf, ICU4XError> {
+ Ok(self.0.week_of_year(&calculator.0)?.into())
+ }
+
+ /// Returns 1-indexed number of the month of this date in its year
+ ///
+ /// Note that for lunar calendars this may not lead to the same month
+ /// having the same ordinal month across years; use month_code if you care
+ /// about month identity.
+ #[diplomat::rust_link(icu::calendar::Date::month, FnInStruct)]
+ pub fn ordinal_month(&self) -> u32 {
+ self.0.month().ordinal
+ }
+
+ /// Returns the month code for this date. Typically something
+ /// like "M01", "M02", but can be more complicated for lunar calendars.
+ #[diplomat::rust_link(icu::calendar::Date::month, FnInStruct)]
+ pub fn month_code(
+ &self,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ let code = self.0.month().code;
+ write.write_str(&code.0)?;
+ Ok(())
+ }
+
+ /// Returns the year number in the current era for this date
+ #[diplomat::rust_link(icu::calendar::Date::year, FnInStruct)]
+ pub fn year_in_era(&self) -> i32 {
+ self.0.year().number
+ }
+
+ /// Returns the era for this date,
+ #[diplomat::rust_link(icu::Date::year, FnInStruct)]
+ #[diplomat::rust_link(icu::types::Era, Struct, compact)]
+ pub fn era(
+ &self,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ let era = self.0.year().era;
+ write.write_str(&era.0)?;
+ Ok(())
+ }
+
+ /// Returns the number of months in the year represented by this date
+ #[diplomat::rust_link(icu::calendar::Date::months_in_year, FnInStruct)]
+ pub fn months_in_year(&self) -> u8 {
+ self.0.months_in_year()
+ }
+
+ /// Returns the number of days in the month represented by this date
+ #[diplomat::rust_link(icu::calendar::Date::days_in_month, FnInStruct)]
+ pub fn days_in_month(&self) -> u8 {
+ self.0.days_in_month()
+ }
+
+ /// Returns the number of days in the year represented by this date
+ #[diplomat::rust_link(icu::calendar::Date::days_in_year, FnInStruct)]
+ pub fn days_in_year(&self) -> u16 {
+ self.0.days_in_year()
+ }
+
+ /// Returns the [`ICU4XCalendar`] object backing this date
+ #[diplomat::rust_link(icu::calendar::Date::calendar, FnInStruct)]
+ #[diplomat::rust_link(icu::calendar::Date::calendar_wrapper, FnInStruct, hidden)]
+ pub fn calendar(&self) -> Box<ICU4XCalendar> {
+ Box::new(ICU4XCalendar(self.0.calendar_wrapper().clone()))
+ }
+ }
+}
diff --git a/intl/icu_capi/src/datetime.rs b/intl/icu_capi/src/datetime.rs
new file mode 100644
index 0000000000..627b9c16a3
--- /dev/null
+++ b/intl/icu_capi/src/datetime.rs
@@ -0,0 +1,415 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+ use alloc::sync::Arc;
+ use core::convert::TryInto;
+ use core::fmt::Write;
+
+ use icu_calendar::types::Time;
+ use icu_calendar::AnyCalendar;
+ use icu_calendar::{DateTime, Iso};
+ use tinystr::TinyAsciiStr;
+
+ use crate::calendar::ffi::ICU4XCalendar;
+ use crate::date::ffi::{ICU4XDate, ICU4XIsoDate, ICU4XIsoWeekday};
+ use crate::errors::ffi::ICU4XError;
+ use crate::time::ffi::ICU4XTime;
+
+ #[cfg(feature = "icu_calendar")]
+ use crate::week::ffi::ICU4XWeekCalculator;
+
+ #[diplomat::opaque]
+ /// An ICU4X DateTime object capable of containing a ISO-8601 date and time.
+ #[diplomat::rust_link(icu::calendar::DateTime, Struct)]
+ pub struct ICU4XIsoDateTime(pub DateTime<Iso>);
+
+ impl ICU4XIsoDateTime {
+ /// Creates a new [`ICU4XIsoDateTime`] from the specified date and time.
+ #[diplomat::rust_link(icu::calendar::DateTime::try_new_iso_datetime, FnInStruct)]
+ pub fn create(
+ year: i32,
+ month: u8,
+ day: u8,
+ hour: u8,
+ minute: u8,
+ second: u8,
+ nanosecond: u32,
+ ) -> Result<Box<ICU4XIsoDateTime>, ICU4XError> {
+ let mut dt = DateTime::try_new_iso_datetime(year, month, day, hour, minute, second)?;
+ dt.time.nanosecond = nanosecond.try_into()?;
+ Ok(Box::new(ICU4XIsoDateTime(dt)))
+ }
+
+ /// Creates a new [`ICU4XIsoDateTime`] from an [`ICU4XIsoDate`] and [`ICU4XTime`] object
+ #[diplomat::rust_link(icu::calendar::DateTime::new, FnInStruct)]
+ #[diplomat::attr(dart, rename = "create_from_date_and_time")]
+ pub fn crate_from_date_and_time(
+ date: &ICU4XIsoDate,
+ time: &ICU4XTime,
+ ) -> Box<ICU4XIsoDateTime> {
+ let dt = DateTime::new(date.0, time.0);
+ Box::new(ICU4XIsoDateTime(dt))
+ }
+
+ /// Construct from the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)
+ #[diplomat::rust_link(
+ icu::calendar::DateTime::from_minutes_since_local_unix_epoch,
+ FnInStruct
+ )]
+ pub fn create_from_minutes_since_local_unix_epoch(minutes: i32) -> Box<ICU4XIsoDateTime> {
+ Box::new(ICU4XIsoDateTime(
+ DateTime::from_minutes_since_local_unix_epoch(minutes),
+ ))
+ }
+
+ /// Gets the date contained in this object
+ #[diplomat::rust_link(icu::calendar::DateTime::date, StructField)]
+ pub fn date(&self) -> Box<ICU4XIsoDate> {
+ Box::new(ICU4XIsoDate(self.0.date))
+ }
+
+ /// Gets the time contained in this object
+ #[diplomat::rust_link(icu::calendar::DateTime::time, StructField)]
+ pub fn time(&self) -> Box<ICU4XTime> {
+ Box::new(ICU4XTime(self.0.time))
+ }
+
+ /// Converts this to an [`ICU4XDateTime`] capable of being mixed with dates of
+ /// other calendars
+ #[diplomat::rust_link(icu::calendar::DateTime::to_any, FnInStruct)]
+ #[diplomat::rust_link(icu::calendar::DateTime::new_from_iso, FnInStruct, hidden)]
+ pub fn to_any(&self) -> Box<ICU4XDateTime> {
+ Box::new(ICU4XDateTime(self.0.to_any().wrap_calendar_in_arc()))
+ }
+
+ /// Gets the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)
+ #[diplomat::rust_link(icu::calendar::DateTime::minutes_since_local_unix_epoch, FnInStruct)]
+ pub fn minutes_since_local_unix_epoch(&self) -> i32 {
+ self.0.minutes_since_local_unix_epoch()
+ }
+
+ /// Convert this datetime to one in a different calendar
+ #[diplomat::rust_link(icu::calendar::DateTime::to_calendar, FnInStruct)]
+ pub fn to_calendar(&self, calendar: &ICU4XCalendar) -> Box<ICU4XDateTime> {
+ Box::new(ICU4XDateTime(self.0.to_calendar(calendar.0.clone())))
+ }
+
+ /// Returns the hour in this time
+ #[diplomat::rust_link(icu::calendar::types::Time::hour, StructField)]
+ pub fn hour(&self) -> u8 {
+ self.0.time.hour.into()
+ }
+ /// Returns the minute in this time
+ #[diplomat::rust_link(icu::calendar::types::Time::minute, StructField)]
+ pub fn minute(&self) -> u8 {
+ self.0.time.minute.into()
+ }
+ /// Returns the second in this time
+ #[diplomat::rust_link(icu::calendar::types::Time::second, StructField)]
+ pub fn second(&self) -> u8 {
+ self.0.time.second.into()
+ }
+ /// Returns the nanosecond in this time
+ #[diplomat::rust_link(icu::calendar::types::Time::nanosecond, StructField)]
+ pub fn nanosecond(&self) -> u32 {
+ self.0.time.nanosecond.into()
+ }
+
+ /// Returns the 1-indexed day in the month for this date
+ #[diplomat::rust_link(icu::calendar::Date::day_of_month, FnInStruct)]
+ pub fn day_of_month(&self) -> u32 {
+ self.0.date.day_of_month().0
+ }
+
+ /// Returns the day in the week for this day
+ #[diplomat::rust_link(icu::calendar::Date::day_of_week, FnInStruct)]
+ pub fn day_of_week(&self) -> ICU4XIsoWeekday {
+ self.0.date.day_of_week().into()
+ }
+
+ /// Returns the week number in this month, 1-indexed, based on what
+ /// is considered the first day of the week (often a locale preference).
+ ///
+ /// `first_weekday` can be obtained via `first_weekday()` on [`ICU4XWeekCalculator`]
+ #[diplomat::rust_link(icu::calendar::Date::week_of_month, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::calendar::week::WeekCalculator::week_of_month,
+ FnInStruct,
+ hidden
+ )]
+ pub fn week_of_month(&self, first_weekday: ICU4XIsoWeekday) -> u32 {
+ self.0.date.week_of_month(first_weekday.into()).0
+ }
+
+ /// Returns the week number in this year, using week data
+ #[diplomat::rust_link(icu::calendar::Date::week_of_year, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::calendar::week::WeekCalculator::week_of_year,
+ FnInStruct,
+ hidden
+ )]
+ #[cfg(feature = "icu_calendar")]
+ pub fn week_of_year(
+ &self,
+ calculator: &ICU4XWeekCalculator,
+ ) -> Result<crate::week::ffi::ICU4XWeekOf, ICU4XError> {
+ Ok(self.0.date.week_of_year(&calculator.0)?.into())
+ }
+
+ /// Returns 1-indexed number of the month of this date in its year
+ #[diplomat::rust_link(icu::calendar::Date::month, FnInStruct)]
+ pub fn month(&self) -> u32 {
+ self.0.date.month().ordinal
+ }
+
+ /// Returns the year number for this date
+ #[diplomat::rust_link(icu::calendar::Date::year, FnInStruct)]
+ pub fn year(&self) -> i32 {
+ self.0.date.year().number
+ }
+
+ /// Returns whether this date is in a leap year
+ #[diplomat::rust_link(icu::calendar::Date::is_in_leap_year, FnInStruct)]
+ pub fn is_in_leap_year(&self) -> bool {
+ self.0.date.is_in_leap_year()
+ }
+
+ /// Returns the number of months in the year represented by this date
+ #[diplomat::rust_link(icu::calendar::Date::months_in_year, FnInStruct)]
+ pub fn months_in_year(&self) -> u8 {
+ self.0.date.months_in_year()
+ }
+
+ /// Returns the number of days in the month represented by this date
+ #[diplomat::rust_link(icu::calendar::Date::days_in_month, FnInStruct)]
+ pub fn days_in_month(&self) -> u8 {
+ self.0.date.days_in_month()
+ }
+
+ /// Returns the number of days in the year represented by this date
+ #[diplomat::rust_link(icu::calendar::Date::days_in_year, FnInStruct)]
+ pub fn days_in_year(&self) -> u16 {
+ self.0.date.days_in_year()
+ }
+ }
+
+ #[diplomat::opaque]
+ /// An ICU4X DateTime object capable of containing a date and time for any calendar.
+ #[diplomat::rust_link(icu::calendar::DateTime, Struct)]
+ pub struct ICU4XDateTime(pub DateTime<Arc<AnyCalendar>>);
+
+ impl ICU4XDateTime {
+ /// Creates a new [`ICU4XDateTime`] representing the ISO date and time
+ /// given but in a given calendar
+ #[diplomat::rust_link(icu::DateTime::new_from_iso, FnInStruct)]
+ #[allow(clippy::too_many_arguments)]
+ pub fn create_from_iso_in_calendar(
+ year: i32,
+ month: u8,
+ day: u8,
+ hour: u8,
+ minute: u8,
+ second: u8,
+ nanosecond: u32,
+ calendar: &ICU4XCalendar,
+ ) -> Result<Box<ICU4XDateTime>, ICU4XError> {
+ let cal = calendar.0.clone();
+ let mut dt = DateTime::try_new_iso_datetime(year, month, day, hour, minute, second)?;
+ dt.time.nanosecond = nanosecond.try_into()?;
+ Ok(Box::new(ICU4XDateTime(dt.to_calendar(cal))))
+ }
+ /// Creates a new [`ICU4XDateTime`] from the given codes, which are interpreted in the given calendar system
+ #[diplomat::rust_link(icu::calendar::DateTime::try_new_from_codes, FnInStruct)]
+ #[allow(clippy::too_many_arguments)]
+ pub fn create_from_codes_in_calendar(
+ era_code: &str,
+ year: i32,
+ month_code: &str,
+ day: u8,
+ hour: u8,
+ minute: u8,
+ second: u8,
+ nanosecond: u32,
+ calendar: &ICU4XCalendar,
+ ) -> Result<Box<ICU4XDateTime>, ICU4XError> {
+ let era_code = era_code.as_bytes(); // #2520
+ let month_code = month_code.as_bytes(); // #2520
+ let era = TinyAsciiStr::from_bytes(era_code)?.into();
+ let month = TinyAsciiStr::from_bytes(month_code)?.into();
+ let cal = calendar.0.clone();
+ let hour = hour.try_into()?;
+ let minute = minute.try_into()?;
+ let second = second.try_into()?;
+ let nanosecond = nanosecond.try_into()?;
+ let time = Time {
+ hour,
+ minute,
+ second,
+ nanosecond,
+ };
+ Ok(Box::new(ICU4XDateTime(DateTime::try_new_from_codes(
+ era, year, month, day, time, cal,
+ )?)))
+ }
+ /// Creates a new [`ICU4XDateTime`] from an [`ICU4XDate`] and [`ICU4XTime`] object
+ #[diplomat::rust_link(icu::calendar::DateTime::new, FnInStruct)]
+ pub fn create_from_date_and_time(date: &ICU4XDate, time: &ICU4XTime) -> Box<ICU4XDateTime> {
+ let dt = DateTime::new(date.0.clone(), time.0);
+ Box::new(ICU4XDateTime(dt))
+ }
+
+ /// Gets a copy of the date contained in this object
+ #[diplomat::rust_link(icu::calendar::DateTime::date, StructField)]
+ pub fn date(&self) -> Box<ICU4XDate> {
+ Box::new(ICU4XDate(self.0.date.clone()))
+ }
+
+ /// Gets the time contained in this object
+ #[diplomat::rust_link(icu::calendar::DateTime::time, StructField)]
+ pub fn time(&self) -> Box<ICU4XTime> {
+ Box::new(ICU4XTime(self.0.time))
+ }
+
+ /// Converts this date to ISO
+ #[diplomat::rust_link(icu::calendar::DateTime::to_iso, FnInStruct)]
+ pub fn to_iso(&self) -> Box<ICU4XIsoDateTime> {
+ Box::new(ICU4XIsoDateTime(self.0.to_iso()))
+ }
+
+ /// Convert this datetime to one in a different calendar
+ #[diplomat::rust_link(icu::calendar::DateTime::to_calendar, FnInStruct)]
+ pub fn to_calendar(&self, calendar: &ICU4XCalendar) -> Box<ICU4XDateTime> {
+ Box::new(ICU4XDateTime(self.0.to_calendar(calendar.0.clone())))
+ }
+
+ /// Returns the hour in this time
+ #[diplomat::rust_link(icu::calendar::types::Time::hour, StructField)]
+ pub fn hour(&self) -> u8 {
+ self.0.time.hour.into()
+ }
+ /// Returns the minute in this time
+ #[diplomat::rust_link(icu::calendar::types::Time::minute, StructField)]
+ pub fn minute(&self) -> u8 {
+ self.0.time.minute.into()
+ }
+ /// Returns the second in this time
+ #[diplomat::rust_link(icu::calendar::types::Time::second, StructField)]
+ pub fn second(&self) -> u8 {
+ self.0.time.second.into()
+ }
+ /// Returns the nanosecond in this time
+ #[diplomat::rust_link(icu::calendar::types::Time::nanosecond, StructField)]
+ pub fn nanosecond(&self) -> u32 {
+ self.0.time.nanosecond.into()
+ }
+
+ /// Returns the 1-indexed day in the month for this date
+ #[diplomat::rust_link(icu::calendar::Date::day_of_month, FnInStruct)]
+ pub fn day_of_month(&self) -> u32 {
+ self.0.date.day_of_month().0
+ }
+
+ /// Returns the day in the week for this day
+ #[diplomat::rust_link(icu::calendar::Date::day_of_week, FnInStruct)]
+ pub fn day_of_week(&self) -> ICU4XIsoWeekday {
+ self.0.date.day_of_week().into()
+ }
+
+ /// Returns the week number in this month, 1-indexed, based on what
+ /// is considered the first day of the week (often a locale preference).
+ ///
+ /// `first_weekday` can be obtained via `first_weekday()` on [`ICU4XWeekCalculator`]
+ #[diplomat::rust_link(icu::calendar::Date::week_of_month, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::calendar::week::WeekCalculator::week_of_month,
+ FnInStruct,
+ hidden
+ )]
+ pub fn week_of_month(&self, first_weekday: ICU4XIsoWeekday) -> u32 {
+ self.0.date.week_of_month(first_weekday.into()).0
+ }
+
+ /// Returns the week number in this year, using week data
+ #[diplomat::rust_link(icu::calendar::Date::week_of_year, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::calendar::week::WeekCalculator::week_of_year,
+ FnInStruct,
+ hidden
+ )]
+ #[cfg(feature = "icu_calendar")]
+ pub fn week_of_year(
+ &self,
+ calculator: &ICU4XWeekCalculator,
+ ) -> Result<crate::week::ffi::ICU4XWeekOf, ICU4XError> {
+ Ok(self.0.date.week_of_year(&calculator.0)?.into())
+ }
+
+ /// Returns 1-indexed number of the month of this date in its year
+ ///
+ /// Note that for lunar calendars this may not lead to the same month
+ /// having the same ordinal month across years; use month_code if you care
+ /// about month identity.
+ #[diplomat::rust_link(icu::calendar::Date::month, FnInStruct)]
+ pub fn ordinal_month(&self) -> u32 {
+ self.0.date.month().ordinal
+ }
+
+ /// Returns the month code for this date. Typically something
+ /// like "M01", "M02", but can be more complicated for lunar calendars.
+ #[diplomat::rust_link(icu::calendar::Date::month, FnInStruct)]
+ pub fn month_code(
+ &self,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ let code = self.0.date.month().code;
+ write.write_str(&code.0)?;
+ Ok(())
+ }
+
+ /// Returns the year number in the current era for this date
+ #[diplomat::rust_link(icu::calendar::Date::year, FnInStruct)]
+ pub fn year_in_era(&self) -> i32 {
+ self.0.date.year().number
+ }
+
+ /// Returns the era for this date,
+ #[diplomat::rust_link(icu::calendar::Date::year, FnInStruct)]
+ pub fn era(
+ &self,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ let era = self.0.date.year().era;
+ write.write_str(&era.0)?;
+ Ok(())
+ }
+
+ /// Returns the number of months in the year represented by this date
+ #[diplomat::rust_link(icu::calendar::Date::months_in_year, FnInStruct)]
+ pub fn months_in_year(&self) -> u8 {
+ self.0.date.months_in_year()
+ }
+
+ /// Returns the number of days in the month represented by this date
+ #[diplomat::rust_link(icu::calendar::Date::days_in_month, FnInStruct)]
+ pub fn days_in_month(&self) -> u8 {
+ self.0.date.days_in_month()
+ }
+
+ /// Returns the number of days in the year represented by this date
+ #[diplomat::rust_link(icu::calendar::Date::days_in_year, FnInStruct)]
+ pub fn days_in_year(&self) -> u16 {
+ self.0.date.days_in_year()
+ }
+
+ /// Returns the [`ICU4XCalendar`] object backing this date
+ #[diplomat::rust_link(icu::calendar::Date::calendar, FnInStruct)]
+ #[diplomat::rust_link(icu::calendar::Date::calendar_wrapper, FnInStruct, hidden)]
+ pub fn calendar(&self) -> Box<ICU4XCalendar> {
+ Box::new(ICU4XCalendar(self.0.date.calendar_wrapper().clone()))
+ }
+ }
+}
diff --git a/intl/icu_capi/src/datetime_formatter.rs b/intl/icu_capi/src/datetime_formatter.rs
new file mode 100644
index 0000000000..c68b3381e9
--- /dev/null
+++ b/intl/icu_capi/src/datetime_formatter.rs
@@ -0,0 +1,358 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+ use icu_calendar::{Date, DateTime, Gregorian};
+ use icu_datetime::{
+ options::length, DateFormatter, DateTimeFormatter, TimeFormatter, TypedDateFormatter,
+ TypedDateTimeFormatter,
+ };
+
+ use crate::{
+ date::ffi::{ICU4XDate, ICU4XIsoDate},
+ datetime::ffi::ICU4XDateTime,
+ datetime::ffi::ICU4XIsoDateTime,
+ errors::ffi::ICU4XError,
+ locale::ffi::ICU4XLocale,
+ provider::ffi::ICU4XDataProvider,
+ time::ffi::ICU4XTime,
+ };
+ use writeable::Writeable;
+
+ #[diplomat::opaque]
+ /// An ICU4X TimeFormatter object capable of formatting an [`ICU4XTime`] type (and others) as a string
+ #[diplomat::rust_link(icu::datetime::TimeFormatter, Struct)]
+ pub struct ICU4XTimeFormatter(pub TimeFormatter);
+
+ #[diplomat::enum_convert(length::Time, needs_wildcard)]
+ #[diplomat::rust_link(icu::datetime::options::length::Time, Enum)]
+ pub enum ICU4XTimeLength {
+ Full,
+ Long,
+ Medium,
+ Short,
+ }
+
+ impl ICU4XTimeFormatter {
+ /// Creates a new [`ICU4XTimeFormatter`] from locale data.
+ #[diplomat::rust_link(icu::datetime::TimeFormatter::try_new_with_length, FnInStruct)]
+ pub fn create_with_length(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ length: ICU4XTimeLength,
+ ) -> Result<Box<ICU4XTimeFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+
+ Ok(Box::new(ICU4XTimeFormatter(call_constructor!(
+ TimeFormatter::try_new_with_length,
+ TimeFormatter::try_new_with_length_with_any_provider,
+ TimeFormatter::try_new_with_length_with_buffer_provider,
+ provider,
+ &locale,
+ length.into()
+ )?)))
+ }
+
+ /// Formats a [`ICU4XTime`] to a string.
+ #[diplomat::rust_link(icu::datetime::TimeFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(icu::datetime::TimeFormatter::format_to_string, FnInStruct, hidden)]
+ pub fn format_time(
+ &self,
+ value: &ICU4XTime,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ self.0.format(&value.0).write_to(write)?;
+ Ok(())
+ }
+
+ /// Formats a [`ICU4XDateTime`] to a string.
+ #[diplomat::rust_link(icu::datetime::TimeFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(icu::datetime::TimeFormatter::format_to_string, FnInStruct, hidden)]
+ pub fn format_datetime(
+ &self,
+ value: &ICU4XDateTime,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ self.0.format(&value.0).write_to(write)?;
+ Ok(())
+ }
+
+ /// Formats a [`ICU4XIsoDateTime`] to a string.
+ #[diplomat::rust_link(icu::datetime::TimeFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(icu::datetime::TimeFormatter::format_to_string, FnInStruct, hidden)]
+ pub fn format_iso_datetime(
+ &self,
+ value: &ICU4XIsoDateTime,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ self.0.format(&value.0).write_to(write)?;
+ Ok(())
+ }
+ }
+
+ #[diplomat::opaque]
+ /// An ICU4X TypedDateFormatter object capable of formatting a [`ICU4XIsoDateTime`] as a string,
+ /// using the Gregorian Calendar.
+ #[diplomat::rust_link(icu::datetime::TypedDateFormatter, Struct)]
+ pub struct ICU4XGregorianDateFormatter(pub TypedDateFormatter<Gregorian>);
+
+ #[diplomat::enum_convert(length::Date, needs_wildcard)]
+ #[diplomat::rust_link(icu::datetime::options::length::Date, Enum)]
+ pub enum ICU4XDateLength {
+ Full,
+ Long,
+ Medium,
+ Short,
+ }
+
+ impl ICU4XGregorianDateFormatter {
+ /// Creates a new [`ICU4XGregorianDateFormatter`] from locale data.
+ #[diplomat::rust_link(icu::datetime::TypedDateFormatter::try_new_with_length, FnInStruct)]
+ pub fn create_with_length(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ length: ICU4XDateLength,
+ ) -> Result<Box<ICU4XGregorianDateFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+
+ Ok(Box::new(ICU4XGregorianDateFormatter(call_constructor!(
+ TypedDateFormatter::try_new_with_length,
+ TypedDateFormatter::try_new_with_length_with_any_provider,
+ TypedDateFormatter::try_new_with_length_with_buffer_provider,
+ provider,
+ &locale,
+ length.into()
+ )?)))
+ }
+
+ /// Formats a [`ICU4XIsoDate`] to a string.
+ #[diplomat::rust_link(icu::datetime::TypedDateFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::datetime::TypedDateFormatter::format_to_string,
+ FnInStruct,
+ hidden
+ )]
+ pub fn format_iso_date(
+ &self,
+ value: &ICU4XIsoDate,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ let greg = Date::new_from_iso(value.0, Gregorian);
+ self.0.format(&greg).write_to(write)?;
+ Ok(())
+ }
+ /// Formats a [`ICU4XIsoDateTime`] to a string.
+ #[diplomat::rust_link(icu::datetime::TypedDateFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::datetime::TypedDateFormatter::format_to_string,
+ FnInStruct,
+ hidden
+ )]
+ pub fn format_iso_datetime(
+ &self,
+ value: &ICU4XIsoDateTime,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ let greg = DateTime::new_from_iso(value.0, Gregorian);
+ self.0.format(&greg).write_to(write)?;
+ Ok(())
+ }
+ }
+
+ #[diplomat::opaque]
+ /// An ICU4X TypedDateTimeFormatter object capable of formatting a [`ICU4XIsoDateTime`] as a string,
+ /// using the Gregorian Calendar.
+ #[diplomat::rust_link(icu::datetime::TypedDateTimeFormatter, Struct)]
+ pub struct ICU4XGregorianDateTimeFormatter(pub TypedDateTimeFormatter<Gregorian>);
+
+ impl ICU4XGregorianDateTimeFormatter {
+ /// Creates a new [`ICU4XGregorianDateFormatter`] from locale data.
+ #[diplomat::rust_link(icu::datetime::TypedDateTimeFormatter::try_new, FnInStruct)]
+ pub fn create_with_lengths(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ date_length: ICU4XDateLength,
+ time_length: ICU4XTimeLength,
+ ) -> Result<Box<ICU4XGregorianDateTimeFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+
+ let options = length::Bag::from_date_time_style(date_length.into(), time_length.into());
+
+ Ok(Box::new(ICU4XGregorianDateTimeFormatter(
+ call_constructor!(
+ TypedDateTimeFormatter::try_new,
+ TypedDateTimeFormatter::try_new_with_any_provider,
+ TypedDateTimeFormatter::try_new_with_buffer_provider,
+ provider,
+ &locale,
+ options.into()
+ )?,
+ )))
+ }
+
+ /// Formats a [`ICU4XIsoDateTime`] to a string.
+ #[diplomat::rust_link(icu::datetime::TypedDateTimeFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::datetime::TypedDateTimeFormatter::format_to_string,
+ FnInStruct,
+ hidden
+ )]
+ pub fn format_iso_datetime(
+ &self,
+ value: &ICU4XIsoDateTime,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ let greg = DateTime::new_from_iso(value.0, Gregorian);
+ self.0.format(&greg).write_to(write)?;
+ Ok(())
+ }
+ }
+
+ #[diplomat::opaque]
+ /// An ICU4X DateFormatter object capable of formatting a [`ICU4XDate`] as a string,
+ /// using some calendar specified at runtime in the locale.
+ #[diplomat::rust_link(icu::datetime::DateFormatter, Struct)]
+ pub struct ICU4XDateFormatter(pub DateFormatter);
+
+ impl ICU4XDateFormatter {
+ /// Creates a new [`ICU4XDateFormatter`] from locale data.
+ #[diplomat::rust_link(icu::datetime::DateFormatter::try_new_with_length, FnInStruct)]
+ pub fn create_with_length(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ date_length: ICU4XDateLength,
+ ) -> Result<Box<ICU4XDateFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+
+ Ok(Box::new(ICU4XDateFormatter(call_constructor!(
+ DateFormatter::try_new_with_length,
+ DateFormatter::try_new_with_length_with_any_provider,
+ DateFormatter::try_new_with_length_with_buffer_provider,
+ provider,
+ &locale,
+ date_length.into()
+ )?)))
+ }
+
+ /// Formats a [`ICU4XDate`] to a string.
+ #[diplomat::rust_link(icu::datetime::DateFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(icu::datetime::DateFormatter::format_to_string, FnInStruct, hidden)]
+ pub fn format_date(
+ &self,
+ value: &ICU4XDate,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ self.0.format(&value.0)?.write_to(write)?;
+ Ok(())
+ }
+
+ /// Formats a [`ICU4XIsoDate`] to a string.
+ ///
+ /// Will convert to this formatter's calendar first
+ #[diplomat::rust_link(icu::datetime::DateFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(icu::datetime::DateFormatter::format_to_string, FnInStruct, hidden)]
+ pub fn format_iso_date(
+ &self,
+ value: &ICU4XIsoDate,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ let any = value.0.to_any();
+ self.0.format(&any)?.write_to(write)?;
+ Ok(())
+ }
+
+ /// Formats a [`ICU4XDateTime`] to a string.
+ #[diplomat::rust_link(icu::datetime::DateFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(icu::datetime::DateFormatter::format_to_string, FnInStruct, hidden)]
+ pub fn format_datetime(
+ &self,
+ value: &ICU4XDateTime,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ self.0.format(&value.0)?.write_to(write)?;
+ Ok(())
+ }
+
+ /// Formats a [`ICU4XIsoDateTime`] to a string.
+ ///
+ /// Will convert to this formatter's calendar first
+ #[diplomat::rust_link(icu::datetime::DateFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(icu::datetime::DateFormatter::format_to_string, FnInStruct, hidden)]
+ pub fn format_iso_datetime(
+ &self,
+ value: &ICU4XIsoDateTime,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ let any = value.0.to_any();
+ self.0.format(&any)?.write_to(write)?;
+ Ok(())
+ }
+ }
+
+ #[diplomat::opaque]
+ /// An ICU4X DateFormatter object capable of formatting a [`ICU4XDateTime`] as a string,
+ /// using some calendar specified at runtime in the locale.
+ #[diplomat::rust_link(icu::datetime::DateTimeFormatter, Struct)]
+ pub struct ICU4XDateTimeFormatter(pub DateTimeFormatter);
+
+ impl ICU4XDateTimeFormatter {
+ /// Creates a new [`ICU4XDateTimeFormatter`] from locale data.
+ #[diplomat::rust_link(icu::datetime::DateTimeFormatter::try_new, FnInStruct)]
+ pub fn create_with_lengths(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ date_length: ICU4XDateLength,
+ time_length: ICU4XTimeLength,
+ ) -> Result<Box<ICU4XDateTimeFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+ let options = length::Bag::from_date_time_style(date_length.into(), time_length.into());
+
+ Ok(Box::new(ICU4XDateTimeFormatter(call_constructor!(
+ DateTimeFormatter::try_new,
+ DateTimeFormatter::try_new_with_any_provider,
+ DateTimeFormatter::try_new_with_buffer_provider,
+ provider,
+ &locale,
+ options.into()
+ )?)))
+ }
+
+ /// Formats a [`ICU4XDateTime`] to a string.
+ #[diplomat::rust_link(icu::datetime::DateTimeFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::datetime::DateTimeFormatter::format_to_string,
+ FnInStruct,
+ hidden
+ )]
+ pub fn format_datetime(
+ &self,
+ value: &ICU4XDateTime,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ self.0.format(&value.0)?.write_to(write)?;
+ Ok(())
+ }
+
+ /// Formats a [`ICU4XIsoDateTime`] to a string.
+ ///
+ /// Will convert to this formatter's calendar first
+ #[diplomat::rust_link(icu::datetime::DateTimeFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::datetime::DateTimeFormatter::format_to_string,
+ FnInStruct,
+ hidden
+ )]
+ pub fn format_iso_datetime(
+ &self,
+ value: &ICU4XIsoDateTime,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ let any = value.0.to_any();
+ self.0.format(&any)?.write_to(write)?;
+ Ok(())
+ }
+ }
+}
diff --git a/intl/icu_capi/src/decimal.rs b/intl/icu_capi/src/decimal.rs
new file mode 100644
index 0000000000..290f1c5a63
--- /dev/null
+++ b/intl/icu_capi/src/decimal.rs
@@ -0,0 +1,109 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+ use icu_decimal::{
+ options::{FixedDecimalFormatterOptions, GroupingStrategy},
+ provider::DecimalSymbolsV1Marker,
+ FixedDecimalFormatter,
+ };
+ use icu_provider_adapters::any_payload::AnyPayloadProvider;
+ use writeable::Writeable;
+
+ use crate::{
+ data_struct::ffi::ICU4XDataStruct, errors::ffi::ICU4XError,
+ fixed_decimal::ffi::ICU4XFixedDecimal, locale::ffi::ICU4XLocale,
+ provider::ffi::ICU4XDataProvider,
+ };
+
+ #[diplomat::opaque]
+ /// An ICU4X Fixed Decimal Format object, capable of formatting a [`ICU4XFixedDecimal`] as a string.
+ #[diplomat::rust_link(icu::decimal::FixedDecimalFormatter, Struct)]
+ pub struct ICU4XFixedDecimalFormatter(pub FixedDecimalFormatter);
+
+ #[diplomat::rust_link(icu::decimal::options::GroupingStrategy, Enum)]
+ pub enum ICU4XFixedDecimalGroupingStrategy {
+ Auto,
+ Never,
+ Always,
+ Min2,
+ }
+
+ impl ICU4XFixedDecimalFormatter {
+ /// Creates a new [`ICU4XFixedDecimalFormatter`] from locale data.
+ #[diplomat::rust_link(icu::decimal::FixedDecimalFormatter::try_new, FnInStruct)]
+ pub fn create_with_grouping_strategy(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ grouping_strategy: ICU4XFixedDecimalGroupingStrategy,
+ ) -> Result<Box<ICU4XFixedDecimalFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+
+ let grouping_strategy = match grouping_strategy {
+ ICU4XFixedDecimalGroupingStrategy::Auto => GroupingStrategy::Auto,
+ ICU4XFixedDecimalGroupingStrategy::Never => GroupingStrategy::Never,
+ ICU4XFixedDecimalGroupingStrategy::Always => GroupingStrategy::Always,
+ ICU4XFixedDecimalGroupingStrategy::Min2 => GroupingStrategy::Min2,
+ };
+ let mut options = FixedDecimalFormatterOptions::default();
+ options.grouping_strategy = grouping_strategy;
+ Ok(Box::new(ICU4XFixedDecimalFormatter(call_constructor!(
+ FixedDecimalFormatter::try_new,
+ FixedDecimalFormatter::try_new_with_any_provider,
+ FixedDecimalFormatter::try_new_with_buffer_provider,
+ provider,
+ &locale,
+ options,
+ )?)))
+ }
+
+ /// Creates a new [`ICU4XFixedDecimalFormatter`] from preconstructed locale data in the form of an [`ICU4XDataStruct`]
+ /// constructed from `ICU4XDataStruct::create_decimal_symbols()`.
+ ///
+ /// The contents of the data struct will be consumed: if you wish to use the struct again it will have to be reconstructed.
+ /// Passing a consumed struct to this method will return an error.
+ #[diplomat::attr(dart, disable)]
+ pub fn create_with_decimal_symbols_v1(
+ data_struct: &ICU4XDataStruct,
+ grouping_strategy: ICU4XFixedDecimalGroupingStrategy,
+ ) -> Result<Box<ICU4XFixedDecimalFormatter>, ICU4XError> {
+ let grouping_strategy = match grouping_strategy {
+ ICU4XFixedDecimalGroupingStrategy::Auto => GroupingStrategy::Auto,
+ ICU4XFixedDecimalGroupingStrategy::Never => GroupingStrategy::Never,
+ ICU4XFixedDecimalGroupingStrategy::Always => GroupingStrategy::Always,
+ ICU4XFixedDecimalGroupingStrategy::Min2 => GroupingStrategy::Min2,
+ };
+ let mut options = FixedDecimalFormatterOptions::default();
+ options.grouping_strategy = grouping_strategy;
+ Ok(Box::new(ICU4XFixedDecimalFormatter(
+ FixedDecimalFormatter::try_new_with_any_provider(
+ &AnyPayloadProvider::from_any_payload::<DecimalSymbolsV1Marker>(
+ // Note: This clone is free, since cloning AnyPayload is free.
+ data_struct.0.clone(),
+ ),
+ &Default::default(),
+ options,
+ )?,
+ )))
+ }
+
+ /// Formats a [`ICU4XFixedDecimal`] to a string.
+ #[diplomat::rust_link(icu::decimal::FixedDecimalFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::decimal::FixedDecimalFormatter::format_to_string,
+ FnInStruct,
+ hidden
+ )]
+ pub fn format(
+ &self,
+ value: &ICU4XFixedDecimal,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ self.0.format(&value.0).write_to(write)?;
+ Ok(())
+ }
+ }
+}
diff --git a/intl/icu_capi/src/displaynames.rs b/intl/icu_capi/src/displaynames.rs
new file mode 100644
index 0000000000..eec14ed839
--- /dev/null
+++ b/intl/icu_capi/src/displaynames.rs
@@ -0,0 +1,156 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::errors::ffi::ICU4XError;
+ use crate::locale::ffi::ICU4XLocale;
+ use crate::provider::ffi::ICU4XDataProvider;
+ use alloc::boxed::Box;
+ use diplomat_runtime::DiplomatWriteable;
+ #[allow(unused_imports)] // feature-specific
+ use icu_displaynames::{DisplayNamesOptions, Fallback, LanguageDisplay};
+ use icu_displaynames::{LocaleDisplayNamesFormatter, RegionDisplayNames};
+ use icu_locid::subtags::Region;
+ use writeable::Writeable;
+
+ // FFI version of `LocaleDisplayNamesFormatter`.
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::displaynames::LocaleDisplayNamesFormatter, Struct)]
+ pub struct ICU4XLocaleDisplayNamesFormatter(pub LocaleDisplayNamesFormatter);
+
+ // FFI version of `RegionDisplayNames`.
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::displaynames::RegionDisplayNames, Struct)]
+ pub struct ICU4XRegionDisplayNames(pub RegionDisplayNames);
+
+ // FFI version of `DisplayNamesOptions`.
+ #[diplomat::rust_link(icu::displaynames::options::DisplayNamesOptions, Struct)]
+ pub struct ICU4XDisplayNamesOptionsV1 {
+ /// The optional formatting style to use for display name.
+ pub style: ICU4XDisplayNamesStyle,
+ /// The fallback return when the system does not have the
+ /// requested display name, defaults to "code".
+ pub fallback: ICU4XDisplayNamesFallback,
+ /// The language display kind, defaults to "dialect".
+ pub language_display: ICU4XLanguageDisplay,
+ }
+
+ // FFI version of `Style` option for the display names.
+ #[diplomat::rust_link(icu::displaynames::options::Style, Enum)]
+ pub enum ICU4XDisplayNamesStyle {
+ Auto,
+ Narrow,
+ Short,
+ Long,
+ Menu,
+ }
+
+ // FFI version of `Fallback` option for the display names.
+ #[diplomat::rust_link(icu::displaynames::options::Fallback, Enum)]
+ #[diplomat::enum_convert(Fallback, needs_wildcard)]
+ pub enum ICU4XDisplayNamesFallback {
+ Code,
+ None,
+ }
+
+ // FFI version of `LanguageDisplay`.
+ #[diplomat::rust_link(icu::displaynames::options::LanguageDisplay, Enum)]
+ #[diplomat::enum_convert(LanguageDisplay, needs_wildcard)]
+ pub enum ICU4XLanguageDisplay {
+ Dialect,
+ Standard,
+ }
+
+ impl ICU4XLocaleDisplayNamesFormatter {
+ /// Creates a new `LocaleDisplayNamesFormatter` from locale data and an options bag.
+ #[diplomat::rust_link(icu::displaynames::LocaleDisplayNamesFormatter::try_new, FnInStruct)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ options: ICU4XDisplayNamesOptionsV1,
+ ) -> Result<Box<ICU4XLocaleDisplayNamesFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+ let options = DisplayNamesOptions::from(options);
+
+ Ok(Box::new(ICU4XLocaleDisplayNamesFormatter(
+ call_constructor!(
+ LocaleDisplayNamesFormatter::try_new,
+ LocaleDisplayNamesFormatter::try_new_with_any_provider,
+ LocaleDisplayNamesFormatter::try_new_with_buffer_provider,
+ provider,
+ &locale,
+ options,
+ )?,
+ )))
+ }
+
+ /// Returns the locale-specific display name of a locale.
+ #[diplomat::rust_link(icu::displaynames::LocaleDisplayNamesFormatter::of, FnInStruct)]
+ pub fn of(
+ &self,
+ locale: &ICU4XLocale,
+ write: &mut DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ self.0.of(&locale.0).write_to(write)?;
+ Ok(())
+ }
+ }
+
+ impl ICU4XRegionDisplayNames {
+ /// Creates a new `RegionDisplayNames` from locale data and an options bag.
+ #[diplomat::rust_link(icu::displaynames::RegionDisplayNames::try_new, FnInStruct)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ ) -> Result<Box<ICU4XRegionDisplayNames>, ICU4XError> {
+ let locale = locale.to_datalocale();
+ Ok(Box::new(ICU4XRegionDisplayNames(call_constructor!(
+ RegionDisplayNames::try_new,
+ RegionDisplayNames::try_new_with_any_provider,
+ RegionDisplayNames::try_new_with_buffer_provider,
+ provider,
+ &locale,
+ Default::default()
+ )?)))
+ }
+
+ /// Returns the locale specific display name of a region.
+ /// Note that the funtion returns an empty string in case the display name for a given
+ /// region code is not found.
+ #[diplomat::rust_link(icu::displaynames::RegionDisplayNames::of, FnInStruct)]
+ pub fn of(&self, region: &str, write: &mut DiplomatWriteable) -> Result<(), ICU4XError> {
+ self.0
+ .of(region.parse::<Region>()?)
+ .unwrap_or("")
+ .write_to(write)?;
+ Ok(())
+ }
+ }
+}
+
+#[allow(unused_imports)] // feature-specific
+use icu_displaynames::{DisplayNamesOptions, Fallback, LanguageDisplay, Style};
+
+impl From<ffi::ICU4XDisplayNamesStyle> for Option<Style> {
+ fn from(style: ffi::ICU4XDisplayNamesStyle) -> Option<Style> {
+ match style {
+ ffi::ICU4XDisplayNamesStyle::Auto => None,
+ ffi::ICU4XDisplayNamesStyle::Narrow => Some(Style::Narrow),
+ ffi::ICU4XDisplayNamesStyle::Short => Some(Style::Short),
+ ffi::ICU4XDisplayNamesStyle::Long => Some(Style::Long),
+ ffi::ICU4XDisplayNamesStyle::Menu => Some(Style::Menu),
+ }
+ }
+}
+
+impl From<ffi::ICU4XDisplayNamesOptionsV1> for DisplayNamesOptions {
+ fn from(other: ffi::ICU4XDisplayNamesOptionsV1) -> DisplayNamesOptions {
+ let mut options = DisplayNamesOptions::default();
+ options.style = other.style.into();
+ options.fallback = other.fallback.into();
+ options.language_display = other.language_display.into();
+ options
+ }
+}
diff --git a/intl/icu_capi/src/errors.rs b/intl/icu_capi/src/errors.rs
new file mode 100644
index 0000000000..bf17a650f3
--- /dev/null
+++ b/intl/icu_capi/src/errors.rs
@@ -0,0 +1,407 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+use self::ffi::ICU4XError;
+use core::fmt;
+#[cfg(feature = "icu_decimal")]
+use fixed_decimal::FixedDecimalError;
+#[cfg(any(
+ feature = "icu_datetime",
+ feature = "icu_timezone",
+ feature = "icu_calendar"
+))]
+use icu_calendar::CalendarError;
+#[cfg(feature = "icu_collator")]
+use icu_collator::CollatorError;
+#[cfg(feature = "icu_datetime")]
+use icu_datetime::DateTimeError;
+#[cfg(any(feature = "icu_decimal", feature = "icu_datetime"))]
+use icu_decimal::DecimalError;
+#[cfg(feature = "icu_list")]
+use icu_list::ListError;
+use icu_locid::ParserError;
+#[cfg(feature = "icu_locid_transform")]
+use icu_locid_transform::LocaleTransformError;
+#[cfg(feature = "icu_normalizer")]
+use icu_normalizer::NormalizerError;
+#[cfg(any(feature = "icu_plurals", feature = "icu_datetime"))]
+use icu_plurals::PluralsError;
+#[cfg(feature = "icu_properties")]
+use icu_properties::PropertiesError;
+use icu_provider::{DataError, DataErrorKind};
+#[cfg(feature = "icu_segmenter")]
+use icu_segmenter::SegmenterError;
+#[cfg(any(feature = "icu_timezone", feature = "icu_datetime"))]
+use icu_timezone::TimeZoneError;
+use tinystr::TinyStrError;
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+
+ #[derive(Debug, Copy, Clone, PartialEq, Eq)]
+ #[repr(C)]
+ /// A common enum for errors that ICU4X may return, organized by API
+ ///
+ /// The error names are stable and can be checked against as strings in the JS API
+ #[diplomat::rust_link(fixed_decimal::FixedDecimalError, Enum, compact)]
+ #[diplomat::rust_link(icu::calendar::CalendarError, Enum, compact)]
+ #[diplomat::rust_link(icu::collator::CollatorError, Enum, compact)]
+ #[diplomat::rust_link(icu::datetime::DateTimeError, Enum, compact)]
+ #[diplomat::rust_link(icu::decimal::DecimalError, Enum, compact)]
+ #[diplomat::rust_link(icu::list::ListError, Enum, compact)]
+ #[diplomat::rust_link(icu::locid::ParserError, Enum, compact)]
+ #[diplomat::rust_link(icu::locid_transform::LocaleTransformError, Enum, compact)]
+ #[diplomat::rust_link(icu::normalizer::NormalizerError, Enum, compact)]
+ #[diplomat::rust_link(icu::plurals::PluralsError, Enum, compact)]
+ #[diplomat::rust_link(icu::properties::PropertiesError, Enum, compact)]
+ #[diplomat::rust_link(icu::provider::DataError, Struct, compact)]
+ #[diplomat::rust_link(icu::provider::DataErrorKind, Enum, compact)]
+ #[diplomat::rust_link(icu::segmenter::SegmenterError, Enum, compact)]
+ #[diplomat::rust_link(icu::timezone::TimeZoneError, Enum, compact)]
+ pub enum ICU4XError {
+ // general errors
+ /// The error is not currently categorized as ICU4XError.
+ /// Please file a bug
+ UnknownError = 0x00,
+ /// An error arising from writing to a string
+ /// Typically found when not enough space is allocated
+ /// Most APIs that return a string may return this error
+ WriteableError = 0x01,
+ // Some input was out of bounds
+ OutOfBoundsError = 0x02,
+
+ // general data errors
+ // See DataError
+ DataMissingDataKeyError = 0x1_00,
+ DataMissingVariantError = 0x1_01,
+ DataMissingLocaleError = 0x1_02,
+ DataNeedsVariantError = 0x1_03,
+ DataNeedsLocaleError = 0x1_04,
+ DataExtraneousLocaleError = 0x1_05,
+ DataFilteredResourceError = 0x1_06,
+ DataMismatchedTypeError = 0x1_07,
+ DataMissingPayloadError = 0x1_08,
+ DataInvalidStateError = 0x1_09,
+ DataCustomError = 0x1_0A,
+ DataIoError = 0x1_0B,
+ DataUnavailableBufferFormatError = 0x1_0C,
+ DataMismatchedAnyBufferError = 0x1_0D,
+
+ // locale errors
+ /// The subtag being requested was not set
+ LocaleUndefinedSubtagError = 0x2_00,
+ /// The locale or subtag string failed to parse
+ LocaleParserLanguageError = 0x2_01,
+ LocaleParserSubtagError = 0x2_02,
+ LocaleParserExtensionError = 0x2_03,
+
+ // data struct errors
+ /// Attempted to construct an invalid data struct
+ DataStructValidityError = 0x3_00,
+
+ // property errors
+ PropertyUnknownScriptIdError = 0x4_00,
+ PropertyUnknownGeneralCategoryGroupError = 0x4_01,
+ PropertyUnexpectedPropertyNameError = 0x4_02,
+
+ // fixed_decimal errors
+ FixedDecimalLimitError = 0x5_00,
+ FixedDecimalSyntaxError = 0x5_01,
+
+ // plural errors
+ PluralsParserError = 0x6_00,
+
+ // datetime errors
+ CalendarParseError = 0x7_00,
+ CalendarOverflowError = 0x7_01,
+ CalendarUnderflowError = 0x7_02,
+ CalendarOutOfRangeError = 0x7_03,
+ CalendarUnknownEraError = 0x7_04,
+ CalendarUnknownMonthCodeError = 0x7_05,
+ CalendarMissingInputError = 0x7_06,
+ CalendarUnknownKindError = 0x7_07,
+ CalendarMissingError = 0x7_08,
+
+ // datetime format errors
+ DateTimePatternError = 0x8_00,
+ DateTimeMissingInputFieldError = 0x8_01,
+ DateTimeSkeletonError = 0x8_02,
+ DateTimeUnsupportedFieldError = 0x8_03,
+ DateTimeUnsupportedOptionsError = 0x8_04,
+ DateTimeMissingWeekdaySymbolError = 0x8_05,
+ DateTimeMissingMonthSymbolError = 0x8_06,
+ DateTimeFixedDecimalError = 0x8_07,
+ DateTimeMismatchedCalendarError = 0x8_08,
+
+ // tinystr errors
+ TinyStrTooLargeError = 0x9_00,
+ TinyStrContainsNullError = 0x9_01,
+ TinyStrNonAsciiError = 0x9_02,
+
+ // timezone errors
+ TimeZoneOffsetOutOfBoundsError = 0xA_00,
+ TimeZoneInvalidOffsetError = 0xA_01,
+ TimeZoneMissingInputError = 0xA_02,
+ TimeZoneInvalidIdError = 0xA_03,
+
+ // normalizer errors
+ NormalizerFutureExtensionError = 0xB_00,
+ NormalizerValidationError = 0xB_01,
+ }
+}
+
+impl ICU4XError {
+ #[cfg(feature = "logging")]
+ #[inline]
+ pub(crate) fn log_original<T: core::fmt::Display + ?Sized>(self, e: &T) -> Self {
+ use core::any;
+ log::warn!(
+ "Returning ICU4XError::{:?} based on original {}: {}",
+ self,
+ any::type_name::<T>(),
+ e
+ );
+ self
+ }
+
+ #[cfg(not(feature = "logging"))]
+ #[inline]
+ pub(crate) fn log_original<T: core::fmt::Display + ?Sized>(self, _e: &T) -> Self {
+ self
+ }
+}
+
+impl From<fmt::Error> for ICU4XError {
+ fn from(e: fmt::Error) -> Self {
+ ICU4XError::WriteableError.log_original(&e)
+ }
+}
+
+impl From<DataError> for ICU4XError {
+ fn from(e: DataError) -> Self {
+ match e.kind {
+ DataErrorKind::MissingDataKey => ICU4XError::DataMissingDataKeyError,
+ DataErrorKind::MissingLocale => ICU4XError::DataMissingLocaleError,
+ DataErrorKind::NeedsLocale => ICU4XError::DataNeedsLocaleError,
+ DataErrorKind::ExtraneousLocale => ICU4XError::DataExtraneousLocaleError,
+ DataErrorKind::FilteredResource => ICU4XError::DataFilteredResourceError,
+ DataErrorKind::MismatchedType(..) => ICU4XError::DataMismatchedTypeError,
+ DataErrorKind::MissingPayload => ICU4XError::DataMissingPayloadError,
+ DataErrorKind::InvalidState => ICU4XError::DataInvalidStateError,
+ DataErrorKind::Custom => ICU4XError::DataCustomError,
+ #[cfg(all(
+ feature = "provider_fs",
+ not(any(target_arch = "wasm32", target_os = "none"))
+ ))]
+ DataErrorKind::Io(..) => ICU4XError::DataIoError,
+ // datagen only
+ // DataErrorKind::MissingSourceData(..) => ..,
+ DataErrorKind::UnavailableBufferFormat(..) => {
+ ICU4XError::DataUnavailableBufferFormatError
+ }
+ _ => ICU4XError::UnknownError,
+ }
+ .log_original(&e)
+ }
+}
+
+#[cfg(feature = "icu_collator")]
+impl From<CollatorError> for ICU4XError {
+ fn from(e: CollatorError) -> Self {
+ match e {
+ CollatorError::NotFound => ICU4XError::DataMissingPayloadError,
+ CollatorError::MalformedData => ICU4XError::DataInvalidStateError,
+ CollatorError::Data(_) => ICU4XError::DataIoError,
+ _ => ICU4XError::DataIoError,
+ }
+ .log_original(&e)
+ }
+}
+
+#[cfg(feature = "icu_properties")]
+impl From<PropertiesError> for ICU4XError {
+ fn from(e: PropertiesError) -> Self {
+ match e {
+ PropertiesError::PropDataLoad(e) => e.into(),
+ PropertiesError::UnknownScriptId(..) => ICU4XError::PropertyUnknownScriptIdError,
+ PropertiesError::UnknownGeneralCategoryGroup(..) => {
+ ICU4XError::PropertyUnknownGeneralCategoryGroupError
+ }
+ PropertiesError::UnexpectedPropertyName => {
+ ICU4XError::PropertyUnexpectedPropertyNameError
+ }
+ _ => ICU4XError::UnknownError,
+ }
+ .log_original(&e)
+ }
+}
+
+#[cfg(any(
+ feature = "icu_datetime",
+ feature = "icu_timezone",
+ feature = "icu_calendar"
+))]
+impl From<CalendarError> for ICU4XError {
+ fn from(e: CalendarError) -> Self {
+ match e {
+ CalendarError::Parse => ICU4XError::CalendarParseError,
+ CalendarError::Overflow { field: _, max: _ } => ICU4XError::CalendarOverflowError,
+ CalendarError::Underflow { field: _, min: _ } => ICU4XError::CalendarUnderflowError,
+ CalendarError::OutOfRange => ICU4XError::CalendarOutOfRangeError,
+ CalendarError::UnknownEra(..) => ICU4XError::CalendarUnknownEraError,
+ CalendarError::UnknownMonthCode(..) => ICU4XError::CalendarUnknownMonthCodeError,
+ CalendarError::MissingInput(_) => ICU4XError::CalendarMissingInputError,
+ CalendarError::UnknownAnyCalendarKind(_) => ICU4XError::CalendarUnknownKindError,
+ CalendarError::MissingCalendar => ICU4XError::CalendarMissingError,
+ CalendarError::Data(e) => e.into(),
+ _ => ICU4XError::UnknownError,
+ }
+ .log_original(&e)
+ }
+}
+
+#[cfg(feature = "icu_datetime")]
+impl From<DateTimeError> for ICU4XError {
+ fn from(e: DateTimeError) -> Self {
+ match e {
+ DateTimeError::Pattern(_) => ICU4XError::DateTimePatternError,
+ DateTimeError::Format(err) => err.into(),
+ DateTimeError::Data(err) => err.into(),
+ DateTimeError::MissingInputField(_) => ICU4XError::DateTimeMissingInputFieldError,
+ // TODO(#1324): Add back skeleton errors
+ // DateTimeFormatterError::Skeleton(_) => ICU4XError::DateTimeFormatSkeletonError,
+ DateTimeError::UnsupportedField(_) => ICU4XError::DateTimeUnsupportedFieldError,
+ DateTimeError::UnsupportedOptions => ICU4XError::DateTimeUnsupportedOptionsError,
+ DateTimeError::PluralRules(err) => err.into(),
+ DateTimeError::DateTimeInput(err) => err.into(),
+ DateTimeError::MissingWeekdaySymbol(_) => ICU4XError::DateTimeMissingWeekdaySymbolError,
+ DateTimeError::MissingMonthSymbol(_) => ICU4XError::DateTimeMissingMonthSymbolError,
+ DateTimeError::FixedDecimal => ICU4XError::DateTimeFixedDecimalError,
+ DateTimeError::FixedDecimalFormatter(err) => err.into(),
+ DateTimeError::MismatchedAnyCalendar(_, _) => {
+ ICU4XError::DateTimeMismatchedCalendarError
+ }
+ _ => ICU4XError::UnknownError,
+ }
+ .log_original(&e)
+ }
+}
+
+#[cfg(feature = "icu_decimal")]
+impl From<FixedDecimalError> for ICU4XError {
+ fn from(e: FixedDecimalError) -> Self {
+ match e {
+ FixedDecimalError::Limit => ICU4XError::FixedDecimalLimitError,
+ FixedDecimalError::Syntax => ICU4XError::FixedDecimalSyntaxError,
+ _ => ICU4XError::UnknownError,
+ }
+ .log_original(&e)
+ }
+}
+
+#[cfg(any(feature = "icu_plurals", feature = "icu_datetime"))]
+impl From<PluralsError> for ICU4XError {
+ fn from(e: PluralsError) -> Self {
+ match e {
+ PluralsError::Data(e) => e.into(),
+ _ => ICU4XError::UnknownError,
+ }
+ .log_original(&e)
+ }
+}
+
+#[cfg(any(feature = "icu_decimal", feature = "icu_datetime"))]
+impl From<DecimalError> for ICU4XError {
+ fn from(e: DecimalError) -> Self {
+ match e {
+ DecimalError::Data(e) => e.into(),
+ _ => ICU4XError::UnknownError,
+ }
+ .log_original(&e)
+ }
+}
+
+#[cfg(feature = "icu_locid_transform")]
+impl From<LocaleTransformError> for ICU4XError {
+ fn from(e: LocaleTransformError) -> Self {
+ match e {
+ LocaleTransformError::Data(e) => e.into(),
+ _ => ICU4XError::UnknownError,
+ }
+ .log_original(&e)
+ }
+}
+
+#[cfg(feature = "icu_segmenter")]
+impl From<SegmenterError> for ICU4XError {
+ fn from(e: SegmenterError) -> Self {
+ match e {
+ SegmenterError::Data(e) => e.into(),
+ _ => ICU4XError::UnknownError,
+ }
+ .log_original(&e)
+ }
+}
+
+#[cfg(feature = "icu_list")]
+impl From<ListError> for ICU4XError {
+ fn from(e: ListError) -> Self {
+ match e {
+ ListError::Data(e) => e.into(),
+ _ => ICU4XError::UnknownError,
+ }
+ .log_original(&e)
+ }
+}
+
+impl From<ParserError> for ICU4XError {
+ fn from(e: ParserError) -> Self {
+ match e {
+ ParserError::InvalidLanguage => ICU4XError::LocaleParserLanguageError,
+ ParserError::InvalidSubtag => ICU4XError::LocaleParserSubtagError,
+ ParserError::InvalidExtension => ICU4XError::LocaleParserExtensionError,
+ _ => ICU4XError::UnknownError,
+ }
+ .log_original(&e)
+ }
+}
+
+impl From<TinyStrError> for ICU4XError {
+ fn from(e: TinyStrError) -> Self {
+ match e {
+ TinyStrError::TooLarge { .. } => ICU4XError::TinyStrTooLargeError,
+ TinyStrError::ContainsNull => ICU4XError::TinyStrContainsNullError,
+ TinyStrError::NonAscii => ICU4XError::TinyStrNonAsciiError,
+ _ => ICU4XError::UnknownError,
+ }
+ .log_original(&e)
+ }
+}
+
+#[cfg(any(feature = "icu_timezone", feature = "icu_datetime"))]
+impl From<TimeZoneError> for ICU4XError {
+ fn from(e: TimeZoneError) -> Self {
+ match e {
+ TimeZoneError::OffsetOutOfBounds => ICU4XError::TimeZoneOffsetOutOfBoundsError,
+ TimeZoneError::InvalidOffset => ICU4XError::TimeZoneInvalidOffsetError,
+ TimeZoneError::Data(err) => err.into(),
+ _ => ICU4XError::UnknownError,
+ }
+ .log_original(&e)
+ }
+}
+
+#[cfg(feature = "icu_normalizer")]
+impl From<NormalizerError> for ICU4XError {
+ fn from(e: NormalizerError) -> Self {
+ match e {
+ NormalizerError::FutureExtension => ICU4XError::NormalizerFutureExtensionError,
+ NormalizerError::ValidationError => ICU4XError::NormalizerValidationError,
+ NormalizerError::Data(err) => err.into(),
+ _ => ICU4XError::UnknownError,
+ }
+ .log_original(&e)
+ }
+}
diff --git a/intl/icu_capi/src/fallbacker.rs b/intl/icu_capi/src/fallbacker.rs
new file mode 100644
index 0000000000..b3f21b7530
--- /dev/null
+++ b/intl/icu_capi/src/fallbacker.rs
@@ -0,0 +1,195 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+ use icu_locid_transform::fallback::LocaleFallbackConfig;
+ use icu_locid_transform::fallback::LocaleFallbackIterator;
+ use icu_locid_transform::fallback::LocaleFallbackPriority;
+ use icu_locid_transform::fallback::LocaleFallbackerWithConfig;
+ use icu_locid_transform::LocaleFallbacker;
+
+ use crate::{
+ errors::ffi::ICU4XError, locale::ffi::ICU4XLocale, provider::ffi::ICU4XDataProvider,
+ };
+
+ /// An object that runs the ICU4X locale fallback algorithm.
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::locid_transform::fallback::LocaleFallbacker, Struct)]
+ #[diplomat::rust_link(
+ icu::locid_transform::fallback::LocaleFallbackerBorrowed,
+ Struct,
+ hidden
+ )]
+ pub struct ICU4XLocaleFallbacker(pub LocaleFallbacker);
+
+ /// Priority mode for the ICU4X fallback algorithm.
+ #[diplomat::enum_convert(LocaleFallbackPriority, needs_wildcard)]
+ #[diplomat::rust_link(icu::locid_transform::fallback::LocaleFallbackPriority, Enum)]
+ #[diplomat::rust_link(
+ icu::locid_transform::fallback::LocaleFallbackPriority::const_default,
+ FnInEnum,
+ hidden
+ )]
+ pub enum ICU4XLocaleFallbackPriority {
+ Language = 0,
+ Region = 1,
+ Collation = 2,
+ }
+
+ /// What additional data is required to load when performing fallback.
+ #[diplomat::rust_link(icu::locid_transform::fallback::LocaleFallbackSupplement, Enum)]
+ #[diplomat::rust_link(
+ icu::locid_transform::fallback::LocaleFallbackSupplement::const_default,
+ FnInEnum,
+ hidden
+ )]
+ pub enum ICU4XLocaleFallbackSupplement {
+ None = 0,
+ Collation = 1,
+ }
+
+ /// Collection of configurations for the ICU4X fallback algorithm.
+ #[diplomat::rust_link(icu::locid_transform::fallback::LocaleFallbackConfig, Struct)]
+ #[diplomat::rust_link(
+ icu::locid_transform::fallback::LocaleFallbackConfig::const_default,
+ FnInStruct,
+ hidden
+ )]
+ pub struct ICU4XLocaleFallbackConfig<'a> {
+ /// Choice of priority mode.
+ pub priority: ICU4XLocaleFallbackPriority,
+ /// An empty string is considered `None`.
+ pub extension_key: &'a str,
+ /// Fallback supplement data key to customize fallback rules.
+ pub fallback_supplement: ICU4XLocaleFallbackSupplement,
+ }
+
+ /// An object that runs the ICU4X locale fallback algorithm with specific configurations.
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::locid_transform::fallback::LocaleFallbacker, Struct)]
+ #[diplomat::rust_link(icu::locid_transform::fallback::LocaleFallbackerWithConfig, Struct)]
+ pub struct ICU4XLocaleFallbackerWithConfig<'a>(pub LocaleFallbackerWithConfig<'a>);
+
+ /// An iterator over the locale under fallback.
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::locid_transform::fallback::LocaleFallbackIterator, Struct)]
+ pub struct ICU4XLocaleFallbackIterator<'a>(pub LocaleFallbackIterator<'a, 'a>);
+
+ impl ICU4XLocaleFallbacker {
+ /// Creates a new `ICU4XLocaleFallbacker` from a data provider.
+ #[diplomat::rust_link(icu::locid_transform::fallback::LocaleFallbacker::new, FnInStruct)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XLocaleFallbacker>, ICU4XError> {
+ Ok(Box::new(ICU4XLocaleFallbacker(call_constructor!(
+ LocaleFallbacker::new [r => Ok(r.static_to_owned())],
+ LocaleFallbacker::try_new_with_any_provider,
+ LocaleFallbacker::try_new_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Creates a new `ICU4XLocaleFallbacker` without data for limited functionality.
+ #[diplomat::rust_link(
+ icu::locid_transform::fallback::LocaleFallbacker::new_without_data,
+ FnInStruct
+ )]
+ pub fn create_without_data() -> Box<ICU4XLocaleFallbacker> {
+ Box::new(ICU4XLocaleFallbacker(LocaleFallbacker::new_without_data()))
+ }
+
+ /// Associates this `ICU4XLocaleFallbacker` with configuration options.
+ #[diplomat::rust_link(
+ icu::locid_transform::fallback::LocaleFallbacker::for_config,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::locid_transform::fallback::LocaleFallbackerBorrowed::for_config,
+ FnInStruct,
+ hidden
+ )]
+ pub fn for_config<'a, 'temp>(
+ &'a self,
+ config: ICU4XLocaleFallbackConfig<'temp>,
+ ) -> Result<Box<ICU4XLocaleFallbackerWithConfig<'a>>, ICU4XError> {
+ Ok(Box::new(ICU4XLocaleFallbackerWithConfig(
+ self.0.for_config(LocaleFallbackConfig::try_from(config)?),
+ )))
+ }
+ }
+
+ impl<'a> ICU4XLocaleFallbackerWithConfig<'a> {
+ /// Creates an iterator from a locale with each step of fallback.
+ #[diplomat::rust_link(
+ icu::locid_transform::fallback::LocaleFallbacker::fallback_for,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::locid_transform::fallback::LocaleFallbackerBorrowed::fallback_for,
+ FnInStruct,
+ hidden
+ )]
+ #[diplomat::rust_link(
+ icu::locid_transform::fallback::LocaleFallbackerWithConfig::fallback_for,
+ FnInStruct,
+ hidden
+ )]
+ pub fn fallback_for_locale<'b: 'a, 'temp>(
+ &'b self,
+ locale: &'temp ICU4XLocale,
+ ) -> Box<ICU4XLocaleFallbackIterator<'a>> {
+ Box::new(ICU4XLocaleFallbackIterator(
+ self.0.fallback_for((&locale.0).into()),
+ ))
+ }
+ }
+
+ impl<'a> ICU4XLocaleFallbackIterator<'a> {
+ /// Gets a snapshot of the current state of the locale.
+ #[diplomat::rust_link(
+ icu::locid_transform::fallback::LocaleFallbackIterator::get,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::locid_transform::fallback::LocaleFallbackIterator::take,
+ FnInStruct,
+ hidden
+ )]
+ pub fn get(&self) -> Box<ICU4XLocale> {
+ Box::new(ICU4XLocale(self.0.get().clone().into_locale()))
+ }
+
+ /// Performs one step of the fallback algorithm, mutating the locale.
+ #[diplomat::rust_link(
+ icu::locid_transform::fallback::LocaleFallbackIterator::step,
+ FnInStruct
+ )]
+ pub fn step(&mut self) {
+ self.0.step();
+ }
+ }
+}
+
+impl TryFrom<ffi::ICU4XLocaleFallbackConfig<'_>>
+ for icu_locid_transform::fallback::LocaleFallbackConfig
+{
+ type Error = crate::errors::ffi::ICU4XError;
+ fn try_from(other: ffi::ICU4XLocaleFallbackConfig) -> Result<Self, Self::Error> {
+ let mut result = Self::default();
+ result.priority = other.priority.into();
+ result.extension_key = match other.extension_key {
+ "" => None,
+ s => Some(s.parse()?),
+ };
+ result.fallback_supplement = match other.fallback_supplement {
+ ffi::ICU4XLocaleFallbackSupplement::None => None,
+ ffi::ICU4XLocaleFallbackSupplement::Collation => {
+ Some(icu_locid_transform::fallback::LocaleFallbackSupplement::Collation)
+ }
+ };
+ Ok(result)
+ }
+}
diff --git a/intl/icu_capi/src/fixed_decimal.rs b/intl/icu_capi/src/fixed_decimal.rs
new file mode 100644
index 0000000000..6439698323
--- /dev/null
+++ b/intl/icu_capi/src/fixed_decimal.rs
@@ -0,0 +1,341 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+use fixed_decimal::Sign;
+use fixed_decimal::SignDisplay;
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+ use fixed_decimal::{DoublePrecision, FixedDecimal};
+ use writeable::Writeable;
+
+ use crate::errors::ffi::ICU4XError;
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal, Struct)]
+ pub struct ICU4XFixedDecimal(pub FixedDecimal);
+
+ /// The sign of a FixedDecimal, as shown in formatting.
+ #[diplomat::rust_link(fixed_decimal::Sign, Enum)]
+ pub enum ICU4XFixedDecimalSign {
+ /// No sign (implicitly positive, e.g., 1729).
+ None,
+ /// A negative sign, e.g., -1729.
+ Negative,
+ /// An explicit positive sign, e.g., +1729.
+ Positive,
+ }
+
+ /// ECMA-402 compatible sign display preference.
+ #[diplomat::rust_link(fixed_decimal::SignDisplay, Enum)]
+ pub enum ICU4XFixedDecimalSignDisplay {
+ Auto,
+ Never,
+ Always,
+ ExceptZero,
+ Negative,
+ }
+
+ /// Increment used in a rounding operation.
+ #[diplomat::rust_link(fixed_decimal::RoundingIncrement, Enum)]
+ pub enum ICU4XRoundingIncrement {
+ MultiplesOf1,
+ MultiplesOf2,
+ MultiplesOf5,
+ MultiplesOf25,
+ }
+
+ impl ICU4XFixedDecimal {
+ /// Construct an [`ICU4XFixedDecimal`] from an integer.
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal, Struct)]
+ #[diplomat::attr(dart, disable)]
+ pub fn create_from_i32(v: i32) -> Box<ICU4XFixedDecimal> {
+ Box::new(ICU4XFixedDecimal(FixedDecimal::from(v)))
+ }
+
+ /// Construct an [`ICU4XFixedDecimal`] from an integer.
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal, Struct)]
+ #[diplomat::attr(dart, disable)]
+ pub fn create_from_u32(v: u32) -> Box<ICU4XFixedDecimal> {
+ Box::new(ICU4XFixedDecimal(FixedDecimal::from(v)))
+ }
+
+ /// Construct an [`ICU4XFixedDecimal`] from an integer.
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal, Struct)]
+ #[diplomat::attr(dart, rename = "create_from_int")]
+ pub fn create_from_i64(v: i64) -> Box<ICU4XFixedDecimal> {
+ Box::new(ICU4XFixedDecimal(FixedDecimal::from(v)))
+ }
+
+ /// Construct an [`ICU4XFixedDecimal`] from an integer.
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal, Struct)]
+ #[diplomat::attr(dart, disable)]
+ pub fn create_from_u64(v: u64) -> Box<ICU4XFixedDecimal> {
+ Box::new(ICU4XFixedDecimal(FixedDecimal::from(v)))
+ }
+
+ /// Construct an [`ICU4XFixedDecimal`] from an integer-valued float
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::try_from_f64, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FloatPrecision, Enum)]
+ #[diplomat::rust_link(fixed_decimal::DoublePrecision, Enum, hidden)]
+ #[diplomat::attr(dart, disable)]
+ #[diplomat::attr(dart, rename = "create_from_double_with_integer_precision")]
+ pub fn create_from_f64_with_integer_precision(
+ f: f64,
+ ) -> Result<Box<ICU4XFixedDecimal>, ICU4XError> {
+ let precision = DoublePrecision::Integer;
+ Ok(Box::new(ICU4XFixedDecimal(FixedDecimal::try_from_f64(
+ f, precision,
+ )?)))
+ }
+
+ /// Construct an [`ICU4XFixedDecimal`] from an float, with a given power of 10 for the lower magnitude
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::try_from_f64, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FloatPrecision, Enum)]
+ #[diplomat::rust_link(fixed_decimal::DoublePrecision, Enum, hidden)]
+ #[diplomat::attr(dart, rename = "create_from_double_with_lower_magnitude")]
+ pub fn create_from_f64_with_lower_magnitude(
+ f: f64,
+ magnitude: i16,
+ ) -> Result<Box<ICU4XFixedDecimal>, ICU4XError> {
+ let precision = DoublePrecision::Magnitude(magnitude);
+ Ok(Box::new(ICU4XFixedDecimal(FixedDecimal::try_from_f64(
+ f, precision,
+ )?)))
+ }
+
+ /// Construct an [`ICU4XFixedDecimal`] from an float, for a given number of significant digits
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::try_from_f64, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FloatPrecision, Enum)]
+ #[diplomat::rust_link(fixed_decimal::DoublePrecision, Enum, hidden)]
+ #[diplomat::attr(dart, rename = "create_from_double_with_significant_digits")]
+ pub fn create_from_f64_with_significant_digits(
+ f: f64,
+ digits: u8,
+ ) -> Result<Box<ICU4XFixedDecimal>, ICU4XError> {
+ let precision = DoublePrecision::SignificantDigits(digits);
+ Ok(Box::new(ICU4XFixedDecimal(FixedDecimal::try_from_f64(
+ f, precision,
+ )?)))
+ }
+
+ /// Construct an [`ICU4XFixedDecimal`] from an float, with enough digits to recover
+ /// the original floating point in IEEE 754 without needing trailing zeros
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::try_from_f64, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FloatPrecision, Enum)]
+ #[diplomat::rust_link(fixed_decimal::DoublePrecision, Enum, hidden)]
+ #[diplomat::attr(dart, rename = "create_from_double_with_double_precision")]
+ pub fn create_from_f64_with_floating_precision(
+ f: f64,
+ ) -> Result<Box<ICU4XFixedDecimal>, ICU4XError> {
+ let precision = DoublePrecision::Floating;
+ Ok(Box::new(ICU4XFixedDecimal(FixedDecimal::try_from_f64(
+ f, precision,
+ )?)))
+ }
+
+ /// Construct an [`ICU4XFixedDecimal`] from a string.
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::from_str, FnInStruct)]
+ pub fn create_from_string(v: &str) -> Result<Box<ICU4XFixedDecimal>, ICU4XError> {
+ let v = v.as_bytes(); // #2520
+ Ok(Box::new(ICU4XFixedDecimal(FixedDecimal::try_from(v)?)))
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::digit_at, FnInStruct)]
+ pub fn digit_at(&self, magnitude: i16) -> u8 {
+ self.0.digit_at(magnitude)
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::magnitude_range, FnInStruct)]
+ pub fn magnitude_start(&self) -> i16 {
+ *self.0.magnitude_range().start()
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::magnitude_range, FnInStruct)]
+ pub fn magnitude_end(&self) -> i16 {
+ *self.0.magnitude_range().end()
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::nonzero_magnitude_start, FnInStruct)]
+ pub fn nonzero_magnitude_start(&self) -> i16 {
+ self.0.nonzero_magnitude_start()
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::nonzero_magnitude_end, FnInStruct)]
+ pub fn nonzero_magnitude_end(&self) -> i16 {
+ self.0.nonzero_magnitude_end()
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::is_zero, FnInStruct)]
+ pub fn is_zero(&self) -> bool {
+ self.0.is_zero()
+ }
+
+ /// Multiply the [`ICU4XFixedDecimal`] by a given power of ten.
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::multiply_pow10, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::multiplied_pow10, FnInStruct, hidden)]
+ pub fn multiply_pow10(&mut self, power: i16) {
+ self.0.multiply_pow10(power)
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::sign, FnInStruct)]
+ pub fn sign(&self) -> ICU4XFixedDecimalSign {
+ self.0.sign().into()
+ }
+
+ /// Set the sign of the [`ICU4XFixedDecimal`].
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::set_sign, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::with_sign, FnInStruct, hidden)]
+ pub fn set_sign(&mut self, sign: ICU4XFixedDecimalSign) {
+ self.0.set_sign(sign.into())
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::apply_sign_display, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::with_sign_display, FnInStruct, hidden)]
+ pub fn apply_sign_display(&mut self, sign_display: ICU4XFixedDecimalSignDisplay) {
+ self.0.apply_sign_display(sign_display.into())
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::trim_start, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::trimmed_start, FnInStruct, hidden)]
+ pub fn trim_start(&mut self) {
+ self.0.trim_start()
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::trim_end, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::trimmed_end, FnInStruct, hidden)]
+ pub fn trim_end(&mut self) {
+ self.0.trim_end()
+ }
+
+ /// Zero-pad the [`ICU4XFixedDecimal`] on the left to a particular position
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::pad_start, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::padded_start, FnInStruct, hidden)]
+ pub fn pad_start(&mut self, position: i16) {
+ self.0.pad_start(position)
+ }
+
+ /// Zero-pad the [`ICU4XFixedDecimal`] on the right to a particular position
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::pad_end, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::padded_end, FnInStruct, hidden)]
+ pub fn pad_end(&mut self, position: i16) {
+ self.0.pad_end(position)
+ }
+
+ /// Truncate the [`ICU4XFixedDecimal`] on the left to a particular position, deleting digits if necessary. This is useful for, e.g. abbreviating years
+ /// ("2022" -> "22")
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::set_max_position, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::with_max_position, FnInStruct, hidden)]
+ pub fn set_max_position(&mut self, position: i16) {
+ self.0.set_max_position(position)
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::trunc, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::trunced, FnInStruct, hidden)]
+ pub fn trunc(&mut self, position: i16) {
+ self.0.trunc(position)
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::half_trunc, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::half_trunced, FnInStruct, hidden)]
+ pub fn half_trunc(&mut self, position: i16) {
+ self.0.half_trunc(position)
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::expand, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::expanded, FnInStruct, hidden)]
+ pub fn expand(&mut self, position: i16) {
+ self.0.expand(position)
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::half_expand, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::half_expanded, FnInStruct, hidden)]
+ pub fn half_expand(&mut self, position: i16) {
+ self.0.half_expand(position)
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::ceil, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::ceiled, FnInStruct, hidden)]
+ pub fn ceil(&mut self, position: i16) {
+ self.0.ceil(position)
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::half_ceil, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::half_ceiled, FnInStruct, hidden)]
+ pub fn half_ceil(&mut self, position: i16) {
+ self.0.half_ceil(position)
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::floor, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::floored, FnInStruct, hidden)]
+ pub fn floor(&mut self, position: i16) {
+ self.0.floor(position)
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::half_floor, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::half_floored, FnInStruct, hidden)]
+ pub fn half_floor(&mut self, position: i16) {
+ self.0.half_floor(position)
+ }
+
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::half_even, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::half_evened, FnInStruct, hidden)]
+ pub fn half_even(&mut self, position: i16) {
+ self.0.half_even(position)
+ }
+
+ /// Concatenates `other` to the end of `self`.
+ ///
+ /// If successful, `other` will be set to 0 and a successful status is returned.
+ ///
+ /// If not successful, `other` will be unchanged and an error is returned.
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::concatenate_end, FnInStruct)]
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::concatenated_end, FnInStruct, hidden)]
+ pub fn concatenate_end(&mut self, other: &mut ICU4XFixedDecimal) -> Result<(), ()> {
+ let x = core::mem::take(&mut other.0);
+ self.0.concatenate_end(x).map_err(|y| {
+ other.0 = y;
+ })
+ }
+
+ /// Format the [`ICU4XFixedDecimal`] as a string.
+ #[diplomat::rust_link(fixed_decimal::FixedDecimal::write_to, FnInStruct)]
+ pub fn to_string(&self, to: &mut diplomat_runtime::DiplomatWriteable) {
+ let _ = self.0.write_to(to);
+ }
+ }
+}
+
+impl From<ffi::ICU4XFixedDecimalSign> for Sign {
+ fn from(other: ffi::ICU4XFixedDecimalSign) -> Self {
+ match other {
+ ffi::ICU4XFixedDecimalSign::None => Self::None,
+ ffi::ICU4XFixedDecimalSign::Negative => Self::Negative,
+ ffi::ICU4XFixedDecimalSign::Positive => Self::Positive,
+ }
+ }
+}
+
+impl From<Sign> for ffi::ICU4XFixedDecimalSign {
+ fn from(other: Sign) -> Self {
+ match other {
+ Sign::None => Self::None,
+ Sign::Negative => Self::Negative,
+ Sign::Positive => Self::Positive,
+ }
+ }
+}
+
+impl From<ffi::ICU4XFixedDecimalSignDisplay> for SignDisplay {
+ fn from(other: ffi::ICU4XFixedDecimalSignDisplay) -> Self {
+ match other {
+ ffi::ICU4XFixedDecimalSignDisplay::Auto => Self::Auto,
+ ffi::ICU4XFixedDecimalSignDisplay::Never => Self::Never,
+ ffi::ICU4XFixedDecimalSignDisplay::Always => Self::Always,
+ ffi::ICU4XFixedDecimalSignDisplay::ExceptZero => Self::ExceptZero,
+ ffi::ICU4XFixedDecimalSignDisplay::Negative => Self::Negative,
+ }
+ }
+}
diff --git a/intl/icu_capi/src/iana_bcp47_mapper.rs b/intl/icu_capi/src/iana_bcp47_mapper.rs
new file mode 100644
index 0000000000..c77730410d
--- /dev/null
+++ b/intl/icu_capi/src/iana_bcp47_mapper.rs
@@ -0,0 +1,82 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::errors::ffi::ICU4XError;
+ use crate::provider::ffi::ICU4XDataProvider;
+ use alloc::boxed::Box;
+ use icu_timezone::IanaBcp47RoundTripMapper;
+ use icu_timezone::IanaToBcp47Mapper;
+ use icu_timezone::TimeZoneBcp47Id;
+
+ /// An object capable of mapping from an IANA time zone ID to a BCP-47 ID.
+ ///
+ /// This can be used via `try_set_iana_time_zone_id()` on [`ICU4XCustomTimeZone`].
+ ///
+ /// [`ICU4XCustomTimeZone`]: crate::timezone::ffi::ICU4XCustomTimeZone
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::timezone::IanaToBcp47Mapper, Struct)]
+ #[diplomat::rust_link(icu::timezone::IanaToBcp47Mapper::as_borrowed, FnInStruct, hidden)]
+ pub struct ICU4XIanaToBcp47Mapper(pub IanaToBcp47Mapper);
+
+ impl ICU4XIanaToBcp47Mapper {
+ #[diplomat::rust_link(icu::timezone::IanaToBcp47Mapper::new, FnInStruct)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XIanaToBcp47Mapper>, ICU4XError> {
+ Ok(Box::new(ICU4XIanaToBcp47Mapper(call_constructor!(
+ IanaToBcp47Mapper::new [r => Ok(r)],
+ IanaToBcp47Mapper::try_new_with_any_provider,
+ IanaToBcp47Mapper::try_new_with_buffer_provider,
+ provider,
+ )?)))
+ }
+ }
+
+ /// An object capable of mapping from a BCP-47 time zone ID to an IANA ID.
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::timezone::IanaBcp47RoundTripMapper, Struct)]
+ #[diplomat::rust_link(
+ icu::timezone::IanaBcp47RoundTripMapper::as_borrowed,
+ FnInStruct,
+ hidden
+ )]
+ pub struct ICU4XBcp47ToIanaMapper(pub IanaBcp47RoundTripMapper);
+
+ impl ICU4XBcp47ToIanaMapper {
+ #[diplomat::rust_link(icu::timezone::IanaBcp47RoundTripMapper::new, FnInStruct)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XBcp47ToIanaMapper>, ICU4XError> {
+ Ok(Box::new(ICU4XBcp47ToIanaMapper(call_constructor!(
+ IanaBcp47RoundTripMapper::new [r => Ok(r)],
+ IanaBcp47RoundTripMapper::try_new_with_any_provider,
+ IanaBcp47RoundTripMapper::try_new_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Writes out the canonical IANA time zone ID corresponding to the given BCP-47 ID.
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::IanaBcp47RoundTripMapper::bcp47_to_iana,
+ FnInStruct
+ )]
+ pub fn get(
+ &self,
+ value: &str,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ use core::str::FromStr;
+ use writeable::Writeable;
+ let handle = self.0.as_borrowed();
+ TimeZoneBcp47Id::from_str(value)
+ .ok()
+ .and_then(|bcp47_id| handle.bcp47_to_iana(bcp47_id))
+ .ok_or(ICU4XError::TimeZoneInvalidIdError)?
+ .write_to(write)?;
+ Ok(())
+ }
+ }
+}
diff --git a/intl/icu_capi/src/lib.rs b/intl/icu_capi/src/lib.rs
new file mode 100644
index 0000000000..74060998bc
--- /dev/null
+++ b/intl/icu_capi/src/lib.rs
@@ -0,0 +1,145 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
+#![no_std]
+#![cfg_attr(
+ not(test),
+ deny(
+ clippy::indexing_slicing,
+ clippy::unwrap_used,
+ clippy::expect_used,
+ clippy::panic,
+ // Exhaustiveness and Debug is not required for Diplomat types
+ )
+)]
+#![allow(clippy::upper_case_acronyms)]
+#![allow(clippy::needless_lifetimes)]
+#![allow(clippy::result_unit_err)]
+
+//! This crate contains the source of truth for the [Diplomat](https://github.com/rust-diplomat/diplomat)-generated
+//! FFI bindings. This generates the C, C++, JavaScript, and TypeScript bindings. This crate also contains the `extern "C"`
+//! FFI for ICU4X.
+//!
+//! While the types in this crate are public, APIs from this crate are *not intended to be used from Rust*
+//! and as such this crate may unpredictably change its Rust API across compatible semver versions. The `extern "C"` APIs exposed
+//! by this crate, while not directly documented, are stable within the same major semver version, as are the bindings exposed under
+//! the `cpp/` and `js/` folders.
+//!
+//! This crate may still be explored for documentation on docs.rs, and there are generated language-specific docs available as well.
+//! C++ has sphinx docs in `cpp/docs/`, and the header files also contain documentation comments. The JS version has sphinx docs under
+//! `js/docs`, and the TypeScript sources in `js/include` are compatible with `tsdoc`.
+//!
+//! This crate is `no_std` and will not typically build as a staticlib on its own. If you wish to link to it you should prefer
+//! using `icu_capi_staticlib`, or for more esoteric platforms you may write a shim crate depending on this crate that hooks in
+//! an allocator and panic hook.
+//!
+//! More information on using ICU4X from C++ can be found in [our tutorial].
+//!
+//! [our tutorial]: https://github.com/unicode-org/icu4x/blob/main/docs/tutorials/cpp.md
+// Renamed so you can't accidentally use it
+#[cfg(target_arch = "wasm32")]
+extern crate std as rust_std;
+
+extern crate alloc;
+
+// Common modules
+
+pub mod common;
+pub mod data_struct;
+pub mod errors;
+pub mod locale;
+#[cfg(feature = "logging")]
+pub mod logging;
+#[macro_use]
+pub mod provider;
+
+// Components
+
+#[cfg(feature = "icu_properties")]
+pub mod bidi;
+#[cfg(any(
+ feature = "icu_datetime",
+ feature = "icu_timezone",
+ feature = "icu_calendar"
+))]
+pub mod calendar;
+#[cfg(feature = "icu_casemap")]
+pub mod casemap;
+#[cfg(feature = "icu_collator")]
+pub mod collator;
+#[cfg(feature = "icu_properties")]
+pub mod collections_sets;
+#[cfg(any(
+ feature = "icu_datetime",
+ feature = "icu_timezone",
+ feature = "icu_calendar"
+))]
+pub mod date;
+#[cfg(any(
+ feature = "icu_datetime",
+ feature = "icu_timezone",
+ feature = "icu_calendar"
+))]
+pub mod datetime;
+#[cfg(feature = "icu_datetime")]
+pub mod datetime_formatter;
+#[cfg(feature = "icu_decimal")]
+pub mod decimal;
+#[cfg(feature = "icu_displaynames")]
+pub mod displaynames;
+#[cfg(feature = "icu_locid_transform")]
+pub mod fallbacker;
+#[cfg(feature = "icu_decimal")]
+pub mod fixed_decimal;
+#[cfg(any(feature = "icu_datetime", feature = "icu_timezone"))]
+pub mod iana_bcp47_mapper;
+#[cfg(feature = "icu_list")]
+pub mod list;
+#[cfg(feature = "icu_locid_transform")]
+pub mod locale_directionality;
+#[cfg(feature = "icu_locid_transform")]
+pub mod locid_transform;
+#[cfg(feature = "icu_timezone")]
+pub mod metazone_calculator;
+#[cfg(feature = "icu_normalizer")]
+pub mod normalizer;
+#[cfg(feature = "icu_normalizer")]
+pub mod normalizer_properties;
+#[cfg(feature = "icu_plurals")]
+pub mod pluralrules;
+#[cfg(feature = "icu_properties")]
+pub mod properties_iter;
+#[cfg(feature = "icu_properties")]
+pub mod properties_maps;
+#[cfg(feature = "icu_properties")]
+pub mod properties_names;
+#[cfg(feature = "icu_properties")]
+pub mod properties_sets;
+#[cfg(feature = "icu_properties")]
+pub mod properties_unisets;
+#[cfg(feature = "icu_properties")]
+pub mod script;
+#[cfg(feature = "icu_segmenter")]
+pub mod segmenter_grapheme;
+#[cfg(feature = "icu_segmenter")]
+pub mod segmenter_line;
+#[cfg(feature = "icu_segmenter")]
+pub mod segmenter_sentence;
+#[cfg(feature = "icu_segmenter")]
+pub mod segmenter_word;
+#[cfg(any(
+ feature = "icu_datetime",
+ feature = "icu_timezone",
+ feature = "icu_calendar"
+))]
+pub mod time;
+#[cfg(any(feature = "icu_datetime", feature = "icu_timezone"))]
+pub mod timezone;
+#[cfg(feature = "icu_datetime")]
+pub mod timezone_formatter;
+#[cfg(feature = "icu_calendar")]
+pub mod week;
+#[cfg(feature = "icu_datetime")]
+pub mod zoned_formatter;
diff --git a/intl/icu_capi/src/list.rs b/intl/icu_capi/src/list.rs
new file mode 100644
index 0000000000..278b12ffb5
--- /dev/null
+++ b/intl/icu_capi/src/list.rs
@@ -0,0 +1,125 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::{
+ errors::ffi::ICU4XError, locale::ffi::ICU4XLocale, provider::ffi::ICU4XDataProvider,
+ };
+ use alloc::boxed::Box;
+ use alloc::string::String;
+ use alloc::vec::Vec;
+ use diplomat_runtime::DiplomatWriteable;
+ use icu_list::{ListFormatter, ListLength};
+ use writeable::Writeable;
+
+ /// A list of strings
+ #[diplomat::opaque]
+ pub struct ICU4XList(pub Vec<String>);
+
+ impl ICU4XList {
+ /// Create a new list of strings
+ pub fn create() -> Box<ICU4XList> {
+ Box::new(ICU4XList(Vec::new()))
+ }
+
+ /// Create a new list of strings with preallocated space to hold
+ /// at least `capacity` elements
+ pub fn create_with_capacity(capacity: usize) -> Box<ICU4XList> {
+ Box::new(ICU4XList(Vec::with_capacity(capacity)))
+ }
+
+ /// Push a string to the list
+ ///
+ /// For C++ users, potentially invalid UTF8 will be handled via
+ /// REPLACEMENT CHARACTERs
+ pub fn push(&mut self, val: &str) {
+ let val = val.as_bytes(); // #2520
+ self.0.push(String::from_utf8_lossy(val).into_owned());
+ }
+
+ /// The number of elements in this list
+ #[allow(clippy::len_without_is_empty)] // don't need to follow Rust conventions over FFI
+ #[diplomat::attr(dart, rename = "length")]
+ pub fn len(&self) -> usize {
+ self.0.len()
+ }
+ }
+
+ #[diplomat::rust_link(icu::list::ListLength, Enum)]
+ #[diplomat::enum_convert(ListLength, needs_wildcard)]
+ pub enum ICU4XListLength {
+ Wide,
+ Short,
+ Narrow,
+ }
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::list::ListFormatter, Struct)]
+ pub struct ICU4XListFormatter(pub ListFormatter);
+
+ impl ICU4XListFormatter {
+ /// Construct a new ICU4XListFormatter instance for And patterns
+ #[diplomat::rust_link(icu::list::ListFormatter::try_new_and_with_length, FnInStruct)]
+ pub fn create_and_with_length(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ length: ICU4XListLength,
+ ) -> Result<Box<ICU4XListFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+ Ok(Box::new(ICU4XListFormatter(call_constructor!(
+ ListFormatter::try_new_and_with_length,
+ ListFormatter::try_new_and_with_length_with_any_provider,
+ ListFormatter::try_new_and_with_length_with_buffer_provider,
+ provider,
+ &locale,
+ length.into()
+ )?)))
+ }
+ /// Construct a new ICU4XListFormatter instance for And patterns
+ #[diplomat::rust_link(icu::list::ListFormatter::try_new_or_with_length, FnInStruct)]
+ pub fn create_or_with_length(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ length: ICU4XListLength,
+ ) -> Result<Box<ICU4XListFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+ Ok(Box::new(ICU4XListFormatter(call_constructor!(
+ ListFormatter::try_new_or_with_length,
+ ListFormatter::try_new_or_with_length_with_any_provider,
+ ListFormatter::try_new_or_with_length_with_buffer_provider,
+ provider,
+ &locale,
+ length.into()
+ )?)))
+ }
+ /// Construct a new ICU4XListFormatter instance for And patterns
+ #[diplomat::rust_link(icu::list::ListFormatter::try_new_unit_with_length, FnInStruct)]
+ pub fn create_unit_with_length(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ length: ICU4XListLength,
+ ) -> Result<Box<ICU4XListFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+ Ok(Box::new(ICU4XListFormatter(call_constructor!(
+ ListFormatter::try_new_unit_with_length,
+ ListFormatter::try_new_unit_with_length_with_any_provider,
+ ListFormatter::try_new_unit_with_length_with_buffer_provider,
+ provider,
+ &locale,
+ length.into()
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::list::ListFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(icu::list::ListFormatter::format_to_string, FnInStruct, hidden)]
+ pub fn format(
+ &self,
+ list: &ICU4XList,
+ write: &mut DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ self.0.format(list.0.iter()).write_to(write)?;
+ Ok(())
+ }
+ }
+}
diff --git a/intl/icu_capi/src/locale.rs b/intl/icu_capi/src/locale.rs
new file mode 100644
index 0000000000..07089cae65
--- /dev/null
+++ b/intl/icu_capi/src/locale.rs
@@ -0,0 +1,212 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::errors::ffi::ICU4XError;
+ use alloc::boxed::Box;
+ use core::str;
+ use diplomat_runtime::DiplomatWriteable;
+ use icu_locid::extensions::unicode::Key;
+ use icu_locid::subtags::{Language, Region, Script};
+ use icu_locid::Locale;
+ use writeable::Writeable;
+
+ use crate::common::ffi::ICU4XOrdering;
+
+ #[diplomat::opaque]
+ /// An ICU4X Locale, capable of representing strings like `"en-US"`.
+ #[diplomat::rust_link(icu::locid::Locale, Struct)]
+ pub struct ICU4XLocale(pub Locale);
+
+ impl ICU4XLocale {
+ /// Construct an [`ICU4XLocale`] from an locale identifier.
+ ///
+ /// This will run the complete locale parsing algorithm. If code size and
+ /// performance are critical and the locale is of a known shape (such as
+ /// `aa-BB`) use `create_und`, `set_language`, `set_script`, and `set_region`.
+ #[diplomat::rust_link(icu::locid::Locale::try_from_bytes, FnInStruct)]
+ #[diplomat::rust_link(icu::locid::Locale::from_str, FnInStruct, hidden)]
+ pub fn create_from_string(name: &str) -> Result<Box<ICU4XLocale>, ICU4XError> {
+ let name = name.as_bytes(); // #2520
+ Ok(Box::new(ICU4XLocale(Locale::try_from_bytes(name)?)))
+ }
+
+ /// Construct a default undefined [`ICU4XLocale`] "und".
+ #[diplomat::rust_link(icu::locid::Locale::UND, AssociatedConstantInStruct)]
+ pub fn create_und() -> Box<ICU4XLocale> {
+ Box::new(ICU4XLocale(Locale::UND))
+ }
+
+ /// Clones the [`ICU4XLocale`].
+ #[diplomat::rust_link(icu::locid::Locale, Struct)]
+ #[allow(clippy::should_implement_trait)]
+ pub fn clone(&self) -> Box<ICU4XLocale> {
+ Box::new(ICU4XLocale(self.0.clone()))
+ }
+
+ /// Write a string representation of the `LanguageIdentifier` part of
+ /// [`ICU4XLocale`] to `write`.
+ #[diplomat::rust_link(icu::locid::Locale::id, StructField)]
+ pub fn basename(
+ &self,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ self.0.id.write_to(write)?;
+ Ok(())
+ }
+
+ /// Write a string representation of the unicode extension to `write`
+ #[diplomat::rust_link(icu::locid::Locale::extensions, StructField)]
+ pub fn get_unicode_extension(
+ &self,
+ bytes: &str,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ let bytes = bytes.as_bytes(); // #2520
+ self.0
+ .extensions
+ .unicode
+ .keywords
+ .get(&Key::try_from_bytes(bytes)?)
+ .ok_or(ICU4XError::LocaleUndefinedSubtagError)?
+ .write_to(write)?;
+ Ok(())
+ }
+
+ /// Write a string representation of [`ICU4XLocale`] language to `write`
+ #[diplomat::rust_link(icu::locid::Locale::id, StructField)]
+ pub fn language(
+ &self,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ self.0.id.language.write_to(write)?;
+ Ok(())
+ }
+
+ /// Set the language part of the [`ICU4XLocale`].
+ #[diplomat::rust_link(icu::locid::Locale::try_from_bytes, FnInStruct)]
+ pub fn set_language(&mut self, bytes: &str) -> Result<(), ICU4XError> {
+ let bytes = bytes.as_bytes(); // #2520
+ self.0.id.language = if bytes.is_empty() {
+ Language::UND
+ } else {
+ Language::try_from_bytes(bytes)?
+ };
+ Ok(())
+ }
+
+ /// Write a string representation of [`ICU4XLocale`] region to `write`
+ #[diplomat::rust_link(icu::locid::Locale::id, StructField)]
+ pub fn region(
+ &self,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ if let Some(region) = self.0.id.region {
+ region.write_to(write)?;
+ Ok(())
+ } else {
+ Err(ICU4XError::LocaleUndefinedSubtagError)
+ }
+ }
+
+ /// Set the region part of the [`ICU4XLocale`].
+ #[diplomat::rust_link(icu::locid::Locale::try_from_bytes, FnInStruct)]
+ pub fn set_region(&mut self, bytes: &str) -> Result<(), ICU4XError> {
+ let bytes = bytes.as_bytes(); // #2520
+ self.0.id.region = if bytes.is_empty() {
+ None
+ } else {
+ Some(Region::try_from_bytes(bytes)?)
+ };
+ Ok(())
+ }
+
+ /// Write a string representation of [`ICU4XLocale`] script to `write`
+ #[diplomat::rust_link(icu::locid::Locale::id, StructField)]
+ pub fn script(
+ &self,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ if let Some(script) = self.0.id.script {
+ script.write_to(write)?;
+ Ok(())
+ } else {
+ Err(ICU4XError::LocaleUndefinedSubtagError)
+ }
+ }
+
+ /// Set the script part of the [`ICU4XLocale`]. Pass an empty string to remove the script.
+ #[diplomat::rust_link(icu::locid::Locale::try_from_bytes, FnInStruct)]
+ pub fn set_script(&mut self, bytes: &str) -> Result<(), ICU4XError> {
+ let bytes = bytes.as_bytes(); // #2520
+ self.0.id.script = if bytes.is_empty() {
+ None
+ } else {
+ Some(Script::try_from_bytes(bytes)?)
+ };
+ Ok(())
+ }
+
+ /// Best effort locale canonicalizer that doesn't need any data
+ ///
+ /// Use ICU4XLocaleCanonicalizer for better control and functionality
+ #[diplomat::rust_link(icu::locid::Locale::canonicalize, FnInStruct)]
+ pub fn canonicalize(bytes: &str, write: &mut DiplomatWriteable) -> Result<(), ICU4XError> {
+ let bytes = bytes.as_bytes(); // #2520
+ Locale::canonicalize(bytes)?.write_to(write)?;
+ Ok(())
+ }
+ /// Write a string representation of [`ICU4XLocale`] to `write`
+ #[diplomat::rust_link(icu::locid::Locale::write_to, FnInStruct)]
+ pub fn to_string(
+ &self,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ self.0.write_to(write)?;
+ Ok(())
+ }
+
+ #[diplomat::rust_link(icu::locid::Locale::normalizing_eq, FnInStruct)]
+ pub fn normalizing_eq(&self, other: &str) -> bool {
+ let other = other.as_bytes(); // #2520
+ if let Ok(other) = str::from_utf8(other) {
+ self.0.normalizing_eq(other)
+ } else {
+ // invalid UTF8 won't be allowed in locales anyway
+ false
+ }
+ }
+
+ #[diplomat::rust_link(icu::locid::Locale::strict_cmp, FnInStruct)]
+ pub fn strict_cmp(&self, other: &str) -> ICU4XOrdering {
+ let other = other.as_bytes(); // #2520
+ self.0.strict_cmp(other).into()
+ }
+
+ /// Deprecated
+ ///
+ /// Use `create_from_string("en").
+ #[cfg(feature = "provider_test")]
+ #[diplomat::attr(dart, disable)]
+ pub fn create_en() -> Box<ICU4XLocale> {
+ Box::new(ICU4XLocale(icu_locid::locale!("en")))
+ }
+
+ /// Deprecated
+ ///
+ /// Use `create_from_string("bn").
+ #[cfg(feature = "provider_test")]
+ #[diplomat::attr(dart, disable)]
+ pub fn create_bn() -> Box<ICU4XLocale> {
+ Box::new(ICU4XLocale(icu_locid::locale!("bn")))
+ }
+ }
+}
+
+impl ffi::ICU4XLocale {
+ pub fn to_datalocale(&self) -> icu_provider::DataLocale {
+ (&self.0).into()
+ }
+}
diff --git a/intl/icu_capi/src/locale_directionality.rs b/intl/icu_capi/src/locale_directionality.rs
new file mode 100644
index 0000000000..2ec83caff2
--- /dev/null
+++ b/intl/icu_capi/src/locale_directionality.rs
@@ -0,0 +1,101 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::{
+ errors::ffi::ICU4XError,
+ locale::ffi::ICU4XLocale,
+ locid_transform::ffi::ICU4XLocaleExpander,
+ provider::{ffi::ICU4XDataProvider, ICU4XDataProviderInner},
+ };
+ use alloc::boxed::Box;
+ use icu_locid_transform::{Direction, LocaleDirectionality};
+
+ #[diplomat::rust_link(icu::locid_transform::Direction, Enum)]
+ pub enum ICU4XLocaleDirection {
+ LeftToRight,
+ RightToLeft,
+ Unknown,
+ }
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::locid_transform::LocaleDirectionality, Struct)]
+ pub struct ICU4XLocaleDirectionality(pub LocaleDirectionality);
+
+ impl ICU4XLocaleDirectionality {
+ /// Construct a new ICU4XLocaleDirectionality instance
+ #[diplomat::rust_link(icu::locid_transform::LocaleDirectionality::new, FnInStruct)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XLocaleDirectionality>, ICU4XError> {
+ Ok(Box::new(ICU4XLocaleDirectionality(call_constructor!(
+ LocaleDirectionality::new [r => Ok(r)],
+ LocaleDirectionality::try_new_with_any_provider,
+ LocaleDirectionality::try_new_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Construct a new ICU4XLocaleDirectionality instance with a custom expander
+ #[diplomat::rust_link(
+ icu::locid_transform::LocaleDirectionality::new_with_expander,
+ FnInStruct
+ )]
+ pub fn create_with_expander(
+ provider: &ICU4XDataProvider,
+ expander: &ICU4XLocaleExpander,
+ ) -> Result<Box<ICU4XLocaleDirectionality>, ICU4XError> {
+ #[allow(unused_imports)]
+ use icu_provider::prelude::*;
+ Ok(Box::new(ICU4XLocaleDirectionality(match &provider.0 {
+ ICU4XDataProviderInner::Destroyed => Err(icu_provider::DataError::custom(
+ "This provider has been destroyed",
+ ))?,
+ ICU4XDataProviderInner::Empty => {
+ LocaleDirectionality::try_new_with_expander_unstable(
+ &icu_provider_adapters::empty::EmptyDataProvider::new(),
+ expander.0.clone(),
+ )?
+ }
+ #[cfg(feature = "buffer_provider")]
+ ICU4XDataProviderInner::Buffer(buffer_provider) => {
+ LocaleDirectionality::try_new_with_expander_unstable(
+ &buffer_provider.as_deserializing(),
+ expander.0.clone(),
+ )?
+ }
+ #[cfg(feature = "compiled_data")]
+ ICU4XDataProviderInner::Compiled => {
+ LocaleDirectionality::new_with_expander(expander.0.clone())
+ }
+ })))
+ }
+
+ #[diplomat::rust_link(icu::locid_transform::LocaleDirectionality::get, FnInStruct)]
+ pub fn get(&self, locale: &ICU4XLocale) -> ICU4XLocaleDirection {
+ match self.0.get(&locale.0) {
+ Some(Direction::LeftToRight) => ICU4XLocaleDirection::LeftToRight,
+ Some(Direction::RightToLeft) => ICU4XLocaleDirection::RightToLeft,
+ _ => ICU4XLocaleDirection::Unknown,
+ }
+ }
+
+ #[diplomat::rust_link(
+ icu::locid_transform::LocaleDirectionality::is_left_to_right,
+ FnInStruct
+ )]
+ pub fn is_left_to_right(&self, locale: &ICU4XLocale) -> bool {
+ self.0.is_left_to_right(&locale.0)
+ }
+
+ #[diplomat::rust_link(
+ icu::locid_transform::LocaleDirectionality::is_right_to_left,
+ FnInStruct
+ )]
+ pub fn is_right_to_left(&self, locale: &ICU4XLocale) -> bool {
+ self.0.is_right_to_left(&locale.0)
+ }
+ }
+}
diff --git a/intl/icu_capi/src/locid_transform.rs b/intl/icu_capi/src/locid_transform.rs
new file mode 100644
index 0000000000..d42583b072
--- /dev/null
+++ b/intl/icu_capi/src/locid_transform.rs
@@ -0,0 +1,115 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+ use icu_locid_transform::{LocaleCanonicalizer, LocaleExpander, TransformResult};
+
+ use crate::{locale::ffi::ICU4XLocale, provider::ffi::ICU4XDataProvider};
+
+ use crate::errors::ffi::ICU4XError;
+
+ /// FFI version of `TransformResult`.
+ #[diplomat::rust_link(icu::locid_transform::TransformResult, Enum)]
+ #[diplomat::enum_convert(TransformResult)]
+ pub enum ICU4XTransformResult {
+ Modified,
+ Unmodified,
+ }
+
+ /// A locale canonicalizer.
+ #[diplomat::rust_link(icu::locid_transform::LocaleCanonicalizer, Struct)]
+ #[diplomat::opaque]
+ pub struct ICU4XLocaleCanonicalizer(LocaleCanonicalizer);
+
+ impl ICU4XLocaleCanonicalizer {
+ /// Create a new [`ICU4XLocaleCanonicalizer`].
+ #[diplomat::rust_link(icu::locid_transform::LocaleCanonicalizer::new, FnInStruct)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XLocaleCanonicalizer>, ICU4XError> {
+ Ok(Box::new(ICU4XLocaleCanonicalizer(call_constructor!(
+ LocaleCanonicalizer::new [r => Ok(r)],
+ LocaleCanonicalizer::try_new_with_any_provider,
+ LocaleCanonicalizer::try_new_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Create a new [`ICU4XLocaleCanonicalizer`] with extended data.
+ #[diplomat::rust_link(
+ icu::locid_transform::LocaleCanonicalizer::new_with_expander,
+ FnInStruct
+ )]
+ pub fn create_extended(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XLocaleCanonicalizer>, ICU4XError> {
+ let expander = call_constructor!(
+ LocaleExpander::new_extended [r => Ok(r)],
+ LocaleExpander::try_new_with_any_provider,
+ LocaleExpander::try_new_with_buffer_provider,
+ provider,
+ )?;
+ Ok(Box::new(ICU4XLocaleCanonicalizer(call_constructor!(
+ LocaleCanonicalizer::new_with_expander [r => Ok(r)],
+ LocaleCanonicalizer::try_new_with_expander_with_any_provider,
+ LocaleCanonicalizer::try_new_with_expander_with_buffer_provider,
+ provider,
+ expander
+ )?)))
+ }
+
+ /// FFI version of `LocaleCanonicalizer::canonicalize()`.
+ #[diplomat::rust_link(icu::locid_transform::LocaleCanonicalizer::canonicalize, FnInStruct)]
+ pub fn canonicalize(&self, locale: &mut ICU4XLocale) -> ICU4XTransformResult {
+ self.0.canonicalize(&mut locale.0).into()
+ }
+ }
+
+ /// A locale expander.
+ #[diplomat::rust_link(icu::locid_transform::LocaleExpander, Struct)]
+ #[diplomat::opaque]
+ pub struct ICU4XLocaleExpander(pub LocaleExpander);
+
+ impl ICU4XLocaleExpander {
+ /// Create a new [`ICU4XLocaleExpander`].
+ #[diplomat::rust_link(icu::locid_transform::LocaleExpander::new, FnInStruct)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XLocaleExpander>, ICU4XError> {
+ Ok(Box::new(ICU4XLocaleExpander(call_constructor!(
+ LocaleExpander::new [r => Ok(r)],
+ LocaleExpander::try_new_with_any_provider,
+ LocaleExpander::try_new_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Create a new [`ICU4XLocaleExpander`] with extended data.
+ #[diplomat::rust_link(icu::locid_transform::LocaleExpander::new_extended, FnInStruct)]
+ pub fn create_extended(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XLocaleExpander>, ICU4XError> {
+ Ok(Box::new(ICU4XLocaleExpander(call_constructor!(
+ LocaleExpander::new_extended [r => Ok(r)],
+ LocaleExpander::try_new_with_any_provider,
+ LocaleExpander::try_new_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// FFI version of `LocaleExpander::maximize()`.
+ #[diplomat::rust_link(icu::locid_transform::LocaleExpander::maximize, FnInStruct)]
+ pub fn maximize(&self, locale: &mut ICU4XLocale) -> ICU4XTransformResult {
+ self.0.maximize(&mut locale.0).into()
+ }
+
+ /// FFI version of `LocaleExpander::minimize()`.
+ #[diplomat::rust_link(icu::locid_transform::LocaleExpander::minimize, FnInStruct)]
+ pub fn minimize(&self, locale: &mut ICU4XLocale) -> ICU4XTransformResult {
+ self.0.minimize(&mut locale.0).into()
+ }
+ }
+}
diff --git a/intl/icu_capi/src/logging.rs b/intl/icu_capi/src/logging.rs
new file mode 100644
index 0000000000..c84205bec5
--- /dev/null
+++ b/intl/icu_capi/src/logging.rs
@@ -0,0 +1,36 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+
+ #[diplomat::opaque]
+ /// An object allowing control over the logging used
+ #[diplomat::attr(dart, disable)]
+ pub struct ICU4XLogger;
+
+ impl ICU4XLogger {
+ /// Initialize the logger using `simple_logger`
+ ///
+ /// Requires the `simple_logger` Cargo feature.
+ ///
+ /// Returns `false` if there was already a logger set.
+ #[cfg(all(not(target_arch = "wasm32"), feature = "simple_logger"))]
+ pub fn init_simple_logger() -> bool {
+ simple_logger::init().is_ok()
+ }
+
+ /// Deprecated: since ICU4X 1.4, this now happens automatically if the `log` feature is enabled.
+ #[cfg(target_arch = "wasm32")]
+ pub fn init_console_logger() -> bool {
+ false
+ }
+ }
+}
+
+// semver?
+#[no_mangle]
+#[cfg(target_arch = "wasm32")]
+pub unsafe extern "C" fn icu4x_init() {}
diff --git a/intl/icu_capi/src/metazone_calculator.rs b/intl/icu_capi/src/metazone_calculator.rs
new file mode 100644
index 0000000000..e55ede26bd
--- /dev/null
+++ b/intl/icu_capi/src/metazone_calculator.rs
@@ -0,0 +1,34 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::errors::ffi::ICU4XError;
+ use crate::provider::ffi::ICU4XDataProvider;
+ use alloc::boxed::Box;
+ use icu_timezone::MetazoneCalculator;
+
+ /// An object capable of computing the metazone from a timezone.
+ ///
+ /// This can be used via `maybe_calculate_metazone()` on [`ICU4XCustomTimeZone`].
+ ///
+ /// [`ICU4XCustomTimeZone`]: crate::timezone::ffi::ICU4XCustomTimeZone
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::timezone::MetazoneCalculator, Struct)]
+ pub struct ICU4XMetazoneCalculator(pub MetazoneCalculator);
+
+ impl ICU4XMetazoneCalculator {
+ #[diplomat::rust_link(icu::timezone::MetazoneCalculator::new, FnInStruct)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XMetazoneCalculator>, ICU4XError> {
+ Ok(Box::new(ICU4XMetazoneCalculator(call_constructor!(
+ MetazoneCalculator::new [r => Ok(r)],
+ MetazoneCalculator::try_new_with_any_provider,
+ MetazoneCalculator::try_new_with_buffer_provider,
+ provider,
+ )?)))
+ }
+ }
+}
diff --git a/intl/icu_capi/src/normalizer.rs b/intl/icu_capi/src/normalizer.rs
new file mode 100644
index 0000000000..13a1cf0292
--- /dev/null
+++ b/intl/icu_capi/src/normalizer.rs
@@ -0,0 +1,152 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::{errors::ffi::ICU4XError, provider::ffi::ICU4XDataProvider};
+ use alloc::boxed::Box;
+ use diplomat_runtime::DiplomatWriteable;
+ use icu_normalizer::{ComposingNormalizer, DecomposingNormalizer};
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::normalizer::ComposingNormalizer, Struct)]
+ pub struct ICU4XComposingNormalizer(pub ComposingNormalizer);
+
+ impl ICU4XComposingNormalizer {
+ /// Construct a new ICU4XComposingNormalizer instance for NFC
+ #[diplomat::rust_link(icu::normalizer::ComposingNormalizer::new_nfc, FnInStruct)]
+ pub fn create_nfc(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XComposingNormalizer>, ICU4XError> {
+ Ok(Box::new(ICU4XComposingNormalizer(call_constructor!(
+ ComposingNormalizer::new_nfc [r => Ok(r)],
+ ComposingNormalizer::try_new_nfc_with_any_provider,
+ ComposingNormalizer::try_new_nfc_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Construct a new ICU4XComposingNormalizer instance for NFKC
+ #[diplomat::rust_link(icu::normalizer::ComposingNormalizer::new_nfkc, FnInStruct)]
+ pub fn create_nfkc(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XComposingNormalizer>, ICU4XError> {
+ Ok(Box::new(ICU4XComposingNormalizer(call_constructor!(
+ ComposingNormalizer::new_nfkc [r => Ok(r)],
+ ComposingNormalizer::try_new_nfkc_with_any_provider,
+ ComposingNormalizer::try_new_nfkc_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Normalize a (potentially ill-formed) UTF8 string
+ ///
+ /// Errors are mapped to REPLACEMENT CHARACTER
+ #[diplomat::rust_link(icu::normalizer::ComposingNormalizer::normalize_utf8, FnInStruct)]
+ #[diplomat::rust_link(icu::normalizer::ComposingNormalizer::normalize, FnInStruct, hidden)]
+ #[diplomat::rust_link(
+ icu::normalizer::ComposingNormalizer::normalize_to,
+ FnInStruct,
+ hidden
+ )]
+ #[diplomat::rust_link(
+ icu::normalizer::ComposingNormalizer::normalize_utf8_to,
+ FnInStruct,
+ hidden
+ )]
+ pub fn normalize(&self, s: &str, write: &mut DiplomatWriteable) -> Result<(), ICU4XError> {
+ let s = s.as_bytes(); // #2520
+ self.0.normalize_utf8_to(s, write)?;
+ Ok(())
+ }
+
+ /// Check if a (potentially ill-formed) UTF8 string is normalized
+ ///
+ /// Errors are mapped to REPLACEMENT CHARACTER
+ #[diplomat::rust_link(icu::normalizer::ComposingNormalizer::is_normalized_utf8, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::normalizer::ComposingNormalizer::is_normalized,
+ FnInStruct,
+ hidden
+ )]
+ pub fn is_normalized(&self, s: &str) -> bool {
+ let s = s.as_bytes(); // #2520
+ self.0.is_normalized_utf8(s)
+ }
+ }
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::normalizer::DecomposingNormalizer, Struct)]
+ pub struct ICU4XDecomposingNormalizer(pub DecomposingNormalizer);
+
+ impl ICU4XDecomposingNormalizer {
+ /// Construct a new ICU4XDecomposingNormalizer instance for NFC
+ #[diplomat::rust_link(icu::normalizer::DecomposingNormalizer::new_nfd, FnInStruct)]
+ pub fn create_nfd(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XDecomposingNormalizer>, ICU4XError> {
+ Ok(Box::new(ICU4XDecomposingNormalizer(call_constructor!(
+ DecomposingNormalizer::new_nfd [r => Ok(r)],
+ DecomposingNormalizer::try_new_nfd_with_any_provider,
+ DecomposingNormalizer::try_new_nfd_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Construct a new ICU4XDecomposingNormalizer instance for NFKC
+ #[diplomat::rust_link(icu::normalizer::DecomposingNormalizer::new_nfkd, FnInStruct)]
+ pub fn create_nfkd(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XDecomposingNormalizer>, ICU4XError> {
+ Ok(Box::new(ICU4XDecomposingNormalizer(call_constructor!(
+ DecomposingNormalizer::new_nfkd [r => Ok(r)],
+ DecomposingNormalizer::try_new_nfkd_with_any_provider,
+ DecomposingNormalizer::try_new_nfkd_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Normalize a (potentially ill-formed) UTF8 string
+ ///
+ /// Errors are mapped to REPLACEMENT CHARACTER
+ #[diplomat::rust_link(icu::normalizer::DecomposingNormalizer::normalize_utf8, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::normalizer::DecomposingNormalizer::normalize,
+ FnInStruct,
+ hidden
+ )]
+ #[diplomat::rust_link(
+ icu::normalizer::DecomposingNormalizer::normalize_to,
+ FnInStruct,
+ hidden
+ )]
+ #[diplomat::rust_link(
+ icu::normalizer::DecomposingNormalizer::normalize_utf8_to,
+ FnInStruct,
+ hidden
+ )]
+ pub fn normalize(&self, s: &str, write: &mut DiplomatWriteable) -> Result<(), ICU4XError> {
+ let s = s.as_bytes(); // #2520
+ self.0.normalize_utf8_to(s, write)?;
+ Ok(())
+ }
+
+ /// Check if a (potentially ill-formed) UTF8 string is normalized
+ ///
+ /// Errors are mapped to REPLACEMENT CHARACTER
+ #[diplomat::rust_link(
+ icu::normalizer::DecomposingNormalizer::is_normalized_utf8,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::normalizer::DecomposingNormalizer::is_normalized,
+ FnInStruct,
+ hidden
+ )]
+ pub fn is_normalized(&self, s: &str) -> bool {
+ let s = s.as_bytes(); // #2520
+ self.0.is_normalized_utf8(s)
+ }
+ }
+}
diff --git a/intl/icu_capi/src/normalizer_properties.rs b/intl/icu_capi/src/normalizer_properties.rs
new file mode 100644
index 0000000000..dbb1dfbdbc
--- /dev/null
+++ b/intl/icu_capi/src/normalizer_properties.rs
@@ -0,0 +1,144 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::{errors::ffi::ICU4XError, provider::ffi::ICU4XDataProvider};
+ use alloc::boxed::Box;
+ use icu_normalizer::properties::{
+ CanonicalCombiningClassMap, CanonicalComposition, CanonicalDecomposition, Decomposed,
+ };
+
+ /// Lookup of the Canonical_Combining_Class Unicode property
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::normalizer::properties::CanonicalCombiningClassMap, Struct)]
+ pub struct ICU4XCanonicalCombiningClassMap(pub CanonicalCombiningClassMap);
+
+ impl ICU4XCanonicalCombiningClassMap {
+ /// Construct a new ICU4XCanonicalCombiningClassMap instance for NFC
+ #[diplomat::rust_link(
+ icu::normalizer::properties::CanonicalCombiningClassMap::new,
+ FnInStruct
+ )]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCanonicalCombiningClassMap>, ICU4XError> {
+ Ok(Box::new(ICU4XCanonicalCombiningClassMap(
+ call_constructor!(
+ CanonicalCombiningClassMap::new [r => Ok(r)],
+ CanonicalCombiningClassMap::try_new_with_any_provider,
+ CanonicalCombiningClassMap::try_new_with_buffer_provider,
+ provider
+ )?,
+ )))
+ }
+
+ #[diplomat::rust_link(
+ icu::normalizer::properties::CanonicalCombiningClassMap::get,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::properties::properties::CanonicalCombiningClass,
+ Struct,
+ compact
+ )]
+ pub fn get(&self, ch: char) -> u8 {
+ self.0.get(ch).0
+ }
+ #[diplomat::rust_link(
+ icu::normalizer::properties::CanonicalCombiningClassMap::get32,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::properties::properties::CanonicalCombiningClass,
+ Struct,
+ compact
+ )]
+ pub fn get32(&self, ch: u32) -> u8 {
+ self.0.get32(ch).0
+ }
+ }
+
+ /// The raw canonical composition operation.
+ ///
+ /// Callers should generally use ICU4XComposingNormalizer unless they specifically need raw composition operations
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::normalizer::properties::CanonicalComposition, Struct)]
+ pub struct ICU4XCanonicalComposition(pub CanonicalComposition);
+
+ impl ICU4XCanonicalComposition {
+ /// Construct a new ICU4XCanonicalComposition instance for NFC
+ #[diplomat::rust_link(icu::normalizer::properties::CanonicalComposition::new, FnInStruct)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCanonicalComposition>, ICU4XError> {
+ Ok(Box::new(ICU4XCanonicalComposition(call_constructor!(
+ CanonicalComposition::new [r => Ok(r)],
+ CanonicalComposition::try_new_with_any_provider,
+ CanonicalComposition::try_new_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Performs canonical composition (including Hangul) on a pair of characters
+ /// or returns NUL if these characters don’t compose. Composition exclusions are taken into account.
+ #[diplomat::rust_link(
+ icu::normalizer::properties::CanonicalComposition::compose,
+ FnInStruct
+ )]
+ pub fn compose(&self, starter: char, second: char) -> char {
+ self.0.compose(starter, second).unwrap_or('\0')
+ }
+ }
+
+ /// The outcome of non-recursive canonical decomposition of a character.
+ /// `second` will be NUL when the decomposition expands to a single character
+ /// (which may or may not be the original one)
+ #[diplomat::rust_link(icu::normalizer::properties::Decomposed, Enum)]
+ pub struct ICU4XDecomposed {
+ first: char,
+ second: char,
+ }
+
+ /// The raw (non-recursive) canonical decomposition operation.
+ ///
+ /// Callers should generally use ICU4XDecomposingNormalizer unless they specifically need raw composition operations
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::normalizer::properties::CanonicalDecomposition, Struct)]
+ pub struct ICU4XCanonicalDecomposition(pub CanonicalDecomposition);
+
+ impl ICU4XCanonicalDecomposition {
+ /// Construct a new ICU4XCanonicalDecomposition instance for NFC
+ #[diplomat::rust_link(icu::normalizer::properties::CanonicalDecomposition::new, FnInStruct)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCanonicalDecomposition>, ICU4XError> {
+ Ok(Box::new(ICU4XCanonicalDecomposition(call_constructor!(
+ CanonicalDecomposition::new [r => Ok(r)],
+ CanonicalDecomposition::try_new_with_any_provider,
+ CanonicalDecomposition::try_new_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Performs non-recursive canonical decomposition (including for Hangul).
+ #[diplomat::rust_link(
+ icu::normalizer::properties::CanonicalDecomposition::decompose,
+ FnInStruct
+ )]
+ pub fn decompose(&self, c: char) -> ICU4XDecomposed {
+ match self.0.decompose(c) {
+ Decomposed::Default => ICU4XDecomposed {
+ first: c,
+ second: '\0',
+ },
+ Decomposed::Singleton(s) => ICU4XDecomposed {
+ first: s,
+ second: '\0',
+ },
+ Decomposed::Expansion(first, second) => ICU4XDecomposed { first, second },
+ }
+ }
+ }
+}
diff --git a/intl/icu_capi/src/pluralrules.rs b/intl/icu_capi/src/pluralrules.rs
new file mode 100644
index 0000000000..78720f536e
--- /dev/null
+++ b/intl/icu_capi/src/pluralrules.rs
@@ -0,0 +1,150 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use core::str::{self};
+
+ use alloc::boxed::Box;
+
+ use fixed_decimal::FixedDecimal;
+ use icu_plurals::{PluralCategory, PluralOperands, PluralRules};
+
+ use crate::{locale::ffi::ICU4XLocale, provider::ffi::ICU4XDataProvider};
+
+ use crate::errors::ffi::ICU4XError;
+
+ /// FFI version of `PluralCategory`.
+ #[diplomat::rust_link(icu::plurals::PluralCategory, Enum)]
+ #[diplomat::enum_convert(PluralCategory)]
+ pub enum ICU4XPluralCategory {
+ Zero,
+ One,
+ Two,
+ Few,
+ Many,
+ Other,
+ }
+
+ impl ICU4XPluralCategory {
+ /// Construct from a string in the format
+ /// [specified in TR35](https://unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules)
+ #[diplomat::rust_link(icu::plurals::PluralCategory::get_for_cldr_string, FnInEnum)]
+ #[diplomat::rust_link(icu::plurals::PluralCategory::get_for_cldr_bytes, FnInEnum)]
+ pub fn get_for_cldr_string(s: &str) -> Result<ICU4XPluralCategory, ()> {
+ let s = s.as_bytes(); // #2520
+ PluralCategory::get_for_cldr_bytes(s)
+ .ok_or(())
+ .map(Into::into)
+ }
+ }
+
+ /// FFI version of `PluralRules`.
+ #[diplomat::rust_link(icu::plurals::PluralRules, Struct)]
+ #[diplomat::opaque]
+ pub struct ICU4XPluralRules(PluralRules);
+
+ impl ICU4XPluralRules {
+ /// Construct an [`ICU4XPluralRules`] for the given locale, for cardinal numbers
+ #[diplomat::rust_link(icu::plurals::PluralRules::try_new_cardinal, FnInStruct)]
+ #[diplomat::rust_link(icu::plurals::PluralRules::try_new, FnInStruct, hidden)]
+ #[diplomat::rust_link(icu::plurals::PluralRuleType, Enum, hidden)]
+ pub fn create_cardinal(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ ) -> Result<Box<ICU4XPluralRules>, ICU4XError> {
+ let locale = locale.to_datalocale();
+ Ok(Box::new(ICU4XPluralRules(call_constructor!(
+ PluralRules::try_new_cardinal,
+ PluralRules::try_new_cardinal_with_any_provider,
+ PluralRules::try_new_cardinal_with_buffer_provider,
+ provider,
+ &locale
+ )?)))
+ }
+
+ /// Construct an [`ICU4XPluralRules`] for the given locale, for ordinal numbers
+ #[diplomat::rust_link(icu::plurals::PluralRules::try_new_ordinal, FnInStruct)]
+ #[diplomat::rust_link(icu::plurals::PluralRules::try_new, FnInStruct, hidden)]
+ #[diplomat::rust_link(icu::plurals::PluralRuleType, Enum, hidden)]
+ pub fn create_ordinal(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ ) -> Result<Box<ICU4XPluralRules>, ICU4XError> {
+ let locale = locale.to_datalocale();
+ Ok(Box::new(ICU4XPluralRules(call_constructor!(
+ PluralRules::try_new_ordinal,
+ PluralRules::try_new_ordinal_with_any_provider,
+ PluralRules::try_new_ordinal_with_buffer_provider,
+ provider,
+ &locale
+ )?)))
+ }
+
+ /// Get the category for a given number represented as operands
+ #[diplomat::rust_link(icu::plurals::PluralRules::category_for, FnInStruct)]
+ pub fn category_for(&self, op: &ICU4XPluralOperands) -> ICU4XPluralCategory {
+ self.0.category_for(op.0).into()
+ }
+
+ /// Get all of the categories needed in the current locale
+ #[diplomat::rust_link(icu::plurals::PluralRules::categories, FnInStruct)]
+ pub fn categories(&self) -> ICU4XPluralCategories {
+ ICU4XPluralCategories::from_iter(self.0.categories())
+ }
+ }
+
+ /// FFI version of `PluralOperands`.
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::plurals::PluralOperands, Struct)]
+ pub struct ICU4XPluralOperands(pub icu_plurals::PluralOperands);
+
+ impl ICU4XPluralOperands {
+ /// Construct for a given string representing a number
+ #[diplomat::rust_link(icu::plurals::PluralOperands::from_str, FnInStruct)]
+ pub fn create_from_string(s: &str) -> Result<Box<ICU4XPluralOperands>, ICU4XError> {
+ let s = s.as_bytes(); // #2520
+ Ok(Box::new(ICU4XPluralOperands(PluralOperands::from(
+ // XXX should this have its own errors?
+ &FixedDecimal::try_from(s).map_err(|_| ICU4XError::PluralsParserError)?,
+ ))))
+ }
+ }
+
+ /// FFI version of `PluralRules::categories()` data.
+ pub struct ICU4XPluralCategories {
+ pub zero: bool,
+ pub one: bool,
+ pub two: bool,
+ pub few: bool,
+ pub many: bool,
+ pub other: bool,
+ }
+
+ impl ICU4XPluralCategories {
+ fn from_iter(i: impl Iterator<Item = PluralCategory>) -> Self {
+ i.fold(
+ ICU4XPluralCategories {
+ zero: false,
+ one: false,
+ two: false,
+ few: false,
+ many: false,
+ other: false,
+ },
+ |mut categories, category| {
+ match category {
+ PluralCategory::Zero => categories.zero = true,
+ PluralCategory::One => categories.one = true,
+ PluralCategory::Two => categories.two = true,
+ PluralCategory::Few => categories.few = true,
+ PluralCategory::Many => categories.many = true,
+ PluralCategory::Other => categories.other = true,
+ };
+ categories
+ },
+ )
+ }
+ }
+}
diff --git a/intl/icu_capi/src/properties_iter.rs b/intl/icu_capi/src/properties_iter.rs
new file mode 100644
index 0000000000..e0095789f5
--- /dev/null
+++ b/intl/icu_capi/src/properties_iter.rs
@@ -0,0 +1,48 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+ use core::ops::RangeInclusive;
+
+ /// Result of a single iteration of [`CodePointRangeIterator`].
+ /// Logically can be considered to be an `Option<RangeInclusive<u32>>`,
+ ///
+ /// `start` and `end` represent an inclusive range of code points [start, end],
+ /// and `done` will be true if the iterator has already finished. The last contentful
+ /// iteration will NOT produce a range done=true, in other words `start` and `end` are useful
+ /// values if and only if `done=false`.
+ pub struct CodePointRangeIteratorResult {
+ pub start: u32,
+ pub end: u32,
+ pub done: bool,
+ }
+
+ /// An iterator over code point ranges, produced by `ICU4XCodePointSetData` or
+ /// one of the `ICU4XCodePointMapData` types
+ #[diplomat::opaque]
+ pub struct CodePointRangeIterator<'a>(pub Box<dyn Iterator<Item = RangeInclusive<u32>> + 'a>);
+
+ impl<'a> CodePointRangeIterator<'a> {
+ /// Advance the iterator by one and return the next range.
+ ///
+ /// If the iterator is out of items, `done` will be true
+ #[allow(clippy::should_implement_trait)] // Rust isn't calling this code
+ pub fn next(&mut self) -> CodePointRangeIteratorResult {
+ self.0
+ .next()
+ .map(|r| CodePointRangeIteratorResult {
+ start: *r.start(),
+ end: *r.end(),
+ done: false,
+ })
+ .unwrap_or(CodePointRangeIteratorResult {
+ start: 0,
+ end: 0,
+ done: true,
+ })
+ }
+ }
+}
diff --git a/intl/icu_capi/src/properties_maps.rs b/intl/icu_capi/src/properties_maps.rs
new file mode 100644
index 0000000000..3d5cd6dfce
--- /dev/null
+++ b/intl/icu_capi/src/properties_maps.rs
@@ -0,0 +1,311 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::provider::ffi::ICU4XDataProvider;
+ use alloc::boxed::Box;
+ use icu_collections::codepointtrie::TrieValue;
+ use icu_properties::{maps, GeneralCategory, GeneralCategoryGroup};
+
+ use crate::errors::ffi::ICU4XError;
+ use crate::properties_iter::ffi::CodePointRangeIterator;
+ use crate::properties_sets::ffi::ICU4XCodePointSetData;
+
+ #[diplomat::opaque]
+ /// An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property.
+ ///
+ /// For properties whose values fit into 8 bits.
+ #[diplomat::rust_link(icu::properties, Mod)]
+ #[diplomat::rust_link(icu::properties::maps::CodePointMapData, Struct)]
+ #[diplomat::rust_link(icu::properties::maps::CodePointMapData::from_data, FnInStruct, hidden)]
+ #[diplomat::rust_link(
+ icu::properties::maps::CodePointMapData::try_into_converted,
+ FnInStruct,
+ hidden
+ )]
+ #[diplomat::rust_link(icu::properties::maps::CodePointMapDataBorrowed, Struct)]
+ pub struct ICU4XCodePointMapData8(maps::CodePointMapData<u8>);
+
+ fn convert_8<P: TrieValue>(data: maps::CodePointMapData<P>) -> Box<ICU4XCodePointMapData8> {
+ #[allow(clippy::expect_used)] // infallible for the chosen properties
+ Box::new(ICU4XCodePointMapData8(
+ data.try_into_converted()
+ .expect("try_into_converted to u8 must be infallible"),
+ ))
+ }
+
+ impl ICU4XCodePointMapData8 {
+ /// Gets the value for a code point.
+ #[diplomat::rust_link(icu::properties::maps::CodePointMapDataBorrowed::get, FnInStruct)]
+ pub fn get(&self, cp: char) -> u8 {
+ self.0.as_borrowed().get(cp)
+ }
+
+ /// Gets the value for a code point (specified as a 32 bit integer, in UTF-32)
+ #[diplomat::rust_link(
+ icu::properties::maps::CodePointMapDataBorrowed::get32,
+ FnInStruct,
+ hidden
+ )]
+ pub fn get32(&self, cp: u32) -> u8 {
+ self.0.as_borrowed().get32(cp)
+ }
+
+ /// Converts a general category to its corresponding mask value
+ ///
+ /// Nonexistant general categories will map to the empty mask
+ #[diplomat::rust_link(icu::properties::GeneralCategoryGroup, Struct)]
+ pub fn general_category_to_mask(gc: u8) -> u32 {
+ if let Ok(gc) = GeneralCategory::try_from(gc) {
+ let group: GeneralCategoryGroup = gc.into();
+ group.into()
+ } else {
+ 0
+ }
+ }
+
+ /// Produces an iterator over ranges of code points that map to `value`
+ #[diplomat::rust_link(
+ icu::properties::maps::CodePointMapDataBorrowed::iter_ranges_for_value,
+ FnInStruct
+ )]
+ pub fn iter_ranges_for_value<'a>(&'a self, value: u8) -> Box<CodePointRangeIterator<'a>> {
+ Box::new(CodePointRangeIterator(Box::new(
+ self.0.as_borrowed().iter_ranges_for_value(value),
+ )))
+ }
+
+ /// Produces an iterator over ranges of code points that do not map to `value`
+ #[diplomat::rust_link(
+ icu::properties::maps::CodePointMapDataBorrowed::iter_ranges_for_value_complemented,
+ FnInStruct
+ )]
+ pub fn iter_ranges_for_value_complemented<'a>(
+ &'a self,
+ value: u8,
+ ) -> Box<CodePointRangeIterator<'a>> {
+ Box::new(CodePointRangeIterator(Box::new(
+ self.0
+ .as_borrowed()
+ .iter_ranges_for_value_complemented(value),
+ )))
+ }
+
+ /// Given a mask value (the nth bit marks property value = n), produce an iterator over ranges of code points
+ /// whose property values are contained in the mask.
+ ///
+ /// The main mask property supported is that for General_Category, which can be obtained via `general_category_to_mask()` or
+ /// by using `ICU4XGeneralCategoryNameToMaskMapper`
+ ///
+ /// Should only be used on maps for properties with values less than 32 (like Generak_Category),
+ /// other maps will have unpredictable results
+ #[diplomat::rust_link(
+ icu::properties::maps::CodePointMapDataBorrowed::iter_ranges_for_group,
+ FnInStruct
+ )]
+ pub fn iter_ranges_for_mask<'a>(&'a self, mask: u32) -> Box<CodePointRangeIterator<'a>> {
+ let ranges = self
+ .0
+ .as_borrowed()
+ .iter_ranges_mapped(move |v| {
+ let val_mask = 1_u32.checked_shl(v.into()).unwrap_or(0);
+ val_mask & mask != 0
+ })
+ .filter(|v| v.value)
+ .map(|v| v.range);
+ Box::new(CodePointRangeIterator(Box::new(ranges)))
+ }
+
+ /// Gets a [`ICU4XCodePointSetData`] representing all entries in this map that map to the given value
+ #[diplomat::rust_link(
+ icu::properties::maps::CodePointMapDataBorrowed::get_set_for_value,
+ FnInStruct
+ )]
+ pub fn get_set_for_value(&self, value: u8) -> Box<ICU4XCodePointSetData> {
+ Box::new(ICU4XCodePointSetData(
+ self.0.as_borrowed().get_set_for_value(value),
+ ))
+ }
+
+ #[diplomat::rust_link(icu::properties::maps::general_category, Fn)]
+ #[diplomat::rust_link(icu::properties::maps::load_general_category, Fn, hidden)]
+ pub fn load_general_category(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointMapData8>, ICU4XError> {
+ Ok(convert_8(call_constructor_unstable!(
+ maps::general_category [r => Ok(r.static_to_owned())],
+ maps::load_general_category,
+ provider,
+ )?))
+ }
+
+ #[diplomat::rust_link(icu::properties::maps::bidi_class, Fn)]
+ #[diplomat::rust_link(icu::properties::maps::load_bidi_class, Fn, hidden)]
+ pub fn load_bidi_class(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointMapData8>, ICU4XError> {
+ Ok(convert_8(call_constructor_unstable!(
+ maps::bidi_class [r => Ok(r.static_to_owned())],
+ maps::load_bidi_class,
+ provider,
+ )?))
+ }
+
+ #[diplomat::rust_link(icu::properties::maps::east_asian_width, Fn)]
+ #[diplomat::rust_link(icu::properties::maps::load_east_asian_width, Fn, hidden)]
+ pub fn load_east_asian_width(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointMapData8>, ICU4XError> {
+ Ok(convert_8(call_constructor_unstable!(
+ maps::east_asian_width [r => Ok(r.static_to_owned())],
+ maps::load_east_asian_width,
+ provider,
+ )?))
+ }
+
+ #[diplomat::rust_link(icu::properties::maps::indic_syllabic_category, Fn)]
+ #[diplomat::rust_link(icu::properties::maps::load_indic_syllabic_category, Fn, hidden)]
+ pub fn load_indic_syllabic_category(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointMapData8>, ICU4XError> {
+ Ok(convert_8(call_constructor_unstable!(
+ maps::indic_syllabic_category [r => Ok(r.static_to_owned())],
+ maps::load_indic_syllabic_category,
+ provider,
+ )?))
+ }
+
+ #[diplomat::rust_link(icu::properties::maps::line_break, Fn)]
+ #[diplomat::rust_link(icu::properties::maps::load_line_break, Fn, hidden)]
+ pub fn load_line_break(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointMapData8>, ICU4XError> {
+ Ok(convert_8(call_constructor_unstable!(
+ maps::line_break [r => Ok(r.static_to_owned())],
+ maps::load_line_break,
+ provider,
+ )?))
+ }
+
+ #[diplomat::rust_link(icu::properties::maps::grapheme_cluster_break, Fn)]
+ #[diplomat::rust_link(icu::properties::maps::load_grapheme_cluster_break, Fn, hidden)]
+ #[diplomat::attr(dart, rename = "grapheme_cluster_break")]
+ pub fn try_grapheme_cluster_break(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointMapData8>, ICU4XError> {
+ Ok(convert_8(call_constructor_unstable!(
+ maps::grapheme_cluster_break [r => Ok(r.static_to_owned())],
+ maps::load_grapheme_cluster_break,
+ provider,
+ )?))
+ }
+
+ #[diplomat::rust_link(icu::properties::maps::word_break, Fn)]
+ #[diplomat::rust_link(icu::properties::maps::load_word_break, Fn, hidden)]
+ pub fn load_word_break(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointMapData8>, ICU4XError> {
+ Ok(convert_8(call_constructor_unstable!(
+ maps::word_break [r => Ok(r.static_to_owned())],
+ maps::load_word_break,
+ provider,
+ )?))
+ }
+
+ #[diplomat::rust_link(icu::properties::maps::sentence_break, Fn)]
+ #[diplomat::rust_link(icu::properties::maps::load_sentence_break, Fn, hidden)]
+ pub fn load_sentence_break(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointMapData8>, ICU4XError> {
+ Ok(convert_8(call_constructor_unstable!(
+ maps::sentence_break [r => Ok(r.static_to_owned())],
+ maps::load_sentence_break,
+ provider,
+ )?))
+ }
+ }
+
+ #[diplomat::opaque]
+ /// An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property.
+ ///
+ /// For properties whose values fit into 16 bits.
+ #[diplomat::rust_link(icu::properties, Mod)]
+ #[diplomat::rust_link(icu::properties::maps::CodePointMapData, Struct)]
+ #[diplomat::rust_link(icu::properties::maps::CodePointMapDataBorrowed, Struct)]
+ pub struct ICU4XCodePointMapData16(maps::CodePointMapData<u16>);
+
+ impl ICU4XCodePointMapData16 {
+ /// Gets the value for a code point.
+ #[diplomat::rust_link(icu::properties::maps::CodePointMapDataBorrowed::get, FnInStruct)]
+ pub fn get(&self, cp: char) -> u16 {
+ self.0.as_borrowed().get(cp)
+ }
+
+ /// Gets the value for a code point (specified as a 32 bit integer, in UTF-32)
+ #[diplomat::rust_link(
+ icu::properties::maps::CodePointMapDataBorrowed::get32,
+ FnInStruct,
+ hidden
+ )]
+ pub fn get32(&self, cp: u32) -> u16 {
+ self.0.as_borrowed().get32(cp)
+ }
+
+ /// Produces an iterator over ranges of code points that map to `value`
+ #[diplomat::rust_link(
+ icu::properties::maps::CodePointMapDataBorrowed::iter_ranges_for_value,
+ FnInStruct
+ )]
+ pub fn iter_ranges_for_value<'a>(&'a self, value: u16) -> Box<CodePointRangeIterator<'a>> {
+ Box::new(CodePointRangeIterator(Box::new(
+ self.0.as_borrowed().iter_ranges_for_value(value),
+ )))
+ }
+
+ /// Produces an iterator over ranges of code points that do not map to `value`
+ #[diplomat::rust_link(
+ icu::properties::maps::CodePointMapDataBorrowed::iter_ranges_for_value_complemented,
+ FnInStruct
+ )]
+ pub fn iter_ranges_for_value_complemented<'a>(
+ &'a self,
+ value: u16,
+ ) -> Box<CodePointRangeIterator<'a>> {
+ Box::new(CodePointRangeIterator(Box::new(
+ self.0
+ .as_borrowed()
+ .iter_ranges_for_value_complemented(value),
+ )))
+ }
+
+ /// Gets a [`ICU4XCodePointSetData`] representing all entries in this map that map to the given value
+ #[diplomat::rust_link(
+ icu::properties::maps::CodePointMapDataBorrowed::get_set_for_value,
+ FnInStruct
+ )]
+ pub fn get_set_for_value(&self, value: u16) -> Box<ICU4XCodePointSetData> {
+ Box::new(ICU4XCodePointSetData(
+ self.0.as_borrowed().get_set_for_value(value),
+ ))
+ }
+
+ #[diplomat::rust_link(icu::properties::maps::script, Fn)]
+ #[diplomat::rust_link(icu::properties::maps::load_script, Fn, hidden)]
+ pub fn load_script(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointMapData16>, ICU4XError> {
+ #[allow(clippy::expect_used)] // script is a 16-bit property
+ Ok(Box::new(ICU4XCodePointMapData16(
+ call_constructor_unstable!(
+ maps::script [r => Ok(r.static_to_owned())],
+ maps::load_script,
+ provider,
+ )?
+ .try_into_converted()
+ .expect("try_into_converted to u16 must be infallible"),
+ )))
+ }
+ }
+}
diff --git a/intl/icu_capi/src/properties_names.rs b/intl/icu_capi/src/properties_names.rs
new file mode 100644
index 0000000000..a5ab0e143a
--- /dev/null
+++ b/intl/icu_capi/src/properties_names.rs
@@ -0,0 +1,259 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::provider::ffi::ICU4XDataProvider;
+ use alloc::boxed::Box;
+ use icu_properties::{
+ names::PropertyValueNameToEnumMapper, BidiClass, EastAsianWidth, GeneralCategory,
+ GeneralCategoryGroup, GraphemeClusterBreak, IndicSyllabicCategory, LineBreak, Script,
+ SentenceBreak, WordBreak,
+ };
+
+ use crate::errors::ffi::ICU4XError;
+
+ /// A type capable of looking up a property value from a string name.
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::properties::names::PropertyValueNameToEnumMapper, Struct)]
+ #[diplomat::rust_link(icu::properties::names::PropertyValueNameToEnumMapperBorrowed, Struct)]
+ #[diplomat::rust_link(
+ icu::properties::names::PropertyValueNameToEnumMapper::from_data,
+ FnInStruct,
+ hidden
+ )]
+ pub struct ICU4XPropertyValueNameToEnumMapper(PropertyValueNameToEnumMapper<u16>);
+
+ impl ICU4XPropertyValueNameToEnumMapper {
+ /// Get the property value matching the given name, using strict matching
+ ///
+ /// Returns -1 if the name is unknown for this property
+ #[diplomat::rust_link(
+ icu::properties::names::PropertyValueNameToEnumMapperBorrowed::get_strict,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::properties::names::PropertyValueNameToEnumMapperBorrowed::get_strict_u16,
+ FnInStruct,
+ hidden
+ )]
+ pub fn get_strict(&self, name: &str) -> i16 {
+ self.0
+ .as_borrowed()
+ .get_strict(name)
+ .map(|x| x as i16)
+ .unwrap_or(-1)
+ }
+
+ /// Get the property value matching the given name, using loose matching
+ ///
+ /// Returns -1 if the name is unknown for this property
+ #[diplomat::rust_link(
+ icu::properties::names::PropertyValueNameToEnumMapperBorrowed::get_loose,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::properties::names::PropertyValueNameToEnumMapperBorrowed::get_loose_u16,
+ FnInStruct,
+ hidden
+ )]
+ pub fn get_loose(&self, name: &str) -> i16 {
+ self.0
+ .as_borrowed()
+ .get_loose(name)
+ .map(|x| x as i16)
+ .unwrap_or(-1)
+ }
+
+ #[diplomat::rust_link(
+ icu::properties::GeneralCategory::get_name_to_enum_mapper,
+ FnInStruct
+ )]
+ pub fn load_general_category(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XPropertyValueNameToEnumMapper>, ICU4XError> {
+ Ok(Box::new(ICU4XPropertyValueNameToEnumMapper(
+ call_constructor_unstable!(
+ GeneralCategory::name_to_enum_mapper [r => Ok(r.static_to_owned())],
+ GeneralCategory::get_name_to_enum_mapper,
+ provider,
+ )?
+ .erase(),
+ )))
+ }
+
+ #[diplomat::rust_link(icu::properties::BidiClass::name_to_enum_mapper, FnInStruct)]
+ pub fn load_bidi_class(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XPropertyValueNameToEnumMapper>, ICU4XError> {
+ Ok(Box::new(ICU4XPropertyValueNameToEnumMapper(
+ call_constructor_unstable!(
+ BidiClass::name_to_enum_mapper [r => Ok(r.static_to_owned())],
+ BidiClass::get_name_to_enum_mapper,
+ provider,
+ )?
+ .erase(),
+ )))
+ }
+
+ #[diplomat::rust_link(icu::properties::EastAsianWidth::name_to_enum_mapper, FnInStruct)]
+ pub fn load_east_asian_width(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XPropertyValueNameToEnumMapper>, ICU4XError> {
+ Ok(Box::new(ICU4XPropertyValueNameToEnumMapper(
+ call_constructor_unstable!(
+ EastAsianWidth::name_to_enum_mapper [r => Ok(r.static_to_owned())],
+ EastAsianWidth::get_name_to_enum_mapper,
+ provider,
+ )?
+ .erase(),
+ )))
+ }
+
+ #[diplomat::rust_link(
+ icu::properties::IndicSyllabicCategory::name_to_enum_mapper,
+ FnInStruct
+ )]
+ pub fn load_indic_syllabic_category(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XPropertyValueNameToEnumMapper>, ICU4XError> {
+ Ok(Box::new(ICU4XPropertyValueNameToEnumMapper(
+ call_constructor_unstable!(
+ IndicSyllabicCategory::name_to_enum_mapper [r => Ok(r.static_to_owned())],
+ IndicSyllabicCategory::get_name_to_enum_mapper,
+ provider,
+ )?
+ .erase(),
+ )))
+ }
+
+ #[diplomat::rust_link(icu::properties::LineBreak::name_to_enum_mapper, FnInStruct)]
+ pub fn load_line_break(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XPropertyValueNameToEnumMapper>, ICU4XError> {
+ Ok(Box::new(ICU4XPropertyValueNameToEnumMapper(
+ call_constructor_unstable!(
+ LineBreak::name_to_enum_mapper [r => Ok(r.static_to_owned())],
+ LineBreak::get_name_to_enum_mapper,
+ provider,
+ )?
+ .erase(),
+ )))
+ }
+
+ #[diplomat::rust_link(
+ icu::properties::GraphemeClusterBreak::get_name_to_enum_mapper,
+ FnInStruct
+ )]
+ pub fn load_grapheme_cluster_break(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XPropertyValueNameToEnumMapper>, ICU4XError> {
+ Ok(Box::new(ICU4XPropertyValueNameToEnumMapper(
+ call_constructor_unstable!(
+ GraphemeClusterBreak::name_to_enum_mapper [r => Ok(r.static_to_owned())],
+ GraphemeClusterBreak::get_name_to_enum_mapper,
+ provider,
+ )?
+ .erase(),
+ )))
+ }
+
+ #[diplomat::rust_link(icu::properties::WordBreak::name_to_enum_mapper, FnInStruct)]
+ pub fn load_word_break(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XPropertyValueNameToEnumMapper>, ICU4XError> {
+ Ok(Box::new(ICU4XPropertyValueNameToEnumMapper(
+ call_constructor_unstable!(
+ WordBreak::name_to_enum_mapper [r => Ok(r.static_to_owned())],
+ WordBreak::get_name_to_enum_mapper,
+ provider,
+ )?
+ .erase(),
+ )))
+ }
+
+ #[diplomat::rust_link(icu::properties::SentenceBreak::name_to_enum_mapper, FnInStruct)]
+ pub fn load_sentence_break(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XPropertyValueNameToEnumMapper>, ICU4XError> {
+ Ok(Box::new(ICU4XPropertyValueNameToEnumMapper(
+ call_constructor_unstable!(
+ SentenceBreak::name_to_enum_mapper [r => Ok(r.static_to_owned())],
+ SentenceBreak::get_name_to_enum_mapper,
+ provider,
+ )?
+ .erase(),
+ )))
+ }
+
+ #[diplomat::rust_link(icu::properties::Script::name_to_enum_mapper, FnInStruct)]
+ pub fn load_script(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XPropertyValueNameToEnumMapper>, ICU4XError> {
+ Ok(Box::new(ICU4XPropertyValueNameToEnumMapper(
+ call_constructor_unstable!(
+ Script::name_to_enum_mapper [r => Ok(r.static_to_owned())],
+ Script::get_name_to_enum_mapper,
+ provider,
+ )?
+ .erase(),
+ )))
+ }
+ }
+
+ /// A type capable of looking up General Category mask values from a string name.
+ #[diplomat::opaque]
+ #[diplomat::rust_link(
+ icu::properties::GeneralCategoryGroup::get_name_to_enum_mapper,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(icu::properties::names::PropertyValueNameToEnumMapper, Struct)]
+ pub struct ICU4XGeneralCategoryNameToMaskMapper(
+ PropertyValueNameToEnumMapper<GeneralCategoryGroup>,
+ );
+
+ impl ICU4XGeneralCategoryNameToMaskMapper {
+ /// Get the mask value matching the given name, using strict matching
+ ///
+ /// Returns 0 if the name is unknown for this property
+ // #[diplomat::rust_link(icu::properties::maps::PropertyValueNameToEnumMapperBorrowed::get_strict, FnInStruct)]
+ // #[diplomat::rust_link(icu::properties::maps::PropertyValueNameToEnumMapperBorrowed::get_strict_u16, FnInStruct, hidden)]
+ pub fn get_strict(&self, name: &str) -> u32 {
+ self.0
+ .as_borrowed()
+ .get_strict(name)
+ .map(Into::into)
+ .unwrap_or(0)
+ }
+
+ /// Get the mask value matching the given name, using loose matching
+ ///
+ /// Returns 0 if the name is unknown for this property
+ // #[diplomat::rust_link(icu::properties::maps::PropertyValueNameToEnumMapperBorrowed::get_loose, FnInStruct)]
+ // #[diplomat::rust_link(icu::properties::maps::PropertyValueNameToEnumMapperBorrowed::get_loose_u16, FnInStruct, hidden)]
+ pub fn get_loose(&self, name: &str) -> u32 {
+ self.0
+ .as_borrowed()
+ .get_loose(name)
+ .map(Into::into)
+ .unwrap_or(0)
+ }
+
+ #[diplomat::rust_link(
+ icu::properties::GeneralCategoryGroup::get_name_to_enum_mapper,
+ FnInStruct
+ )]
+ pub fn load(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XGeneralCategoryNameToMaskMapper>, ICU4XError> {
+ Ok(Box::new(ICU4XGeneralCategoryNameToMaskMapper(
+ call_constructor_unstable!(
+ GeneralCategoryGroup::name_to_enum_mapper [r => Ok(r.static_to_owned())],
+ GeneralCategoryGroup::get_name_to_enum_mapper,
+ provider,
+ )?,
+ )))
+ }
+ }
+}
diff --git a/intl/icu_capi/src/properties_sets.rs b/intl/icu_capi/src/properties_sets.rs
new file mode 100644
index 0000000000..af14b9cbc8
--- /dev/null
+++ b/intl/icu_capi/src/properties_sets.rs
@@ -0,0 +1,887 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::provider::ffi::ICU4XDataProvider;
+ use alloc::boxed::Box;
+ use core::str;
+ use icu_properties::sets;
+
+ use crate::errors::ffi::ICU4XError;
+ use crate::properties_iter::ffi::CodePointRangeIterator;
+
+ #[diplomat::opaque]
+ /// An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property.
+ #[diplomat::rust_link(icu::properties, Mod)]
+ #[diplomat::rust_link(icu::properties::sets::CodePointSetData, Struct)]
+ #[diplomat::rust_link(icu::properties::sets::CodePointSetData::from_data, FnInStruct, hidden)]
+ #[diplomat::rust_link(icu::properties::sets::CodePointSetDataBorrowed, Struct)]
+ pub struct ICU4XCodePointSetData(pub sets::CodePointSetData);
+
+ impl ICU4XCodePointSetData {
+ /// Checks whether the code point is in the set.
+ #[diplomat::rust_link(
+ icu::properties::sets::CodePointSetDataBorrowed::contains,
+ FnInStruct
+ )]
+ pub fn contains(&self, cp: char) -> bool {
+ self.0.as_borrowed().contains(cp)
+ }
+ /// Checks whether the code point (specified as a 32 bit integer, in UTF-32) is in the set.
+ #[diplomat::rust_link(
+ icu::properties::sets::CodePointSetDataBorrowed::contains32,
+ FnInStruct,
+ hidden
+ )]
+ #[diplomat::attr(dart, disable)]
+ pub fn contains32(&self, cp: u32) -> bool {
+ self.0.as_borrowed().contains32(cp)
+ }
+
+ /// Produces an iterator over ranges of code points contained in this set
+ #[diplomat::rust_link(
+ icu::properties::sets::CodePointSetDataBorrowed::iter_ranges,
+ FnInStruct
+ )]
+ pub fn iter_ranges<'a>(&'a self) -> Box<CodePointRangeIterator<'a>> {
+ Box::new(CodePointRangeIterator(Box::new(
+ self.0.as_borrowed().iter_ranges(),
+ )))
+ }
+
+ /// Produces an iterator over ranges of code points not contained in this set
+ #[diplomat::rust_link(
+ icu::properties::sets::CodePointSetDataBorrowed::iter_ranges_complemented,
+ FnInStruct
+ )]
+ pub fn iter_ranges_complemented<'a>(&'a self) -> Box<CodePointRangeIterator<'a>> {
+ Box::new(CodePointRangeIterator(Box::new(
+ self.0.as_borrowed().iter_ranges_complemented(),
+ )))
+ }
+
+ /// which is a mask with the same format as the `U_GC_XX_MASK` mask in ICU4C
+ #[diplomat::rust_link(icu::properties::sets::for_general_category_group, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_for_general_category_group, Fn, hidden)]
+ pub fn load_for_general_category_group(
+ provider: &ICU4XDataProvider,
+ group: u32,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::for_general_category_group [r => Ok(r)],
+ sets::load_for_general_category_group,
+ provider,
+ group.into(),
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::ascii_hex_digit, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_ascii_hex_digit, Fn, hidden)]
+ pub fn load_ascii_hex_digit(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::ascii_hex_digit [r => Ok(r.static_to_owned())],
+ sets::load_ascii_hex_digit,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::alnum, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_alnum, Fn, hidden)]
+ pub fn load_alnum(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::alnum [r => Ok(r.static_to_owned())],
+ sets::load_alnum,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::alphabetic, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_alphabetic, Fn, hidden)]
+ pub fn load_alphabetic(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::alphabetic [r => Ok(r.static_to_owned())],
+ sets::load_alphabetic,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::bidi_control, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_bidi_control, Fn, hidden)]
+ pub fn load_bidi_control(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::bidi_control [r => Ok(r.static_to_owned())],
+ sets::load_bidi_control,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::bidi_mirrored, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_bidi_mirrored, Fn, hidden)]
+ pub fn load_bidi_mirrored(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::bidi_mirrored [r => Ok(r.static_to_owned())],
+ sets::load_bidi_mirrored,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::blank, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_blank, Fn, hidden)]
+ pub fn load_blank(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::blank [r => Ok(r.static_to_owned())],
+ sets::load_blank,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::cased, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_cased, Fn, hidden)]
+ pub fn load_cased(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::cased [r => Ok(r.static_to_owned())],
+ sets::load_cased,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::case_ignorable, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_case_ignorable, Fn, hidden)]
+ pub fn load_case_ignorable(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::case_ignorable [r => Ok(r.static_to_owned())],
+ sets::load_case_ignorable,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::full_composition_exclusion, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_full_composition_exclusion, Fn, hidden)]
+ pub fn load_full_composition_exclusion(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::full_composition_exclusion [r => Ok(r.static_to_owned())],
+ sets::load_full_composition_exclusion,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::changes_when_casefolded, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_changes_when_casefolded, Fn, hidden)]
+ pub fn load_changes_when_casefolded(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::changes_when_casefolded [r => Ok(r.static_to_owned())],
+ sets::load_changes_when_casefolded,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::changes_when_casemapped, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_changes_when_casemapped, Fn, hidden)]
+ pub fn load_changes_when_casemapped(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::changes_when_casemapped [r => Ok(r.static_to_owned())],
+ sets::load_changes_when_casemapped,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::changes_when_nfkc_casefolded, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_changes_when_nfkc_casefolded, Fn, hidden)]
+ pub fn load_changes_when_nfkc_casefolded(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::changes_when_nfkc_casefolded [r => Ok(r.static_to_owned())],
+ sets::load_changes_when_nfkc_casefolded,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::changes_when_lowercased, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_changes_when_lowercased, Fn, hidden)]
+ pub fn load_changes_when_lowercased(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::changes_when_lowercased [r => Ok(r.static_to_owned())],
+ sets::load_changes_when_lowercased,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::changes_when_titlecased, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_changes_when_titlecased, Fn, hidden)]
+ pub fn load_changes_when_titlecased(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::changes_when_titlecased [r => Ok(r.static_to_owned())],
+ sets::load_changes_when_titlecased,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::changes_when_uppercased, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_changes_when_uppercased, Fn, hidden)]
+ pub fn load_changes_when_uppercased(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::changes_when_uppercased [r => Ok(r.static_to_owned())],
+ sets::load_changes_when_uppercased,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::dash, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_dash, Fn, hidden)]
+ pub fn load_dash(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::dash [r => Ok(r.static_to_owned())],
+ sets::load_dash,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::deprecated, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_deprecated, Fn, hidden)]
+ pub fn load_deprecated(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::deprecated [r => Ok(r.static_to_owned())],
+ sets::load_deprecated,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::default_ignorable_code_point, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_default_ignorable_code_point, Fn, hidden)]
+ pub fn load_default_ignorable_code_point(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::default_ignorable_code_point [r => Ok(r.static_to_owned())],
+ sets::load_default_ignorable_code_point,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::diacritic, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_diacritic, Fn, hidden)]
+ pub fn load_diacritic(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::diacritic [r => Ok(r.static_to_owned())],
+ sets::load_diacritic,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::emoji_modifier_base, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_emoji_modifier_base, Fn, hidden)]
+ pub fn load_emoji_modifier_base(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::emoji_modifier_base [r => Ok(r.static_to_owned())],
+ sets::load_emoji_modifier_base,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::emoji_component, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_emoji_component, Fn, hidden)]
+ pub fn load_emoji_component(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::emoji_component [r => Ok(r.static_to_owned())],
+ sets::load_emoji_component,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::emoji_modifier, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_emoji_modifier, Fn, hidden)]
+ pub fn load_emoji_modifier(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::emoji_modifier [r => Ok(r.static_to_owned())],
+ sets::load_emoji_modifier,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::emoji, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_emoji, Fn, hidden)]
+ pub fn load_emoji(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::emoji [r => Ok(r.static_to_owned())],
+ sets::load_emoji,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::emoji_presentation, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_emoji_presentation, Fn, hidden)]
+ pub fn load_emoji_presentation(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::emoji_presentation [r => Ok(r.static_to_owned())],
+ sets::load_emoji_presentation,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::extender, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_extender, Fn, hidden)]
+ pub fn load_extender(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::extender [r => Ok(r.static_to_owned())],
+ sets::load_extender,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::extended_pictographic, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_extended_pictographic, Fn, hidden)]
+ pub fn load_extended_pictographic(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::extended_pictographic [r => Ok(r.static_to_owned())],
+ sets::load_extended_pictographic,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::graph, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_graph, Fn, hidden)]
+ pub fn load_graph(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::graph [r => Ok(r.static_to_owned())],
+ sets::load_graph,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::grapheme_base, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_grapheme_base, Fn, hidden)]
+ pub fn load_grapheme_base(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::grapheme_base [r => Ok(r.static_to_owned())],
+ sets::load_grapheme_base,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::grapheme_extend, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_grapheme_extend, Fn, hidden)]
+ pub fn load_grapheme_extend(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::grapheme_extend [r => Ok(r.static_to_owned())],
+ sets::load_grapheme_extend,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::grapheme_link, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_grapheme_link, Fn, hidden)]
+ pub fn load_grapheme_link(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::grapheme_link [r => Ok(r.static_to_owned())],
+ sets::load_grapheme_link,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::hex_digit, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_hex_digit, Fn, hidden)]
+ pub fn load_hex_digit(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::hex_digit [r => Ok(r.static_to_owned())],
+ sets::load_hex_digit,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::hyphen, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_hyphen, Fn, hidden)]
+ pub fn load_hyphen(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::hyphen [r => Ok(r.static_to_owned())],
+ sets::load_hyphen,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::id_continue, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_id_continue, Fn, hidden)]
+ pub fn load_id_continue(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::id_continue [r => Ok(r.static_to_owned())],
+ sets::load_id_continue,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::ideographic, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_ideographic, Fn, hidden)]
+ pub fn load_ideographic(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::ideographic [r => Ok(r.static_to_owned())],
+ sets::load_ideographic,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::id_start, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_id_start, Fn, hidden)]
+ pub fn load_id_start(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::id_start [r => Ok(r.static_to_owned())],
+ sets::load_id_start,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::ids_binary_operator, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_ids_binary_operator, Fn, hidden)]
+ pub fn load_ids_binary_operator(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::ids_binary_operator [r => Ok(r.static_to_owned())],
+ sets::load_ids_binary_operator,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::ids_trinary_operator, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_ids_trinary_operator, Fn, hidden)]
+ pub fn load_ids_trinary_operator(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::ids_trinary_operator [r => Ok(r.static_to_owned())],
+ sets::load_ids_trinary_operator,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::join_control, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_join_control, Fn, hidden)]
+ pub fn load_join_control(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::join_control [r => Ok(r.static_to_owned())],
+ sets::load_join_control,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::logical_order_exception, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_logical_order_exception, Fn, hidden)]
+ pub fn load_logical_order_exception(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::logical_order_exception [r => Ok(r.static_to_owned())],
+ sets::load_logical_order_exception,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::lowercase, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_lowercase, Fn, hidden)]
+ pub fn load_lowercase(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::lowercase [r => Ok(r.static_to_owned())],
+ sets::load_lowercase,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::math, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_math, Fn, hidden)]
+ pub fn load_math(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::math [r => Ok(r.static_to_owned())],
+ sets::load_math,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::noncharacter_code_point, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_noncharacter_code_point, Fn, hidden)]
+ pub fn load_noncharacter_code_point(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::noncharacter_code_point [r => Ok(r.static_to_owned())],
+ sets::load_noncharacter_code_point,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::nfc_inert, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_nfc_inert, Fn, hidden)]
+ pub fn load_nfc_inert(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::nfc_inert [r => Ok(r.static_to_owned())],
+ sets::load_nfc_inert,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::nfd_inert, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_nfd_inert, Fn, hidden)]
+ pub fn load_nfd_inert(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::nfd_inert [r => Ok(r.static_to_owned())],
+ sets::load_nfd_inert,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::nfkc_inert, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_nfkc_inert, Fn, hidden)]
+ pub fn load_nfkc_inert(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::nfkc_inert [r => Ok(r.static_to_owned())],
+ sets::load_nfkc_inert,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::nfkd_inert, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_nfkd_inert, Fn, hidden)]
+ pub fn load_nfkd_inert(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::nfkd_inert [r => Ok(r.static_to_owned())],
+ sets::load_nfkd_inert,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::pattern_syntax, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_pattern_syntax, Fn, hidden)]
+ pub fn load_pattern_syntax(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::pattern_syntax [r => Ok(r.static_to_owned())],
+ sets::load_pattern_syntax,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::pattern_white_space, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_pattern_white_space, Fn, hidden)]
+ pub fn load_pattern_white_space(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::pattern_white_space [r => Ok(r.static_to_owned())],
+ sets::load_pattern_white_space,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::prepended_concatenation_mark, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_prepended_concatenation_mark, Fn, hidden)]
+ pub fn load_prepended_concatenation_mark(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::prepended_concatenation_mark [r => Ok(r.static_to_owned())],
+ sets::load_prepended_concatenation_mark,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::print, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_print, Fn, hidden)]
+ pub fn load_print(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::print [r => Ok(r.static_to_owned())],
+ sets::load_print,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::quotation_mark, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_quotation_mark, Fn, hidden)]
+ pub fn load_quotation_mark(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::quotation_mark [r => Ok(r.static_to_owned())],
+ sets::load_quotation_mark,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::radical, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_radical, Fn, hidden)]
+ pub fn load_radical(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::radical [r => Ok(r.static_to_owned())],
+ sets::load_radical,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::regional_indicator, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_regional_indicator, Fn, hidden)]
+ pub fn load_regional_indicator(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::regional_indicator [r => Ok(r.static_to_owned())],
+ sets::load_regional_indicator,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::soft_dotted, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_soft_dotted, Fn, hidden)]
+ pub fn load_soft_dotted(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::soft_dotted [r => Ok(r.static_to_owned())],
+ sets::load_soft_dotted,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::segment_starter, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_segment_starter, Fn, hidden)]
+ pub fn load_segment_starter(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::segment_starter [r => Ok(r.static_to_owned())],
+ sets::load_segment_starter,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::case_sensitive, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_case_sensitive, Fn, hidden)]
+ pub fn load_case_sensitive(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::case_sensitive [r => Ok(r.static_to_owned())],
+ sets::load_case_sensitive,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::sentence_terminal, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_sentence_terminal, Fn, hidden)]
+ pub fn load_sentence_terminal(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::sentence_terminal [r => Ok(r.static_to_owned())],
+ sets::load_sentence_terminal,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::terminal_punctuation, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_terminal_punctuation, Fn, hidden)]
+ pub fn load_terminal_punctuation(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::terminal_punctuation [r => Ok(r.static_to_owned())],
+ sets::load_terminal_punctuation,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::unified_ideograph, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_unified_ideograph, Fn, hidden)]
+ pub fn load_unified_ideograph(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::unified_ideograph [r => Ok(r.static_to_owned())],
+ sets::load_unified_ideograph,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::uppercase, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_uppercase, Fn, hidden)]
+ pub fn load_uppercase(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::uppercase [r => Ok(r.static_to_owned())],
+ sets::load_uppercase,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::variation_selector, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_variation_selector, Fn, hidden)]
+ pub fn load_variation_selector(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::variation_selector [r => Ok(r.static_to_owned())],
+ sets::load_variation_selector,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::white_space, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_white_space, Fn, hidden)]
+ pub fn load_white_space(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::white_space [r => Ok(r.static_to_owned())],
+ sets::load_white_space,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::xdigit, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_xdigit, Fn, hidden)]
+ pub fn load_xdigit(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::xdigit [r => Ok(r.static_to_owned())],
+ sets::load_xdigit,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::xid_continue, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_xid_continue, Fn, hidden)]
+ pub fn load_xid_continue(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::xid_continue [r => Ok(r.static_to_owned())],
+ sets::load_xid_continue,
+ provider
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::xid_start, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_xid_start, Fn, hidden)]
+ pub fn load_xid_start(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::xid_start [r => Ok(r.static_to_owned())],
+ sets::load_xid_start,
+ provider
+ )?)))
+ }
+
+ /// Loads data for a property specified as a string as long as it is one of the
+ /// [ECMA-262 binary properties][ecma] (not including Any, ASCII, and Assigned pseudoproperties).
+ ///
+ /// Returns `ICU4XError::PropertyUnexpectedPropertyNameError` in case the string does not
+ /// match any property in the list
+ ///
+ /// [ecma]: https://tc39.es/ecma262/#table-binary-unicode-properties
+ #[diplomat::rust_link(icu::properties::sets::for_ecma262, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_for_ecma262, Fn, hidden)]
+ pub fn load_for_ecma262(
+ provider: &ICU4XDataProvider,
+ property_name: &str,
+ ) -> Result<Box<ICU4XCodePointSetData>, ICU4XError> {
+ let name = property_name.as_bytes(); // #2520
+ let name = if let Ok(s) = str::from_utf8(name) {
+ s
+ } else {
+ return Err(ICU4XError::TinyStrNonAsciiError);
+ };
+ Ok(Box::new(ICU4XCodePointSetData(call_constructor_unstable!(
+ sets::load_for_ecma262 [r => r.map(|r| r.static_to_owned())],
+ sets::load_for_ecma262_unstable,
+ provider,
+ name
+ )?)))
+ }
+ }
+}
diff --git a/intl/icu_capi/src/properties_unisets.rs b/intl/icu_capi/src/properties_unisets.rs
new file mode 100644
index 0000000000..7d2cf8cccc
--- /dev/null
+++ b/intl/icu_capi/src/properties_unisets.rs
@@ -0,0 +1,149 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::locale::ffi::ICU4XLocale;
+ use crate::provider::ffi::ICU4XDataProvider;
+ use alloc::boxed::Box;
+ use core::str;
+ use icu_properties::{exemplar_chars, sets};
+
+ use crate::errors::ffi::ICU4XError;
+
+ #[diplomat::opaque]
+ /// An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property.
+ #[diplomat::rust_link(icu::properties, Mod)]
+ #[diplomat::rust_link(icu::properties::sets::UnicodeSetData, Struct)]
+ #[diplomat::rust_link(icu::properties::sets::UnicodeSetData::from_data, FnInStruct, hidden)]
+ #[diplomat::rust_link(icu::properties::sets::UnicodeSetDataBorrowed, Struct)]
+ pub struct ICU4XUnicodeSetData(pub sets::UnicodeSetData);
+
+ impl ICU4XUnicodeSetData {
+ /// Checks whether the string is in the set.
+ #[diplomat::rust_link(icu::properties::sets::UnicodeSetDataBorrowed::contains, FnInStruct)]
+ pub fn contains(&self, s: &str) -> bool {
+ let s = s.as_bytes(); // #2520
+ let s = if let Ok(s) = str::from_utf8(s) {
+ s
+ } else {
+ return false;
+ };
+ self.0.as_borrowed().contains(s)
+ }
+ /// Checks whether the code point is in the set.
+ #[diplomat::rust_link(
+ icu::properties::sets::UnicodeSetDataBorrowed::contains_char,
+ FnInStruct
+ )]
+ pub fn contains_char(&self, cp: char) -> bool {
+ self.0.as_borrowed().contains_char(cp)
+ }
+ /// Checks whether the code point (specified as a 32 bit integer, in UTF-32) is in the set.
+ #[diplomat::rust_link(
+ icu::properties::sets::UnicodeSetDataBorrowed::contains32,
+ FnInStruct,
+ hidden
+ )]
+ #[diplomat::attr(dart, disable)]
+ pub fn contains32(&self, cp: u32) -> bool {
+ self.0.as_borrowed().contains32(cp)
+ }
+
+ #[diplomat::rust_link(icu::properties::sets::basic_emoji, Fn)]
+ #[diplomat::rust_link(icu::properties::sets::load_basic_emoji, Fn, hidden)]
+ pub fn load_basic_emoji(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XUnicodeSetData>, ICU4XError> {
+ Ok(Box::new(ICU4XUnicodeSetData(call_constructor_unstable!(
+ sets::basic_emoji [r => Ok(r.static_to_owned())],
+ sets::load_basic_emoji,
+ provider,
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::exemplar_chars::exemplars_main, Fn)]
+ #[diplomat::rust_link(icu::properties::exemplar_chars::load_exemplars_main, Fn, hidden)]
+ pub fn load_exemplars_main(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ ) -> Result<Box<ICU4XUnicodeSetData>, ICU4XError> {
+ let locale = locale.to_datalocale();
+ Ok(Box::new(ICU4XUnicodeSetData(call_constructor_unstable!(
+ exemplar_chars::exemplars_main,
+ exemplar_chars::load_exemplars_main,
+ provider,
+ &locale
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::exemplar_chars::exemplars_auxiliary, Fn)]
+ #[diplomat::rust_link(
+ icu::properties::exemplar_chars::load_exemplars_auxiliary,
+ Fn,
+ hidden
+ )]
+ pub fn load_exemplars_auxiliary(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ ) -> Result<Box<ICU4XUnicodeSetData>, ICU4XError> {
+ let locale = locale.to_datalocale();
+ Ok(Box::new(ICU4XUnicodeSetData(call_constructor_unstable!(
+ exemplar_chars::exemplars_auxiliary,
+ exemplar_chars::load_exemplars_auxiliary,
+ provider,
+ &locale
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::exemplar_chars::exemplars_punctuation, Fn)]
+ #[diplomat::rust_link(
+ icu::properties::exemplar_chars::load_exemplars_punctuation,
+ Fn,
+ hidden
+ )]
+ pub fn load_exemplars_punctuation(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ ) -> Result<Box<ICU4XUnicodeSetData>, ICU4XError> {
+ let locale = locale.to_datalocale();
+ Ok(Box::new(ICU4XUnicodeSetData(call_constructor_unstable!(
+ exemplar_chars::exemplars_punctuation,
+ exemplar_chars::load_exemplars_punctuation,
+ provider,
+ &locale
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::exemplar_chars::exemplars_numbers, Fn)]
+ #[diplomat::rust_link(icu::properties::exemplar_chars::load_exemplars_numbers, Fn, hidden)]
+ pub fn load_exemplars_numbers(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ ) -> Result<Box<ICU4XUnicodeSetData>, ICU4XError> {
+ let locale = locale.to_datalocale();
+ Ok(Box::new(ICU4XUnicodeSetData(call_constructor_unstable!(
+ exemplar_chars::exemplars_numbers,
+ exemplar_chars::load_exemplars_numbers,
+ provider,
+ &locale
+ )?)))
+ }
+
+ #[diplomat::rust_link(icu::properties::exemplar_chars::exemplars_index, Fn)]
+ #[diplomat::rust_link(icu::properties::exemplar_chars::load_exemplars_index, Fn, hidden)]
+ pub fn load_exemplars_index(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ ) -> Result<Box<ICU4XUnicodeSetData>, ICU4XError> {
+ let locale = locale.to_datalocale();
+ Ok(Box::new(ICU4XUnicodeSetData(call_constructor_unstable!(
+ exemplar_chars::exemplars_index,
+ exemplar_chars::load_exemplars_index,
+ provider,
+ &locale
+ )?)))
+ }
+ }
+}
diff --git a/intl/icu_capi/src/provider.rs b/intl/icu_capi/src/provider.rs
new file mode 100644
index 0000000000..18234f374c
--- /dev/null
+++ b/intl/icu_capi/src/provider.rs
@@ -0,0 +1,344 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[allow(unused_imports)] // feature-specific
+use alloc::boxed::Box;
+use icu_provider::prelude::*;
+#[allow(unused_imports)] // feature-specific
+use icu_provider::MaybeSendSync;
+use icu_provider_adapters::empty::EmptyDataProvider;
+#[allow(unused_imports)] // feature-specific
+use yoke::{trait_hack::YokeTraitHack, Yokeable};
+#[allow(unused_imports)] // feature-specific
+use zerofrom::ZeroFrom;
+
+pub enum ICU4XDataProviderInner {
+ Destroyed,
+ Empty,
+ #[cfg(feature = "compiled_data")]
+ Compiled,
+ #[cfg(feature = "buffer_provider")]
+ Buffer(Box<dyn BufferProvider + 'static>),
+}
+
+#[diplomat::bridge]
+pub mod ffi {
+ use super::ICU4XDataProviderInner;
+ use crate::errors::ffi::ICU4XError;
+ use alloc::boxed::Box;
+ #[allow(unused_imports)] // feature-gated
+ use icu_provider_adapters::fallback::LocaleFallbackProvider;
+ #[allow(unused_imports)] // feature-gated
+ use icu_provider_adapters::fork::predicates::MissingLocalePredicate;
+
+ #[diplomat::opaque]
+ /// An ICU4X data provider, capable of loading ICU4X data keys from some source.
+ #[diplomat::rust_link(icu_provider, Mod)]
+ pub struct ICU4XDataProvider(pub ICU4XDataProviderInner);
+
+ #[cfg(feature = "buffer_provider")]
+ fn convert_buffer_provider<D: icu_provider::BufferProvider + 'static>(
+ x: D,
+ ) -> ICU4XDataProvider {
+ ICU4XDataProvider(super::ICU4XDataProviderInner::Buffer(Box::new(x)))
+ }
+
+ impl ICU4XDataProvider {
+ /// Constructs an [`ICU4XDataProvider`] that uses compiled data.
+ ///
+ /// Requires the `compiled_data` feature.
+ ///
+ /// This provider cannot be modified or combined with other providers, so `enable_fallback`,
+ /// `enabled_fallback_with`, `fork_by_locale`, and `fork_by_key` will return `Err`s.
+ #[cfg(feature = "compiled_data")]
+ pub fn create_compiled() -> Box<ICU4XDataProvider> {
+ Box::new(Self(ICU4XDataProviderInner::Compiled))
+ }
+
+ /// Constructs an `FsDataProvider` and returns it as an [`ICU4XDataProvider`].
+ /// Requires the `provider_fs` Cargo feature.
+ /// Not supported in WASM.
+ #[diplomat::rust_link(icu_provider_fs::FsDataProvider, Struct)]
+ #[cfg(all(
+ feature = "provider_fs",
+ not(any(target_arch = "wasm32", target_os = "none"))
+ ))]
+ #[diplomat::attr(dart, disable)]
+ pub fn create_fs(path: &str) -> Result<Box<ICU4XDataProvider>, ICU4XError> {
+ // #2520
+ // In the future we can start using OsString APIs to support non-utf8 paths
+ core::str::from_utf8(path.as_bytes())
+ .map_err(|e| ICU4XError::DataIoError.log_original(&e))?;
+
+ Ok(Box::new(convert_buffer_provider(
+ icu_provider_fs::FsDataProvider::try_new(path)?,
+ )))
+ }
+
+ /// Deprecated
+ ///
+ /// Use `create_compiled()`.
+ #[cfg(all(
+ feature = "provider_test",
+ any(feature = "any_provider", feature = "buffer_provider")
+ ))]
+ #[diplomat::attr(dart, disable)]
+ pub fn create_test() -> Box<ICU4XDataProvider> {
+ Self::create_compiled()
+ }
+
+ /// Constructs a `BlobDataProvider` and returns it as an [`ICU4XDataProvider`].
+ #[diplomat::rust_link(icu_provider_blob::BlobDataProvider, Struct)]
+ #[cfg(feature = "buffer_provider")]
+ pub fn create_from_byte_slice(
+ blob: &'static [u8],
+ ) -> Result<Box<ICU4XDataProvider>, ICU4XError> {
+ Ok(Box::new(convert_buffer_provider(
+ icu_provider_blob::BlobDataProvider::try_new_from_static_blob(blob)?,
+ )))
+ }
+
+ /// Constructs an empty [`ICU4XDataProvider`].
+ #[diplomat::rust_link(icu_provider_adapters::empty::EmptyDataProvider, Struct)]
+ #[diplomat::rust_link(
+ icu_provider_adapters::empty::EmptyDataProvider::new,
+ FnInStruct,
+ hidden
+ )]
+ pub fn create_empty() -> Box<ICU4XDataProvider> {
+ Box::new(ICU4XDataProvider(ICU4XDataProviderInner::Empty))
+ }
+
+ /// Creates a provider that tries the current provider and then, if the current provider
+ /// doesn't support the data key, another provider `other`.
+ ///
+ /// This takes ownership of the `other` provider, leaving an empty provider in its place.
+ ///
+ /// The providers must be the same type (Any or Buffer). This condition is satisfied if
+ /// both providers originate from the same constructor, such as `create_from_byte_slice`
+ /// or `create_fs`. If the condition is not upheld, a runtime error occurs.
+ #[diplomat::rust_link(icu_provider_adapters::fork::ForkByKeyProvider, Typedef)]
+ #[diplomat::rust_link(
+ icu_provider_adapters::fork::predicates::MissingDataKeyPredicate,
+ Struct,
+ hidden
+ )]
+ pub fn fork_by_key(&mut self, other: &mut ICU4XDataProvider) -> Result<(), ICU4XError> {
+ #[allow(unused_imports)]
+ use ICU4XDataProviderInner::*;
+ *self = match (
+ core::mem::replace(&mut self.0, Destroyed),
+ core::mem::replace(&mut other.0, Destroyed),
+ ) {
+ (Destroyed, _) | (_, Destroyed) => Err(icu_provider::DataError::custom(
+ "This provider has been destroyed",
+ ))?,
+ #[cfg(feature = "compiled_data")]
+ (Compiled, _) | (_, Compiled) => Err(icu_provider::DataError::custom(
+ "The compiled provider cannot be modified",
+ ))?,
+ (Empty, Empty) => ICU4XDataProvider(ICU4XDataProviderInner::Empty),
+ #[cfg(feature = "buffer_provider")]
+ (Empty, b) | (b, Empty) => ICU4XDataProvider(b),
+ #[cfg(feature = "buffer_provider")]
+ (Buffer(a), Buffer(b)) => convert_buffer_provider(
+ icu_provider_adapters::fork::ForkByKeyProvider::new(a, b),
+ ),
+ };
+ Ok(())
+ }
+
+ /// Same as `fork_by_key` but forks by locale instead of key.
+ #[diplomat::rust_link(
+ icu_provider_adapters::fork::predicates::MissingLocalePredicate,
+ Struct
+ )]
+ pub fn fork_by_locale(&mut self, other: &mut ICU4XDataProvider) -> Result<(), ICU4XError> {
+ #[allow(unused_imports)]
+ use ICU4XDataProviderInner::*;
+ *self = match (
+ core::mem::replace(&mut self.0, Destroyed),
+ core::mem::replace(&mut other.0, Destroyed),
+ ) {
+ (Destroyed, _) | (_, Destroyed) => Err(icu_provider::DataError::custom(
+ "This provider has been destroyed",
+ ))?,
+ #[cfg(feature = "compiled_data")]
+ (Compiled, _) | (_, Compiled) => Err(icu_provider::DataError::custom(
+ "The compiled provider cannot be modified",
+ ))?,
+ (Empty, Empty) => ICU4XDataProvider(ICU4XDataProviderInner::Empty),
+ #[cfg(feature = "buffer_provider")]
+ (Empty, b) | (b, Empty) => ICU4XDataProvider(b),
+ #[cfg(feature = "buffer_provider")]
+ (Buffer(a), Buffer(b)) => convert_buffer_provider(
+ icu_provider_adapters::fork::ForkByErrorProvider::new_with_predicate(
+ a,
+ b,
+ MissingLocalePredicate,
+ ),
+ ),
+ };
+ Ok(())
+ }
+
+ /// Enables locale fallbacking for data requests made to this provider.
+ ///
+ /// Note that the test provider (from `create_test`) already has fallbacking enabled.
+ #[diplomat::rust_link(
+ icu_provider_adapters::fallback::LocaleFallbackProvider::try_new,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu_provider_adapters::fallback::LocaleFallbackProvider,
+ Struct,
+ compact
+ )]
+ pub fn enable_locale_fallback(&mut self) -> Result<(), ICU4XError> {
+ use ICU4XDataProviderInner::*;
+ *self = match core::mem::replace(&mut self.0, Destroyed) {
+ Destroyed => Err(icu_provider::DataError::custom(
+ "This provider has been destroyed",
+ ))?,
+ #[cfg(feature = "compiled_data")]
+ Compiled => Err(icu_provider::DataError::custom(
+ "The compiled provider cannot be modified",
+ ))?,
+ Empty => Err(icu_provider::DataErrorKind::MissingDataKey.into_error())?,
+ #[cfg(feature = "buffer_provider")]
+ Buffer(inner) => convert_buffer_provider(
+ LocaleFallbackProvider::try_new_with_buffer_provider(inner)?,
+ ),
+ };
+ Ok(())
+ }
+
+ #[diplomat::rust_link(
+ icu_provider_adapters::fallback::LocaleFallbackProvider::new_with_fallbacker,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu_provider_adapters::fallback::LocaleFallbackProvider,
+ Struct,
+ compact
+ )]
+ #[allow(unused_variables)] // feature-gated
+ #[cfg(feature = "icu_locid_transform")]
+ pub fn enable_locale_fallback_with(
+ &mut self,
+ fallbacker: &crate::fallbacker::ffi::ICU4XLocaleFallbacker,
+ ) -> Result<(), ICU4XError> {
+ use ICU4XDataProviderInner::*;
+ *self = match core::mem::replace(&mut self.0, Destroyed) {
+ Destroyed => Err(icu_provider::DataError::custom(
+ "This provider has been destroyed",
+ ))?,
+ #[cfg(feature = "compiled_data")]
+ Compiled => Err(icu_provider::DataError::custom(
+ "The compiled provider cannot be modified",
+ ))?,
+ Empty => Err(icu_provider::DataErrorKind::MissingDataKey.into_error())?,
+ #[cfg(feature = "buffer_provider")]
+ Buffer(inner) => convert_buffer_provider(
+ LocaleFallbackProvider::new_with_fallbacker(inner, fallbacker.0.clone()),
+ ),
+ };
+ Ok(())
+ }
+ }
+}
+
+macro_rules! load {
+ () => {
+ fn load(&self, req: DataRequest) -> Result<DataResponse<M>, DataError> {
+ use ICU4XDataProviderInner::*;
+ match self {
+ Destroyed => Err(icu_provider::DataError::custom(
+ "This provider has been destroyed",
+ ))?,
+ Empty => EmptyDataProvider::new().load(req),
+ #[cfg(feature = "buffer_provider")]
+ Buffer(buffer_provider) => buffer_provider.as_deserializing().load(req),
+ #[cfg(feature = "compiled_data")]
+ Compiled => unreachable!(),
+ }
+ }
+ };
+}
+
+#[macro_export]
+macro_rules! call_constructor {
+ ($compiled:path [$pre_transform:ident => $transform:expr], $any:path, $buffer:path, $provider:expr $(, $args:expr)* $(,)?) => {
+ match &$provider.0 {
+ $crate::provider::ICU4XDataProviderInner::Destroyed => Err(icu_provider::DataError::custom(
+ "This provider has been destroyed",
+ ))?,
+ $crate::provider::ICU4XDataProviderInner::Empty => $any(&icu_provider_adapters::empty::EmptyDataProvider::new(), $($args,)*),
+ #[cfg(feature = "buffer_provider")]
+ $crate::provider::ICU4XDataProviderInner::Buffer(buffer_provider) => $buffer(buffer_provider, $($args,)*),
+ #[cfg(feature = "compiled_data")]
+ $crate::provider::ICU4XDataProviderInner::Compiled => { let $pre_transform = $compiled($($args,)*); $transform },
+ }
+ };
+ ($compiled:path, $any:path, $buffer:path, $provider:expr $(, $args:expr)* $(,)?) => {
+ match &$provider.0 {
+ $crate::provider::ICU4XDataProviderInner::Destroyed => Err(icu_provider::DataError::custom(
+ "This provider has been destroyed",
+ ))?,
+ $crate::provider::ICU4XDataProviderInner::Empty => $any(&icu_provider_adapters::empty::EmptyDataProvider::new(), $($args,)*),
+ #[cfg(feature = "buffer_provider")]
+ $crate::provider::ICU4XDataProviderInner::Buffer(buffer_provider) => $buffer(buffer_provider, $($args,)*),
+ #[cfg(feature = "compiled_data")]
+ $crate::provider::ICU4XDataProviderInner::Compiled => $compiled($($args,)*),
+ }
+ };
+}
+
+#[macro_export]
+macro_rules! call_constructor_unstable {
+ ($compiled:path [$pre_transform:ident => $transform:expr], $unstable:path, $provider:expr $(, $args:expr)* $(,)?) => {
+ match &$provider.0 {
+ $crate::provider::ICU4XDataProviderInner::Destroyed => Err(icu_provider::DataError::custom(
+ "This provider has been destroyed",
+ ))?,
+ $crate::provider::ICU4XDataProviderInner::Empty => $unstable(&icu_provider_adapters::empty::EmptyDataProvider::new(), $($args,)*),
+ #[cfg(feature = "buffer_provider")]
+ $crate::provider::ICU4XDataProviderInner::Buffer(buffer_provider) => $unstable(&icu_provider::AsDeserializingBufferProvider::as_deserializing(buffer_provider), $($args,)*),
+ #[cfg(feature = "compiled_data")]
+ $crate::provider::ICU4XDataProviderInner::Compiled => { let $pre_transform = $compiled($($args,)*); $transform },
+ }
+ };
+ ($compiled:path, $unstable:path, $provider:expr $(, $args:expr)* $(,)?) => {
+ match &$provider.0 {
+ $crate::provider::ICU4XDataProviderInner::Destroyed => Err(icu_provider::DataError::custom(
+ "This provider has been destroyed",
+ ))?,
+ $crate::provider::ICU4XDataProviderInner::Empty => $unstable(&icu_provider_adapters::empty::EmptyDataProvider::new(), $($args,)*),
+ #[cfg(feature = "buffer_provider")]
+ $crate::provider::ICU4XDataProviderInner::Buffer(buffer_provider) => $unstable(&icu_provider::AsDeserializingBufferProvider::as_deserializing(buffer_provider), $($args,)*),
+ #[cfg(feature = "compiled_data")]
+ $crate::provider::ICU4XDataProviderInner::Compiled => $compiled($($args,)*),
+ }
+ };
+}
+
+#[cfg(not(feature = "buffer_provider"))]
+impl<M> DataProvider<M> for ICU4XDataProviderInner
+where
+ M: KeyedDataMarker,
+{
+ load!();
+}
+
+#[cfg(feature = "buffer_provider")]
+impl<M> DataProvider<M> for ICU4XDataProviderInner
+where
+ M: KeyedDataMarker,
+ // Actual bound:
+ // for<'de> <M::Yokeable as Yokeable<'de>>::Output: Deserialize<'de>,
+ // Necessary workaround bound (see `yoke::trait_hack` docs):
+ for<'de> YokeTraitHack<<M::Yokeable as Yokeable<'de>>::Output>: serde::Deserialize<'de>,
+{
+ load!();
+}
diff --git a/intl/icu_capi/src/script.rs b/intl/icu_capi/src/script.rs
new file mode 100644
index 0000000000..aeb7e8bdde
--- /dev/null
+++ b/intl/icu_capi/src/script.rs
@@ -0,0 +1,156 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::provider::ffi::ICU4XDataProvider;
+ use alloc::boxed::Box;
+ use icu_properties::{script, sets::CodePointSetData, Script};
+
+ use crate::errors::ffi::ICU4XError;
+ use crate::properties_iter::ffi::CodePointRangeIterator;
+ use crate::properties_sets::ffi::ICU4XCodePointSetData;
+
+ #[diplomat::opaque]
+ /// An ICU4X ScriptWithExtensions map object, capable of holding a map of codepoints to scriptextensions values
+ #[diplomat::rust_link(icu::properties::script::ScriptWithExtensions, Struct)]
+ #[diplomat::rust_link(
+ icu::properties::script::ScriptWithExtensions::from_data,
+ FnInStruct,
+ hidden
+ )]
+ pub struct ICU4XScriptWithExtensions(pub script::ScriptWithExtensions);
+
+ #[diplomat::opaque]
+ /// A slightly faster ICU4XScriptWithExtensions object
+ #[diplomat::rust_link(icu::properties::script::ScriptWithExtensionsBorrowed, Struct)]
+ pub struct ICU4XScriptWithExtensionsBorrowed<'a>(pub script::ScriptWithExtensionsBorrowed<'a>);
+ #[diplomat::opaque]
+ /// An object that represents the Script_Extensions property for a single character
+ #[diplomat::rust_link(icu::properties::script::ScriptExtensionsSet, Struct)]
+ pub struct ICU4XScriptExtensionsSet<'a>(pub script::ScriptExtensionsSet<'a>);
+
+ impl ICU4XScriptWithExtensions {
+ #[diplomat::rust_link(icu::properties::script::script_with_extensions, Fn)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XScriptWithExtensions>, ICU4XError> {
+ Ok(Box::new(ICU4XScriptWithExtensions(call_constructor!(
+ script::script_with_extensions [r => Ok(r.static_to_owned())],
+ script::load_script_with_extensions_with_any_provider,
+ script::load_script_with_extensions_with_buffer_provider,
+ provider
+ )?)))
+ }
+
+ /// Get the Script property value for a code point
+ #[diplomat::rust_link(
+ icu::properties::script::ScriptWithExtensionsBorrowed::get_script_val,
+ FnInStruct
+ )]
+ pub fn get_script_val(&self, code_point: u32) -> u16 {
+ self.0.as_borrowed().get_script_val(code_point).0
+ }
+
+ /// Check if the Script_Extensions property of the given code point covers the given script
+ #[diplomat::rust_link(
+ icu::properties::script::ScriptWithExtensionsBorrowed::has_script,
+ FnInStruct
+ )]
+ pub fn has_script(&self, code_point: u32, script: u16) -> bool {
+ self.0.as_borrowed().has_script(code_point, Script(script))
+ }
+
+ /// Borrow this object for a slightly faster variant with more operations
+ #[diplomat::rust_link(
+ icu::properties::script::ScriptWithExtensions::as_borrowed,
+ FnInStruct
+ )]
+ pub fn as_borrowed<'a>(&'a self) -> Box<ICU4XScriptWithExtensionsBorrowed<'a>> {
+ Box::new(ICU4XScriptWithExtensionsBorrowed(self.0.as_borrowed()))
+ }
+
+ /// Get a list of ranges of code points that contain this script in their Script_Extensions values
+ #[diplomat::rust_link(
+ icu::properties::script::ScriptWithExtensionsBorrowed::get_script_extensions_ranges,
+ FnInStruct
+ )]
+ pub fn iter_ranges_for_script<'a>(
+ &'a self,
+ script: u16,
+ ) -> Box<CodePointRangeIterator<'a>> {
+ Box::new(CodePointRangeIterator(Box::new(
+ self.0
+ .as_borrowed()
+ .get_script_extensions_ranges(Script(script)),
+ )))
+ }
+ }
+
+ impl<'a> ICU4XScriptWithExtensionsBorrowed<'a> {
+ /// Get the Script property value for a code point
+ #[diplomat::rust_link(
+ icu::properties::script::ScriptWithExtensionsBorrowed::get_script_val,
+ FnInStruct
+ )]
+ pub fn get_script_val(&self, code_point: u32) -> u16 {
+ self.0.get_script_val(code_point).0
+ }
+ /// Get the Script property value for a code point
+ #[diplomat::rust_link(
+ icu::properties::script::ScriptWithExtensionsBorrowed::get_script_extensions_val,
+ FnInStruct
+ )]
+ pub fn get_script_extensions_val(
+ &self,
+ code_point: u32,
+ ) -> Box<ICU4XScriptExtensionsSet<'a>> {
+ Box::new(ICU4XScriptExtensionsSet(
+ self.0.get_script_extensions_val(code_point),
+ ))
+ }
+ /// Check if the Script_Extensions property of the given code point covers the given script
+ #[diplomat::rust_link(
+ icu::properties::script::ScriptWithExtensionsBorrowed::has_script,
+ FnInStruct
+ )]
+ pub fn has_script(&self, code_point: u32, script: u16) -> bool {
+ self.0.has_script(code_point, Script(script))
+ }
+
+ /// Build the CodePointSetData corresponding to a codepoints matching a particular script
+ /// in their Script_Extensions
+ #[diplomat::rust_link(
+ icu::properties::script::ScriptWithExtensionsBorrowed::get_script_extensions_set,
+ FnInStruct
+ )]
+ pub fn get_script_extensions_set(&self, script: u16) -> Box<ICU4XCodePointSetData> {
+ let list = self
+ .0
+ .get_script_extensions_set(Script(script))
+ .into_owned();
+ let set = CodePointSetData::from_code_point_inversion_list(list);
+ Box::new(ICU4XCodePointSetData(set))
+ }
+ }
+ impl<'a> ICU4XScriptExtensionsSet<'a> {
+ /// Check if the Script_Extensions property of the given code point covers the given script
+ #[diplomat::rust_link(icu::properties::script::ScriptExtensionsSet::contains, FnInStruct)]
+ pub fn contains(&self, script: u16) -> bool {
+ self.0.contains(&Script(script))
+ }
+
+ /// Get the number of scripts contained in here
+ #[diplomat::rust_link(icu::properties::script::ScriptExtensionsSet::iter, FnInStruct)]
+ pub fn count(&self) -> usize {
+ self.0.array_len()
+ }
+
+ /// Get script at index, returning an error if out of bounds
+ #[diplomat::rust_link(icu::properties::script::ScriptExtensionsSet::iter, FnInStruct)]
+ pub fn script_at(&self, index: usize) -> Result<u16, ()> {
+ self.0.array_get(index).map(|x| x.0).ok_or(())
+ }
+ }
+}
diff --git a/intl/icu_capi/src/segmenter_grapheme.rs b/intl/icu_capi/src/segmenter_grapheme.rs
new file mode 100644
index 0000000000..5d3f65fc05
--- /dev/null
+++ b/intl/icu_capi/src/segmenter_grapheme.rs
@@ -0,0 +1,154 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::errors::ffi::ICU4XError;
+ use crate::provider::ffi::ICU4XDataProvider;
+ use alloc::boxed::Box;
+ use core::convert::TryFrom;
+ use icu_segmenter::{
+ GraphemeClusterBreakIteratorLatin1, GraphemeClusterBreakIteratorPotentiallyIllFormedUtf8,
+ GraphemeClusterBreakIteratorUtf16, GraphemeClusterSegmenter,
+ };
+
+ #[diplomat::opaque]
+ /// An ICU4X grapheme-cluster-break segmenter, capable of finding grapheme cluster breakpoints
+ /// in strings.
+ #[diplomat::rust_link(icu::segmenter::GraphemeClusterSegmenter, Struct)]
+ pub struct ICU4XGraphemeClusterSegmenter(GraphemeClusterSegmenter);
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::segmenter::GraphemeClusterBreakIterator, Struct)]
+ #[diplomat::rust_link(
+ icu::segmenter::GraphemeClusterBreakIteratorPotentiallyIllFormedUtf8,
+ Typedef,
+ hidden
+ )]
+ pub struct ICU4XGraphemeClusterBreakIteratorUtf8<'a>(
+ GraphemeClusterBreakIteratorPotentiallyIllFormedUtf8<'a, 'a>,
+ );
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::segmenter::GraphemeClusterBreakIterator, Struct)]
+ #[diplomat::rust_link(icu::segmenter::GraphemeClusterBreakIteratorUtf16, Typedef, hidden)]
+ pub struct ICU4XGraphemeClusterBreakIteratorUtf16<'a>(
+ GraphemeClusterBreakIteratorUtf16<'a, 'a>,
+ );
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::segmenter::GraphemeClusterBreakIterator, Struct)]
+ #[diplomat::rust_link(icu::segmenter::GraphemeClusterBreakIteratorLatin1, Typedef, hidden)]
+ pub struct ICU4XGraphemeClusterBreakIteratorLatin1<'a>(
+ GraphemeClusterBreakIteratorLatin1<'a, 'a>,
+ );
+
+ impl ICU4XGraphemeClusterSegmenter {
+ /// Construct an [`ICU4XGraphemeClusterSegmenter`].
+ #[diplomat::rust_link(icu::segmenter::GraphemeClusterSegmenter::new, FnInStruct)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XGraphemeClusterSegmenter>, ICU4XError> {
+ Ok(Box::new(ICU4XGraphemeClusterSegmenter(call_constructor!(
+ GraphemeClusterSegmenter::new [r => Ok(r)],
+ GraphemeClusterSegmenter::try_new_with_any_provider,
+ GraphemeClusterSegmenter::try_new_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Segments a (potentially ill-formed) UTF-8 string.
+ #[diplomat::rust_link(
+ icu::segmenter::GraphemeClusterSegmenter::segment_str,
+ FnInStruct,
+ hidden
+ )]
+ #[diplomat::rust_link(icu::segmenter::GraphemeClusterSegmenter::segment_utf8, FnInStruct)]
+ pub fn segment_utf8<'a>(
+ &'a self,
+ input: &'a str,
+ ) -> Box<ICU4XGraphemeClusterBreakIteratorUtf8<'a>> {
+ let input = input.as_bytes(); // #2520
+ Box::new(ICU4XGraphemeClusterBreakIteratorUtf8(
+ self.0.segment_utf8(input),
+ ))
+ }
+
+ /// Segments a UTF-16 string.
+ #[diplomat::rust_link(icu::segmenter::GraphemeClusterSegmenter::segment_utf16, FnInStruct)]
+ pub fn segment_utf16<'a>(
+ &'a self,
+ input: &'a [u16],
+ ) -> Box<ICU4XGraphemeClusterBreakIteratorUtf16<'a>> {
+ Box::new(ICU4XGraphemeClusterBreakIteratorUtf16(
+ self.0.segment_utf16(input),
+ ))
+ }
+
+ /// Segments a Latin-1 string.
+ #[diplomat::rust_link(icu::segmenter::GraphemeClusterSegmenter::segment_latin1, FnInStruct)]
+ pub fn segment_latin1<'a>(
+ &'a self,
+ input: &'a [u8],
+ ) -> Box<ICU4XGraphemeClusterBreakIteratorLatin1<'a>> {
+ Box::new(ICU4XGraphemeClusterBreakIteratorLatin1(
+ self.0.segment_latin1(input),
+ ))
+ }
+ }
+
+ impl<'a> ICU4XGraphemeClusterBreakIteratorUtf8<'a> {
+ /// Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ /// out of range of a 32-bit signed integer.
+ #[allow(clippy::should_implement_trait)]
+ #[diplomat::rust_link(icu::segmenter::GraphemeClusterBreakIterator::next, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::segmenter::GraphemeClusterBreakIterator::Item,
+ AssociatedTypeInStruct,
+ hidden
+ )]
+ pub fn next(&mut self) -> i32 {
+ self.0
+ .next()
+ .and_then(|u| i32::try_from(u).ok())
+ .unwrap_or(-1)
+ }
+ }
+
+ impl<'a> ICU4XGraphemeClusterBreakIteratorUtf16<'a> {
+ /// Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ /// out of range of a 32-bit signed integer.
+ #[allow(clippy::should_implement_trait)]
+ #[diplomat::rust_link(icu::segmenter::GraphemeClusterBreakIterator::next, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::segmenter::GraphemeClusterBreakIterator::Item,
+ AssociatedTypeInStruct,
+ hidden
+ )]
+ pub fn next(&mut self) -> i32 {
+ self.0
+ .next()
+ .and_then(|u| i32::try_from(u).ok())
+ .unwrap_or(-1)
+ }
+ }
+
+ impl<'a> ICU4XGraphemeClusterBreakIteratorLatin1<'a> {
+ /// Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ /// out of range of a 32-bit signed integer.
+ #[allow(clippy::should_implement_trait)]
+ #[diplomat::rust_link(icu::segmenter::GraphemeClusterBreakIterator::next, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::segmenter::GraphemeClusterBreakIterator::Item,
+ AssociatedTypeInStruct,
+ hidden
+ )]
+ pub fn next(&mut self) -> i32 {
+ self.0
+ .next()
+ .and_then(|u| i32::try_from(u).ok())
+ .unwrap_or(-1)
+ }
+ }
+}
diff --git a/intl/icu_capi/src/segmenter_line.rs b/intl/icu_capi/src/segmenter_line.rs
new file mode 100644
index 0000000000..81aa9b49ff
--- /dev/null
+++ b/intl/icu_capi/src/segmenter_line.rs
@@ -0,0 +1,271 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+use icu_segmenter::LineBreakOptions;
+use icu_segmenter::LineBreakStrictness;
+use icu_segmenter::LineBreakWordOption;
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::errors::ffi::ICU4XError;
+ use crate::provider::ffi::ICU4XDataProvider;
+ use alloc::boxed::Box;
+ use core::convert::TryFrom;
+ use icu_segmenter::{
+ LineBreakIteratorLatin1, LineBreakIteratorPotentiallyIllFormedUtf8, LineBreakIteratorUtf16,
+ LineSegmenter,
+ };
+
+ #[diplomat::opaque]
+ /// An ICU4X line-break segmenter, capable of finding breakpoints in strings.
+ #[diplomat::rust_link(icu::segmenter::LineSegmenter, Struct)]
+ pub struct ICU4XLineSegmenter(LineSegmenter);
+
+ #[diplomat::rust_link(icu::segmenter::LineBreakStrictness, Enum)]
+ pub enum ICU4XLineBreakStrictness {
+ Loose,
+ Normal,
+ Strict,
+ Anywhere,
+ }
+
+ #[diplomat::rust_link(icu::segmenter::LineBreakWordOption, Enum)]
+ pub enum ICU4XLineBreakWordOption {
+ Normal,
+ BreakAll,
+ KeepAll,
+ }
+
+ #[diplomat::rust_link(icu::segmenter::LineBreakOptions, Struct)]
+ pub struct ICU4XLineBreakOptionsV1 {
+ pub strictness: ICU4XLineBreakStrictness,
+ pub word_option: ICU4XLineBreakWordOption,
+ pub ja_zh: bool,
+ }
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::segmenter::LineBreakIterator, Struct)]
+ #[diplomat::rust_link(
+ icu::segmenter::LineBreakIteratorPotentiallyIllFormedUtf8,
+ Typedef,
+ compact
+ )]
+ pub struct ICU4XLineBreakIteratorUtf8<'a>(LineBreakIteratorPotentiallyIllFormedUtf8<'a, 'a>);
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::segmenter::LineBreakIterator, Struct)]
+ #[diplomat::rust_link(icu::segmenter::LineBreakIteratorUtf16, Typedef, compact)]
+ pub struct ICU4XLineBreakIteratorUtf16<'a>(LineBreakIteratorUtf16<'a, 'a>);
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::segmenter::LineBreakIterator, Struct)]
+ #[diplomat::rust_link(icu::segmenter::LineBreakIteratorLatin1, Typedef, compact)]
+ pub struct ICU4XLineBreakIteratorLatin1<'a>(LineBreakIteratorLatin1<'a, 'a>);
+
+ impl ICU4XLineSegmenter {
+ /// Construct a [`ICU4XLineSegmenter`] with default options. It automatically loads the best
+ /// available payload data for Burmese, Khmer, Lao, and Thai.
+ #[diplomat::rust_link(icu::segmenter::LineSegmenter::new_auto, FnInStruct)]
+ pub fn create_auto(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XLineSegmenter>, ICU4XError> {
+ Ok(Box::new(ICU4XLineSegmenter(call_constructor!(
+ LineSegmenter::new_auto [r => Ok(r)],
+ LineSegmenter::try_new_auto_with_any_provider,
+ LineSegmenter::try_new_auto_with_buffer_provider,
+ provider
+ )?)))
+ }
+
+ /// Construct a [`ICU4XLineSegmenter`] with default options and LSTM payload data for
+ /// Burmese, Khmer, Lao, and Thai.
+ #[diplomat::rust_link(icu::segmenter::LineSegmenter::new_lstm, FnInStruct)]
+ pub fn create_lstm(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XLineSegmenter>, ICU4XError> {
+ Ok(Box::new(ICU4XLineSegmenter(call_constructor!(
+ LineSegmenter::new_lstm [r => Ok(r)],
+ LineSegmenter::try_new_lstm_with_any_provider,
+ LineSegmenter::try_new_lstm_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Construct a [`ICU4XLineSegmenter`] with default options and dictionary payload data for
+ /// Burmese, Khmer, Lao, and Thai..
+ #[diplomat::rust_link(icu::segmenter::LineSegmenter::new_dictionary, FnInStruct)]
+ pub fn create_dictionary(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XLineSegmenter>, ICU4XError> {
+ Ok(Box::new(ICU4XLineSegmenter(call_constructor!(
+ LineSegmenter::new_dictionary [r => Ok(r)],
+ LineSegmenter::try_new_dictionary_with_any_provider,
+ LineSegmenter::try_new_dictionary_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Construct a [`ICU4XLineSegmenter`] with custom options. It automatically loads the best
+ /// available payload data for Burmese, Khmer, Lao, and Thai.
+ #[diplomat::rust_link(icu::segmenter::LineSegmenter::new_auto_with_options, FnInStruct)]
+ pub fn create_auto_with_options_v1(
+ provider: &ICU4XDataProvider,
+ options: ICU4XLineBreakOptionsV1,
+ ) -> Result<Box<ICU4XLineSegmenter>, ICU4XError> {
+ Ok(Box::new(ICU4XLineSegmenter(call_constructor!(
+ LineSegmenter::new_auto_with_options [r => Ok(r)],
+ LineSegmenter::try_new_auto_with_options_with_any_provider,
+ LineSegmenter::try_new_auto_with_options_with_buffer_provider,
+ provider,
+ options.into(),
+ )?)))
+ }
+
+ /// Construct a [`ICU4XLineSegmenter`] with custom options and LSTM payload data for
+ /// Burmese, Khmer, Lao, and Thai.
+ #[diplomat::rust_link(icu::segmenter::LineSegmenter::new_lstm_with_options, FnInStruct)]
+ pub fn create_lstm_with_options_v1(
+ provider: &ICU4XDataProvider,
+ options: ICU4XLineBreakOptionsV1,
+ ) -> Result<Box<ICU4XLineSegmenter>, ICU4XError> {
+ Ok(Box::new(ICU4XLineSegmenter(call_constructor!(
+ LineSegmenter::new_lstm_with_options [r => Ok(r)],
+ LineSegmenter::try_new_lstm_with_options_with_any_provider,
+ LineSegmenter::try_new_lstm_with_options_with_buffer_provider,
+ provider,
+ options.into(),
+ )?)))
+ }
+
+ /// Construct a [`ICU4XLineSegmenter`] with custom options and dictionary payload data for
+ /// Burmese, Khmer, Lao, and Thai.
+ #[diplomat::rust_link(
+ icu::segmenter::LineSegmenter::new_dictionary_with_options,
+ FnInStruct
+ )]
+ pub fn create_dictionary_with_options_v1(
+ provider: &ICU4XDataProvider,
+ options: ICU4XLineBreakOptionsV1,
+ ) -> Result<Box<ICU4XLineSegmenter>, ICU4XError> {
+ Ok(Box::new(ICU4XLineSegmenter(call_constructor!(
+ LineSegmenter::new_dictionary_with_options [r => Ok(r)],
+ LineSegmenter::try_new_dictionary_with_options_with_any_provider,
+ LineSegmenter::try_new_dictionary_with_options_with_buffer_provider,
+ provider,
+ options.into(),
+ )?)))
+ }
+
+ /// Segments a (potentially ill-formed) UTF-8 string.
+ #[diplomat::rust_link(icu::segmenter::LineSegmenter::segment_utf8, FnInStruct)]
+ #[diplomat::rust_link(icu::segmenter::LineSegmenter::segment_str, FnInStruct, hidden)]
+ pub fn segment_utf8<'a>(&'a self, input: &'a str) -> Box<ICU4XLineBreakIteratorUtf8<'a>> {
+ let input = input.as_bytes(); // #2520
+ Box::new(ICU4XLineBreakIteratorUtf8(self.0.segment_utf8(input)))
+ }
+
+ /// Segments a UTF-16 string.
+ #[diplomat::rust_link(icu::segmenter::LineSegmenter::segment_utf16, FnInStruct)]
+ pub fn segment_utf16<'a>(
+ &'a self,
+ input: &'a [u16],
+ ) -> Box<ICU4XLineBreakIteratorUtf16<'a>> {
+ Box::new(ICU4XLineBreakIteratorUtf16(self.0.segment_utf16(input)))
+ }
+
+ /// Segments a Latin-1 string.
+ #[diplomat::rust_link(icu::segmenter::LineSegmenter::segment_latin1, FnInStruct)]
+ pub fn segment_latin1<'a>(
+ &'a self,
+ input: &'a [u8],
+ ) -> Box<ICU4XLineBreakIteratorLatin1<'a>> {
+ Box::new(ICU4XLineBreakIteratorLatin1(self.0.segment_latin1(input)))
+ }
+ }
+
+ impl<'a> ICU4XLineBreakIteratorUtf8<'a> {
+ /// Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ /// out of range of a 32-bit signed integer.
+ #[allow(clippy::should_implement_trait)]
+ #[diplomat::rust_link(icu::segmenter::LineBreakIterator::next, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::segmenter::LineBreakIterator::Item,
+ AssociatedTypeInStruct,
+ hidden
+ )]
+ pub fn next(&mut self) -> i32 {
+ self.0
+ .next()
+ .and_then(|u| i32::try_from(u).ok())
+ .unwrap_or(-1)
+ }
+ }
+
+ impl<'a> ICU4XLineBreakIteratorUtf16<'a> {
+ /// Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ /// out of range of a 32-bit signed integer.
+ #[allow(clippy::should_implement_trait)]
+ #[diplomat::rust_link(icu::segmenter::LineBreakIterator::next, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::segmenter::LineBreakIterator::Item,
+ AssociatedTypeInStruct,
+ hidden
+ )]
+ pub fn next(&mut self) -> i32 {
+ self.0
+ .next()
+ .and_then(|u| i32::try_from(u).ok())
+ .unwrap_or(-1)
+ }
+ }
+
+ impl<'a> ICU4XLineBreakIteratorLatin1<'a> {
+ /// Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ /// out of range of a 32-bit signed integer.
+ #[allow(clippy::should_implement_trait)]
+ #[diplomat::rust_link(icu::segmenter::LineBreakIterator::next, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::segmenter::LineBreakIterator::Item,
+ AssociatedTypeInStruct,
+ hidden
+ )]
+ pub fn next(&mut self) -> i32 {
+ self.0
+ .next()
+ .and_then(|u| i32::try_from(u).ok())
+ .unwrap_or(-1)
+ }
+ }
+}
+
+impl From<ffi::ICU4XLineBreakStrictness> for LineBreakStrictness {
+ fn from(other: ffi::ICU4XLineBreakStrictness) -> Self {
+ match other {
+ ffi::ICU4XLineBreakStrictness::Loose => Self::Loose,
+ ffi::ICU4XLineBreakStrictness::Normal => Self::Normal,
+ ffi::ICU4XLineBreakStrictness::Strict => Self::Strict,
+ ffi::ICU4XLineBreakStrictness::Anywhere => Self::Anywhere,
+ }
+ }
+}
+
+impl From<ffi::ICU4XLineBreakWordOption> for LineBreakWordOption {
+ fn from(other: ffi::ICU4XLineBreakWordOption) -> Self {
+ match other {
+ ffi::ICU4XLineBreakWordOption::Normal => Self::Normal,
+ ffi::ICU4XLineBreakWordOption::BreakAll => Self::BreakAll,
+ ffi::ICU4XLineBreakWordOption::KeepAll => Self::KeepAll,
+ }
+ }
+}
+
+impl From<ffi::ICU4XLineBreakOptionsV1> for LineBreakOptions {
+ fn from(other: ffi::ICU4XLineBreakOptionsV1) -> Self {
+ let mut options = LineBreakOptions::default();
+ options.strictness = other.strictness.into();
+ options.word_option = other.word_option.into();
+ options.ja_zh = other.ja_zh;
+ options
+ }
+}
diff --git a/intl/icu_capi/src/segmenter_sentence.rs b/intl/icu_capi/src/segmenter_sentence.rs
new file mode 100644
index 0000000000..be01e0da8c
--- /dev/null
+++ b/intl/icu_capi/src/segmenter_sentence.rs
@@ -0,0 +1,141 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::errors::ffi::ICU4XError;
+ use crate::provider::ffi::ICU4XDataProvider;
+ use alloc::boxed::Box;
+ use core::convert::TryFrom;
+ use icu_segmenter::{
+ SentenceBreakIteratorLatin1, SentenceBreakIteratorPotentiallyIllFormedUtf8,
+ SentenceBreakIteratorUtf16, SentenceSegmenter,
+ };
+
+ #[diplomat::opaque]
+ /// An ICU4X sentence-break segmenter, capable of finding sentence breakpoints in strings.
+ #[diplomat::rust_link(icu::segmenter::SentenceSegmenter, Struct)]
+ pub struct ICU4XSentenceSegmenter(SentenceSegmenter);
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::segmenter::SentenceBreakIterator, Struct)]
+ #[diplomat::rust_link(
+ icu::segmenter::SentenceBreakIteratorPotentiallyIllFormedUtf8,
+ Typedef,
+ hidden
+ )]
+ pub struct ICU4XSentenceBreakIteratorUtf8<'a>(
+ SentenceBreakIteratorPotentiallyIllFormedUtf8<'a, 'a>,
+ );
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::segmenter::SentenceBreakIterator, Struct)]
+ #[diplomat::rust_link(icu::segmenter::SentenceBreakIteratorUtf16, Typedef, hidden)]
+ pub struct ICU4XSentenceBreakIteratorUtf16<'a>(SentenceBreakIteratorUtf16<'a, 'a>);
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::segmenter::SentenceBreakIterator, Struct)]
+ #[diplomat::rust_link(icu::segmenter::SentenceBreakIteratorLatin1, Typedef, hidden)]
+ pub struct ICU4XSentenceBreakIteratorLatin1<'a>(SentenceBreakIteratorLatin1<'a, 'a>);
+
+ impl ICU4XSentenceSegmenter {
+ /// Construct an [`ICU4XSentenceSegmenter`].
+ #[diplomat::rust_link(icu::segmenter::SentenceSegmenter::new, FnInStruct)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XSentenceSegmenter>, ICU4XError> {
+ Ok(Box::new(ICU4XSentenceSegmenter(call_constructor!(
+ SentenceSegmenter::new [r => Ok(r)],
+ SentenceSegmenter::try_new_with_any_provider,
+ SentenceSegmenter::try_new_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Segments a (potentially ill-formed) UTF-8 string.
+ #[diplomat::rust_link(icu::segmenter::SentenceSegmenter::segment_utf8, FnInStruct)]
+ #[diplomat::rust_link(icu::segmenter::SentenceSegmenter::segment_str, FnInStruct, hidden)]
+ pub fn segment_utf8<'a>(
+ &'a self,
+ input: &'a str,
+ ) -> Box<ICU4XSentenceBreakIteratorUtf8<'a>> {
+ let input = input.as_bytes(); // #2520
+ Box::new(ICU4XSentenceBreakIteratorUtf8(self.0.segment_utf8(input)))
+ }
+
+ /// Segments a UTF-16 string.
+ #[diplomat::rust_link(icu::segmenter::SentenceSegmenter::segment_utf16, FnInStruct)]
+ pub fn segment_utf16<'a>(
+ &'a self,
+ input: &'a [u16],
+ ) -> Box<ICU4XSentenceBreakIteratorUtf16<'a>> {
+ Box::new(ICU4XSentenceBreakIteratorUtf16(self.0.segment_utf16(input)))
+ }
+
+ /// Segments a Latin-1 string.
+ #[diplomat::rust_link(icu::segmenter::SentenceSegmenter::segment_latin1, FnInStruct)]
+ pub fn segment_latin1<'a>(
+ &'a self,
+ input: &'a [u8],
+ ) -> Box<ICU4XSentenceBreakIteratorLatin1<'a>> {
+ Box::new(ICU4XSentenceBreakIteratorLatin1(
+ self.0.segment_latin1(input),
+ ))
+ }
+ }
+
+ impl<'a> ICU4XSentenceBreakIteratorUtf8<'a> {
+ /// Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ /// out of range of a 32-bit signed integer.
+ #[allow(clippy::should_implement_trait)]
+ #[diplomat::rust_link(icu::segmenter::SentenceBreakIterator::next, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::segmenter::SentenceBreakIterator::Item,
+ AssociatedTypeInStruct,
+ hidden
+ )]
+ pub fn next(&mut self) -> i32 {
+ self.0
+ .next()
+ .and_then(|u| i32::try_from(u).ok())
+ .unwrap_or(-1)
+ }
+ }
+
+ impl<'a> ICU4XSentenceBreakIteratorUtf16<'a> {
+ /// Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ /// out of range of a 32-bit signed integer.
+ #[allow(clippy::should_implement_trait)]
+ #[diplomat::rust_link(icu::segmenter::SentenceBreakIterator::next, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::segmenter::SentenceBreakIterator::Item,
+ AssociatedTypeInStruct,
+ hidden
+ )]
+ pub fn next(&mut self) -> i32 {
+ self.0
+ .next()
+ .and_then(|u| i32::try_from(u).ok())
+ .unwrap_or(-1)
+ }
+ }
+
+ impl<'a> ICU4XSentenceBreakIteratorLatin1<'a> {
+ /// Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ /// out of range of a 32-bit signed integer.
+ #[allow(clippy::should_implement_trait)]
+ #[diplomat::rust_link(icu::segmenter::SentenceBreakIterator::next, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::segmenter::SentenceBreakIterator::Item,
+ AssociatedTypeInStruct,
+ hidden
+ )]
+ pub fn next(&mut self) -> i32 {
+ self.0
+ .next()
+ .and_then(|u| i32::try_from(u).ok())
+ .unwrap_or(-1)
+ }
+ }
+}
diff --git a/intl/icu_capi/src/segmenter_word.rs b/intl/icu_capi/src/segmenter_word.rs
new file mode 100644
index 0000000000..226bcdd334
--- /dev/null
+++ b/intl/icu_capi/src/segmenter_word.rs
@@ -0,0 +1,213 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::errors::ffi::ICU4XError;
+ use crate::provider::ffi::ICU4XDataProvider;
+ use alloc::boxed::Box;
+ use core::convert::TryFrom;
+ use icu_segmenter::{
+ WordBreakIteratorLatin1, WordBreakIteratorPotentiallyIllFormedUtf8, WordBreakIteratorUtf16,
+ WordSegmenter, WordType,
+ };
+
+ #[diplomat::enum_convert(WordType, needs_wildcard)]
+ #[diplomat::rust_link(icu::segmenter::WordType, Enum)]
+ pub enum ICU4XSegmenterWordType {
+ None = 0,
+ Number = 1,
+ Letter = 2,
+ }
+
+ #[diplomat::opaque]
+ /// An ICU4X word-break segmenter, capable of finding word breakpoints in strings.
+ #[diplomat::rust_link(icu::segmenter::WordSegmenter, Struct)]
+ pub struct ICU4XWordSegmenter(WordSegmenter);
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::segmenter::WordBreakIterator, Struct)]
+ #[diplomat::rust_link(
+ icu::segmenter::WordBreakIteratorPotentiallyIllFormedUtf8,
+ Typedef,
+ hidden
+ )]
+ pub struct ICU4XWordBreakIteratorUtf8<'a>(WordBreakIteratorPotentiallyIllFormedUtf8<'a, 'a>);
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::segmenter::WordBreakIterator, Struct)]
+ #[diplomat::rust_link(icu::segmenter::WordBreakIteratorUtf16, Typedef, hidden)]
+ pub struct ICU4XWordBreakIteratorUtf16<'a>(WordBreakIteratorUtf16<'a, 'a>);
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::segmenter::WordBreakIterator, Struct)]
+ #[diplomat::rust_link(icu::segmenter::WordBreakIteratorLatin1, Typedef, hidden)]
+ pub struct ICU4XWordBreakIteratorLatin1<'a>(WordBreakIteratorLatin1<'a, 'a>);
+
+ impl ICU4XWordSegmenter {
+ /// Construct an [`ICU4XWordSegmenter`] with automatically selecting the best available LSTM
+ /// or dictionary payload data.
+ ///
+ /// Note: currently, it uses dictionary for Chinese and Japanese, and LSTM for Burmese,
+ /// Khmer, Lao, and Thai.
+ #[diplomat::rust_link(icu::segmenter::WordSegmenter::new_auto, FnInStruct)]
+ pub fn create_auto(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XWordSegmenter>, ICU4XError> {
+ Ok(Box::new(ICU4XWordSegmenter(call_constructor!(
+ WordSegmenter::new_auto [r => Ok(r)],
+ WordSegmenter::try_new_auto_with_any_provider,
+ WordSegmenter::try_new_auto_with_buffer_provider,
+ provider
+ )?)))
+ }
+
+ /// Construct an [`ICU4XWordSegmenter`] with LSTM payload data for Burmese, Khmer, Lao, and
+ /// Thai.
+ ///
+ /// Warning: [`ICU4XWordSegmenter`] created by this function doesn't handle Chinese or
+ /// Japanese.
+ #[diplomat::rust_link(icu::segmenter::WordSegmenter::new_lstm, FnInStruct)]
+ pub fn create_lstm(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XWordSegmenter>, ICU4XError> {
+ Ok(Box::new(ICU4XWordSegmenter(call_constructor!(
+ WordSegmenter::new_lstm [r => Ok(r)],
+ WordSegmenter::try_new_lstm_with_any_provider,
+ WordSegmenter::try_new_lstm_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Construct an [`ICU4XWordSegmenter`] with dictionary payload data for Chinese, Japanese,
+ /// Burmese, Khmer, Lao, and Thai.
+ #[diplomat::rust_link(icu::segmenter::WordSegmenter::new_dictionary, FnInStruct)]
+ pub fn create_dictionary(
+ provider: &ICU4XDataProvider,
+ ) -> Result<Box<ICU4XWordSegmenter>, ICU4XError> {
+ Ok(Box::new(ICU4XWordSegmenter(call_constructor!(
+ WordSegmenter::new_dictionary [r => Ok(r)],
+ WordSegmenter::try_new_dictionary_with_any_provider,
+ WordSegmenter::try_new_dictionary_with_buffer_provider,
+ provider,
+ )?)))
+ }
+
+ /// Segments a (potentially ill-formed) UTF-8 string.
+ #[diplomat::rust_link(icu::segmenter::WordSegmenter::segment_utf8, FnInStruct)]
+ #[diplomat::rust_link(icu::segmenter::WordSegmenter::segment_str, FnInStruct, hidden)]
+ pub fn segment_utf8<'a>(&'a self, input: &'a str) -> Box<ICU4XWordBreakIteratorUtf8<'a>> {
+ let input = input.as_bytes(); // #2520
+ Box::new(ICU4XWordBreakIteratorUtf8(self.0.segment_utf8(input)))
+ }
+
+ /// Segments a UTF-16 string.
+ #[diplomat::rust_link(icu::segmenter::WordSegmenter::segment_utf16, FnInStruct)]
+ pub fn segment_utf16<'a>(
+ &'a self,
+ input: &'a [u16],
+ ) -> Box<ICU4XWordBreakIteratorUtf16<'a>> {
+ Box::new(ICU4XWordBreakIteratorUtf16(self.0.segment_utf16(input)))
+ }
+
+ /// Segments a Latin-1 string.
+ #[diplomat::rust_link(icu::segmenter::WordSegmenter::segment_latin1, FnInStruct)]
+ pub fn segment_latin1<'a>(
+ &'a self,
+ input: &'a [u8],
+ ) -> Box<ICU4XWordBreakIteratorLatin1<'a>> {
+ Box::new(ICU4XWordBreakIteratorLatin1(self.0.segment_latin1(input)))
+ }
+ }
+
+ impl<'a> ICU4XWordBreakIteratorUtf8<'a> {
+ /// Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ /// out of range of a 32-bit signed integer.
+ #[allow(clippy::should_implement_trait)]
+ #[diplomat::rust_link(icu::segmenter::WordBreakIterator::next, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::segmenter::WordBreakIterator::Item,
+ AssociatedTypeInStruct,
+ hidden
+ )]
+ pub fn next(&mut self) -> i32 {
+ self.0
+ .next()
+ .and_then(|u| i32::try_from(u).ok())
+ .unwrap_or(-1)
+ }
+
+ /// Return the status value of break boundary.
+ #[diplomat::rust_link(icu::segmenter::WordBreakIterator::word_type, FnInStruct)]
+ pub fn word_type(&self) -> ICU4XSegmenterWordType {
+ self.0.word_type().into()
+ }
+
+ /// Return true when break boundary is word-like such as letter/number/CJK
+ #[diplomat::rust_link(icu::segmenter::WordBreakIterator::is_word_like, FnInStruct)]
+ pub fn is_word_like(&self) -> bool {
+ self.0.is_word_like()
+ }
+ }
+
+ impl<'a> ICU4XWordBreakIteratorUtf16<'a> {
+ /// Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ /// out of range of a 32-bit signed integer.
+ #[allow(clippy::should_implement_trait)]
+ #[diplomat::rust_link(icu::segmenter::WordBreakIterator::next, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::segmenter::WordBreakIterator::Item,
+ AssociatedTypeInStruct,
+ hidden
+ )]
+ pub fn next(&mut self) -> i32 {
+ self.0
+ .next()
+ .and_then(|u| i32::try_from(u).ok())
+ .unwrap_or(-1)
+ }
+
+ /// Return the status value of break boundary.
+ #[diplomat::rust_link(icu::segmenter::WordBreakIterator::word_type, FnInStruct)]
+ pub fn word_type(&self) -> ICU4XSegmenterWordType {
+ self.0.word_type().into()
+ }
+
+ /// Return true when break boundary is word-like such as letter/number/CJK
+ #[diplomat::rust_link(icu::segmenter::WordBreakIterator::is_word_like, FnInStruct)]
+ pub fn is_word_like(&self) -> bool {
+ self.0.is_word_like()
+ }
+ }
+
+ impl<'a> ICU4XWordBreakIteratorLatin1<'a> {
+ /// Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
+ /// out of range of a 32-bit signed integer.
+ #[allow(clippy::should_implement_trait)]
+ #[diplomat::rust_link(icu::segmenter::WordBreakIterator::next, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::segmenter::WordBreakIterator::Item,
+ AssociatedTypeInStruct,
+ hidden
+ )]
+ pub fn next(&mut self) -> i32 {
+ self.0
+ .next()
+ .and_then(|u| i32::try_from(u).ok())
+ .unwrap_or(-1)
+ }
+
+ /// Return the status value of break boundary.
+ #[diplomat::rust_link(icu::segmenter::WordBreakIterator::word_type, FnInStruct)]
+ pub fn word_type(&self) -> ICU4XSegmenterWordType {
+ self.0.word_type().into()
+ }
+
+ /// Return true when break boundary is word-like such as letter/number/CJK
+ #[diplomat::rust_link(icu::segmenter::WordBreakIterator::is_word_like, FnInStruct)]
+ pub fn is_word_like(&self) -> bool {
+ self.0.is_word_like()
+ }
+ }
+}
diff --git a/intl/icu_capi/src/time.rs b/intl/icu_capi/src/time.rs
new file mode 100644
index 0000000000..2a6e6e4d6e
--- /dev/null
+++ b/intl/icu_capi/src/time.rs
@@ -0,0 +1,68 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+
+ use icu_calendar::types::Time;
+
+ use crate::errors::ffi::ICU4XError;
+
+ #[diplomat::opaque]
+ /// An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond
+ #[diplomat::rust_link(icu::calendar::types::Time, Struct)]
+ pub struct ICU4XTime(pub Time);
+
+ impl ICU4XTime {
+ /// Creates a new [`ICU4XTime`] given field values
+ #[diplomat::rust_link(icu::calendar::types::Time, Struct)]
+ pub fn create(
+ hour: u8,
+ minute: u8,
+ second: u8,
+ nanosecond: u32,
+ ) -> Result<Box<ICU4XTime>, ICU4XError> {
+ let hour = hour.try_into()?;
+ let minute = minute.try_into()?;
+ let second = second.try_into()?;
+ let nanosecond = nanosecond.try_into()?;
+ let time = Time {
+ hour,
+ minute,
+ second,
+ nanosecond,
+ };
+ Ok(Box::new(ICU4XTime(time)))
+ }
+
+ /// Creates a new [`ICU4XTime`] representing midnight (00:00.000).
+ #[diplomat::rust_link(icu::calendar::types::Time, Struct)]
+ pub fn create_midnight() -> Result<Box<ICU4XTime>, ICU4XError> {
+ let time = Time::midnight();
+ Ok(Box::new(ICU4XTime(time)))
+ }
+
+ /// Returns the hour in this time
+ #[diplomat::rust_link(icu::calendar::types::Time::hour, StructField)]
+ pub fn hour(&self) -> u8 {
+ self.0.hour.into()
+ }
+ /// Returns the minute in this time
+ #[diplomat::rust_link(icu::calendar::types::Time::minute, StructField)]
+ pub fn minute(&self) -> u8 {
+ self.0.minute.into()
+ }
+ /// Returns the second in this time
+ #[diplomat::rust_link(icu::calendar::types::Time::second, StructField)]
+ pub fn second(&self) -> u8 {
+ self.0.second.into()
+ }
+ /// Returns the nanosecond in this time
+ #[diplomat::rust_link(icu::calendar::types::Time::nanosecond, StructField)]
+ pub fn nanosecond(&self) -> u32 {
+ self.0.nanosecond.into()
+ }
+ }
+}
diff --git a/intl/icu_capi/src/timezone.rs b/intl/icu_capi/src/timezone.rs
new file mode 100644
index 0000000000..4c8b2659b7
--- /dev/null
+++ b/intl/icu_capi/src/timezone.rs
@@ -0,0 +1,328 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+use icu_timezone::CustomTimeZone;
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::errors::ffi::ICU4XError;
+ use alloc::boxed::Box;
+ use core::fmt::Write;
+ use core::str::{self};
+ use icu_timezone::CustomTimeZone;
+ use icu_timezone::GmtOffset;
+ use icu_timezone::ZoneVariant;
+
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone, Struct)]
+ pub struct ICU4XCustomTimeZone(pub CustomTimeZone);
+
+ impl ICU4XCustomTimeZone {
+ /// Creates a time zone from an offset string.
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::from_str, FnInStruct)]
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::try_from_bytes, FnInStruct, hidden)]
+ #[diplomat::rust_link(icu::timezone::GmtOffset::from_str, FnInStruct, hidden)]
+ #[diplomat::rust_link(icu::timezone::GmtOffset::try_from_bytes, FnInStruct, hidden)]
+ pub fn create_from_string(s: &str) -> Result<Box<ICU4XCustomTimeZone>, ICU4XError> {
+ let bytes = s.as_bytes();
+ Ok(Box::new(ICU4XCustomTimeZone::from(
+ CustomTimeZone::try_from_bytes(bytes)?,
+ )))
+ }
+
+ /// Creates a time zone with no information.
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::new_empty, FnInStruct)]
+ pub fn create_empty() -> Box<ICU4XCustomTimeZone> {
+ Box::new(CustomTimeZone::new_empty().into())
+ }
+
+ /// Creates a time zone for UTC.
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::utc, FnInStruct)]
+ #[diplomat::rust_link(icu::timezone::GmtOffset::utc, FnInStruct, hidden)]
+ pub fn create_utc() -> Box<ICU4XCustomTimeZone> {
+ Box::new(CustomTimeZone::utc().into())
+ }
+
+ /// Sets the `gmt_offset` field from offset seconds.
+ ///
+ /// Errors if the offset seconds are out of range.
+ #[diplomat::rust_link(icu::timezone::GmtOffset::try_from_offset_seconds, FnInStruct)]
+ #[diplomat::rust_link(icu::timezone::GmtOffset, Struct, compact)]
+ #[diplomat::rust_link(
+ icu::timezone::GmtOffset::from_offset_seconds_unchecked,
+ FnInStruct,
+ hidden
+ )]
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::new_with_offset, FnInStruct, hidden)]
+ pub fn try_set_gmt_offset_seconds(
+ &mut self,
+ offset_seconds: i32,
+ ) -> Result<(), ICU4XError> {
+ self.0.gmt_offset = Some(GmtOffset::try_from_offset_seconds(offset_seconds)?);
+ Ok(())
+ }
+
+ /// Clears the `gmt_offset` field.
+ #[diplomat::rust_link(icu::timezone::GmtOffset::offset_seconds, FnInStruct)]
+ #[diplomat::rust_link(icu::timezone::GmtOffset, Struct, compact)]
+ pub fn clear_gmt_offset(&mut self) {
+ self.0.gmt_offset.take();
+ }
+
+ /// Returns the value of the `gmt_offset` field as offset seconds.
+ ///
+ /// Errors if the `gmt_offset` field is empty.
+ #[diplomat::rust_link(icu::timezone::GmtOffset::offset_seconds, FnInStruct)]
+ #[diplomat::rust_link(icu::timezone::GmtOffset, Struct, compact)]
+ pub fn gmt_offset_seconds(&self) -> Result<i32, ICU4XError> {
+ self.0
+ .gmt_offset
+ .ok_or(ICU4XError::TimeZoneMissingInputError)
+ .map(GmtOffset::offset_seconds)
+ }
+
+ /// Returns whether the `gmt_offset` field is positive.
+ ///
+ /// Errors if the `gmt_offset` field is empty.
+ #[diplomat::rust_link(icu::timezone::GmtOffset::is_positive, FnInStruct)]
+ pub fn is_gmt_offset_positive(&self) -> Result<bool, ICU4XError> {
+ self.0
+ .gmt_offset
+ .ok_or(ICU4XError::TimeZoneMissingInputError)
+ .map(GmtOffset::is_positive)
+ }
+
+ /// Returns whether the `gmt_offset` field is zero.
+ ///
+ /// Errors if the `gmt_offset` field is empty (which is not the same as zero).
+ #[diplomat::rust_link(icu::timezone::GmtOffset::is_zero, FnInStruct)]
+ pub fn is_gmt_offset_zero(&self) -> Result<bool, ICU4XError> {
+ self.0
+ .gmt_offset
+ .ok_or(ICU4XError::TimeZoneMissingInputError)
+ .map(GmtOffset::is_zero)
+ }
+
+ /// Returns whether the `gmt_offset` field has nonzero minutes.
+ ///
+ /// Errors if the `gmt_offset` field is empty.
+ #[diplomat::rust_link(icu::timezone::GmtOffset::has_minutes, FnInStruct)]
+ pub fn gmt_offset_has_minutes(&self) -> Result<bool, ICU4XError> {
+ self.0
+ .gmt_offset
+ .ok_or(ICU4XError::TimeZoneMissingInputError)
+ .map(GmtOffset::has_minutes)
+ }
+
+ /// Returns whether the `gmt_offset` field has nonzero seconds.
+ ///
+ /// Errors if the `gmt_offset` field is empty.
+ #[diplomat::rust_link(icu::timezone::GmtOffset::has_seconds, FnInStruct)]
+ pub fn gmt_offset_has_seconds(&self) -> Result<bool, ICU4XError> {
+ self.0
+ .gmt_offset
+ .ok_or(ICU4XError::TimeZoneMissingInputError)
+ .map(GmtOffset::has_seconds)
+ }
+
+ /// Sets the `time_zone_id` field from a BCP-47 string.
+ ///
+ /// Errors if the string is not a valid BCP-47 time zone ID.
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::time_zone_id, StructField)]
+ #[diplomat::rust_link(icu::timezone::TimeZoneBcp47Id, Struct, compact)]
+ #[diplomat::rust_link(icu::timezone::TimeZoneBcp47Id::from_str, FnInStruct, hidden)]
+ pub fn try_set_time_zone_id(&mut self, id: &str) -> Result<(), ICU4XError> {
+ self.0.time_zone_id = Some(id.parse()?);
+ Ok(())
+ }
+
+ /// Sets the `time_zone_id` field from an IANA string by looking up
+ /// the corresponding BCP-47 string.
+ ///
+ /// Errors if the string is not a valid BCP-47 time zone ID.
+ #[diplomat::rust_link(icu::timezone::IanaToBcp47MapperBorrowed::get, FnInStruct)]
+ pub fn try_set_iana_time_zone_id(
+ &mut self,
+ mapper: &crate::iana_bcp47_mapper::ffi::ICU4XIanaToBcp47Mapper,
+ id: &str,
+ ) -> Result<(), ICU4XError> {
+ match mapper.0.as_borrowed().get(id) {
+ Some(id) => {
+ self.0.time_zone_id = Some(id);
+ Ok(())
+ }
+ None => Err(ICU4XError::TimeZoneInvalidIdError),
+ }
+ }
+
+ /// Clears the `time_zone_id` field.
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::time_zone_id, StructField)]
+ #[diplomat::rust_link(icu::timezone::TimeZoneBcp47Id, Struct, compact)]
+ pub fn clear_time_zone_id(&mut self) {
+ self.0.time_zone_id.take();
+ }
+
+ /// Writes the value of the `time_zone_id` field as a string.
+ ///
+ /// Errors if the `time_zone_id` field is empty.
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::time_zone_id, StructField)]
+ #[diplomat::rust_link(icu::timezone::TimeZoneBcp47Id, Struct, compact)]
+ pub fn time_zone_id(
+ &self,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ write.write_str(
+ self.0
+ .time_zone_id
+ .ok_or(ICU4XError::TimeZoneMissingInputError)?
+ .0
+ .as_str(),
+ )?;
+ Ok(())
+ }
+
+ /// Sets the `metazone_id` field from a string.
+ ///
+ /// Errors if the string is not a valid BCP-47 metazone ID.
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::metazone_id, StructField)]
+ #[diplomat::rust_link(icu::timezone::MetazoneId, Struct, compact)]
+ #[diplomat::rust_link(icu::timezone::MetazoneId::from_str, FnInStruct, hidden)]
+ pub fn try_set_metazone_id(&mut self, id: &str) -> Result<(), ICU4XError> {
+ self.0.metazone_id = Some(id.parse()?);
+ Ok(())
+ }
+
+ /// Clears the `metazone_id` field.
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::metazone_id, StructField)]
+ #[diplomat::rust_link(icu::timezone::MetazoneId, Struct, compact)]
+ pub fn clear_metazone_id(&mut self) {
+ self.0.metazone_id.take();
+ }
+
+ /// Writes the value of the `metazone_id` field as a string.
+ ///
+ /// Errors if the `metazone_id` field is empty.
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::metazone_id, StructField)]
+ #[diplomat::rust_link(icu::timezone::MetazoneId, Struct, compact)]
+ pub fn metazone_id(
+ &self,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ write.write_str(
+ self.0
+ .metazone_id
+ .ok_or(ICU4XError::TimeZoneMissingInputError)?
+ .0
+ .as_str(),
+ )?;
+ Ok(())
+ }
+
+ /// Sets the `zone_variant` field from a string.
+ ///
+ /// Errors if the string is not a valid zone variant.
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::zone_variant, StructField)]
+ #[diplomat::rust_link(icu::timezone::ZoneVariant, Struct, compact)]
+ #[diplomat::rust_link(icu::timezone::ZoneVariant::from_str, FnInStruct, hidden)]
+ pub fn try_set_zone_variant(&mut self, id: &str) -> Result<(), ICU4XError> {
+ self.0.zone_variant = Some(id.parse()?);
+ Ok(())
+ }
+
+ /// Clears the `zone_variant` field.
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::zone_variant, StructField)]
+ #[diplomat::rust_link(icu::timezone::ZoneVariant, Struct, compact)]
+ pub fn clear_zone_variant(&mut self) {
+ self.0.zone_variant.take();
+ }
+
+ /// Writes the value of the `zone_variant` field as a string.
+ ///
+ /// Errors if the `zone_variant` field is empty.
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::zone_variant, StructField)]
+ #[diplomat::rust_link(icu::timezone::ZoneVariant, Struct, compact)]
+ pub fn zone_variant(
+ &self,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ write.write_str(
+ self.0
+ .zone_variant
+ .ok_or(ICU4XError::TimeZoneMissingInputError)?
+ .0
+ .as_str(),
+ )?;
+ Ok(())
+ }
+
+ /// Sets the `zone_variant` field to standard time.
+ #[diplomat::rust_link(icu::timezone::ZoneVariant::standard, FnInStruct)]
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::zone_variant, StructField, compact)]
+ pub fn set_standard_time(&mut self) {
+ self.0.zone_variant = Some(ZoneVariant::standard())
+ }
+
+ /// Sets the `zone_variant` field to daylight time.
+ #[diplomat::rust_link(icu::timezone::ZoneVariant::daylight, FnInStruct)]
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::zone_variant, StructField, compact)]
+ pub fn set_daylight_time(&mut self) {
+ self.0.zone_variant = Some(ZoneVariant::daylight())
+ }
+
+ /// Returns whether the `zone_variant` field is standard time.
+ ///
+ /// Errors if the `zone_variant` field is empty.
+ #[diplomat::rust_link(icu::timezone::ZoneVariant::standard, FnInStruct)]
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::zone_variant, StructField, compact)]
+ pub fn is_standard_time(&self) -> Result<bool, ICU4XError> {
+ Ok(self
+ .0
+ .zone_variant
+ .ok_or(ICU4XError::TimeZoneMissingInputError)?
+ == ZoneVariant::standard())
+ }
+
+ /// Returns whether the `zone_variant` field is daylight time.
+ ///
+ /// Errors if the `zone_variant` field is empty.
+ #[diplomat::rust_link(icu::timezone::ZoneVariant::daylight, FnInStruct)]
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::zone_variant, StructField, compact)]
+ pub fn is_daylight_time(&self) -> Result<bool, ICU4XError> {
+ Ok(self
+ .0
+ .zone_variant
+ .ok_or(ICU4XError::TimeZoneMissingInputError)?
+ == ZoneVariant::daylight())
+ }
+
+ /// Sets the metazone based on the time zone and the local timestamp.
+ #[diplomat::rust_link(icu::timezone::CustomTimeZone::maybe_calculate_metazone, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::timezone::MetazoneCalculator::compute_metazone_from_time_zone,
+ FnInStruct,
+ compact
+ )]
+ #[cfg(feature = "icu_timezone")]
+ pub fn maybe_calculate_metazone(
+ &mut self,
+ metazone_calculator: &crate::metazone_calculator::ffi::ICU4XMetazoneCalculator,
+ local_datetime: &crate::datetime::ffi::ICU4XIsoDateTime,
+ ) {
+ self.0
+ .maybe_calculate_metazone(&metazone_calculator.0, &local_datetime.0);
+ }
+ }
+}
+
+impl From<CustomTimeZone> for ffi::ICU4XCustomTimeZone {
+ fn from(other: CustomTimeZone) -> Self {
+ Self(other)
+ }
+}
+
+impl From<ffi::ICU4XCustomTimeZone> for CustomTimeZone {
+ fn from(other: ffi::ICU4XCustomTimeZone) -> Self {
+ other.0
+ }
+}
diff --git a/intl/icu_capi/src/timezone_formatter.rs b/intl/icu_capi/src/timezone_formatter.rs
new file mode 100644
index 0000000000..0cd4b04bc3
--- /dev/null
+++ b/intl/icu_capi/src/timezone_formatter.rs
@@ -0,0 +1,298 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+use icu_datetime::time_zone::{FallbackFormat, TimeZoneFormatterOptions};
+
+macro_rules! call_method {
+ ($self:ident, $compiled:ident, $unstable:ident, $provider:expr) => {
+ match &$provider.0 {
+ $crate::provider::ICU4XDataProviderInner::Destroyed => Err(
+ icu_provider::DataError::custom("This provider has been destroyed"),
+ )?,
+ $crate::provider::ICU4XDataProviderInner::Empty => $self
+ .0
+ .$unstable(&icu_provider_adapters::empty::EmptyDataProvider::new()),
+ #[cfg(feature = "buffer_provider")]
+ $crate::provider::ICU4XDataProviderInner::Buffer(buffer_provider) => $self.0.$unstable(
+ &icu_provider::AsDeserializingBufferProvider::as_deserializing(buffer_provider),
+ ),
+ #[cfg(feature = "compiled_data")]
+ $crate::provider::ICU4XDataProviderInner::Compiled => $self.0.$compiled(),
+ }
+ };
+}
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::errors::ffi::ICU4XError;
+ use crate::locale::ffi::ICU4XLocale;
+ use crate::provider::ffi::ICU4XDataProvider;
+ use crate::timezone::ffi::ICU4XCustomTimeZone;
+ use alloc::boxed::Box;
+ use icu_datetime::time_zone::FallbackFormat;
+ use icu_datetime::time_zone::IsoFormat;
+ use icu_datetime::time_zone::IsoMinutes;
+ use icu_datetime::time_zone::IsoSeconds;
+ use icu_datetime::time_zone::TimeZoneFormatter;
+ use writeable::Writeable;
+
+ #[diplomat::opaque]
+ /// An ICU4X TimeZoneFormatter object capable of formatting an [`ICU4XCustomTimeZone`] type (and others) as a string
+ #[diplomat::rust_link(icu::datetime::time_zone::TimeZoneFormatter, Struct)]
+ pub struct ICU4XTimeZoneFormatter(pub TimeZoneFormatter);
+
+ #[diplomat::enum_convert(IsoFormat, needs_wildcard)]
+ #[diplomat::rust_link(icu::datetime::time_zone::IsoFormat, Enum)]
+ pub enum ICU4XIsoTimeZoneFormat {
+ Basic,
+ Extended,
+ UtcBasic,
+ UtcExtended,
+ }
+
+ #[diplomat::enum_convert(IsoMinutes, needs_wildcard)]
+ #[diplomat::rust_link(icu::datetime::time_zone::IsoMinutes, Enum)]
+ pub enum ICU4XIsoTimeZoneMinuteDisplay {
+ Required,
+ Optional,
+ }
+
+ #[diplomat::enum_convert(IsoSeconds, needs_wildcard)]
+ #[diplomat::rust_link(icu::datetime::time_zone::IsoSeconds, Enum)]
+ pub enum ICU4XIsoTimeZoneSecondDisplay {
+ Optional,
+ Never,
+ }
+
+ pub struct ICU4XIsoTimeZoneOptions {
+ pub format: ICU4XIsoTimeZoneFormat,
+ pub minutes: ICU4XIsoTimeZoneMinuteDisplay,
+ pub seconds: ICU4XIsoTimeZoneSecondDisplay,
+ }
+
+ impl ICU4XTimeZoneFormatter {
+ /// Creates a new [`ICU4XTimeZoneFormatter`] from locale data.
+ ///
+ /// Uses localized GMT as the fallback format.
+ #[diplomat::rust_link(icu::datetime::time_zone::TimeZoneFormatter::try_new, FnInStruct)]
+ #[diplomat::rust_link(icu::datetime::time_zone::FallbackFormat, Enum, compact)]
+ #[diplomat::rust_link(icu::datetime::time_zone::TimeZoneFormatterOptions, Struct, hidden)]
+ pub fn create_with_localized_gmt_fallback(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ ) -> Result<Box<ICU4XTimeZoneFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+
+ Ok(Box::new(ICU4XTimeZoneFormatter(call_constructor!(
+ TimeZoneFormatter::try_new,
+ TimeZoneFormatter::try_new_with_any_provider,
+ TimeZoneFormatter::try_new_with_buffer_provider,
+ provider,
+ &locale,
+ FallbackFormat::LocalizedGmt.into(),
+ )?)))
+ }
+
+ /// Creates a new [`ICU4XTimeZoneFormatter`] from locale data.
+ ///
+ /// Uses ISO-8601 as the fallback format.
+ #[diplomat::rust_link(icu::datetime::time_zone::TimeZoneFormatter::try_new, FnInStruct)]
+ #[diplomat::rust_link(icu::datetime::time_zone::FallbackFormat, Enum, compact)]
+ #[diplomat::rust_link(icu::datetime::time_zone::TimeZoneFormatterOptions, Struct, hidden)]
+ pub fn create_with_iso_8601_fallback(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ options: ICU4XIsoTimeZoneOptions,
+ ) -> Result<Box<ICU4XTimeZoneFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+
+ Ok(Box::new(ICU4XTimeZoneFormatter(call_constructor!(
+ TimeZoneFormatter::try_new,
+ TimeZoneFormatter::try_new_with_any_provider,
+ TimeZoneFormatter::try_new_with_buffer_provider,
+ provider,
+ &locale,
+ options.into(),
+ )?)))
+ }
+
+ /// Loads generic non-location long format. Example: "Pacific Time"
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::TimeZoneFormatter::include_generic_non_location_long,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::TimeZoneFormatter::load_generic_non_location_long,
+ FnInStruct,
+ hidden
+ )]
+ pub fn load_generic_non_location_long(
+ &mut self,
+ provider: &ICU4XDataProvider,
+ ) -> Result<(), ICU4XError> {
+ call_method!(
+ self,
+ include_generic_non_location_long,
+ load_generic_non_location_long,
+ provider
+ )?;
+ Ok(())
+ }
+
+ /// Loads generic non-location short format. Example: "PT"
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::TimeZoneFormatter::include_generic_non_location_short,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::TimeZoneFormatter::load_generic_non_location_short,
+ FnInStruct,
+ hidden
+ )]
+ pub fn load_generic_non_location_short(
+ &mut self,
+ provider: &ICU4XDataProvider,
+ ) -> Result<(), ICU4XError> {
+ call_method!(
+ self,
+ include_generic_non_location_short,
+ load_generic_non_location_short,
+ provider
+ )?;
+ Ok(())
+ }
+
+ /// Loads specific non-location long format. Example: "Pacific Standard Time"
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::TimeZoneFormatter::include_specific_non_location_long,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::TimeZoneFormatter::load_specific_non_location_long,
+ FnInStruct,
+ hidden
+ )]
+ pub fn load_specific_non_location_long(
+ &mut self,
+ provider: &ICU4XDataProvider,
+ ) -> Result<(), ICU4XError> {
+ call_method!(
+ self,
+ include_specific_non_location_long,
+ load_specific_non_location_long,
+ provider
+ )?;
+ Ok(())
+ }
+
+ /// Loads specific non-location short format. Example: "PST"
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::TimeZoneFormatter::include_specific_non_location_short,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::TimeZoneFormatter::load_specific_non_location_short,
+ FnInStruct,
+ hidden
+ )]
+ pub fn load_specific_non_location_short(
+ &mut self,
+ provider: &ICU4XDataProvider,
+ ) -> Result<(), ICU4XError> {
+ call_method!(
+ self,
+ include_specific_non_location_short,
+ load_specific_non_location_short,
+ provider
+ )?;
+ Ok(())
+ }
+
+ /// Loads generic location format. Example: "Los Angeles Time"
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::TimeZoneFormatter::include_generic_location_format,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::TimeZoneFormatter::load_generic_location_format,
+ FnInStruct,
+ hidden
+ )]
+ pub fn load_generic_location_format(
+ &mut self,
+ provider: &ICU4XDataProvider,
+ ) -> Result<(), ICU4XError> {
+ call_method!(
+ self,
+ include_generic_location_format,
+ load_generic_location_format,
+ provider
+ )?;
+ Ok(())
+ }
+
+ /// Loads localized GMT format. Example: "GMT-07:00"
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::TimeZoneFormatter::include_localized_gmt_format,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::TimeZoneFormatter::load_localized_gmt_format,
+ FnInStruct,
+ hidden
+ )]
+ pub fn include_localized_gmt_format(&mut self) -> Result<(), ICU4XError> {
+ self.0.include_localized_gmt_format()?;
+ Ok(())
+ }
+
+ /// Loads ISO-8601 format. Example: "-07:00"
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::TimeZoneFormatter::include_iso_8601_format,
+ FnInStruct
+ )]
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::TimeZoneFormatter::load_iso_8601_format,
+ FnInStruct,
+ hidden
+ )]
+ pub fn load_iso_8601_format(
+ &mut self,
+ options: ICU4XIsoTimeZoneOptions,
+ ) -> Result<(), ICU4XError> {
+ self.0.include_iso_8601_format(
+ options.format.into(),
+ options.minutes.into(),
+ options.seconds.into(),
+ )?;
+ Ok(())
+ }
+
+ /// Formats a [`ICU4XCustomTimeZone`] to a string.
+ #[diplomat::rust_link(icu::datetime::time_zone::TimeZoneFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::datetime::time_zone::TimeZoneFormatter::format_to_string,
+ FnInStruct
+ )]
+ pub fn format_custom_time_zone(
+ &self,
+ value: &ICU4XCustomTimeZone,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ self.0.format(&value.0).write_to(write)?;
+ Ok(())
+ }
+ }
+}
+
+impl From<ffi::ICU4XIsoTimeZoneOptions> for TimeZoneFormatterOptions {
+ fn from(other: ffi::ICU4XIsoTimeZoneOptions) -> Self {
+ FallbackFormat::Iso8601(
+ other.format.into(),
+ other.minutes.into(),
+ other.seconds.into(),
+ )
+ .into()
+ }
+}
diff --git a/intl/icu_capi/src/week.rs b/intl/icu_capi/src/week.rs
new file mode 100644
index 0000000000..f82b5aca07
--- /dev/null
+++ b/intl/icu_capi/src/week.rs
@@ -0,0 +1,93 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+use icu_calendar::week::WeekOf;
+
+#[diplomat::bridge]
+pub mod ffi {
+ use crate::date::ffi::ICU4XIsoWeekday;
+ use crate::errors::ffi::ICU4XError;
+ use crate::locale::ffi::ICU4XLocale;
+ use crate::provider::ffi::ICU4XDataProvider;
+ use alloc::boxed::Box;
+ use icu_calendar::week::{RelativeUnit, WeekCalculator};
+
+ #[diplomat::rust_link(icu::calendar::week::RelativeUnit, Enum)]
+ #[diplomat::enum_convert(RelativeUnit)]
+ pub enum ICU4XWeekRelativeUnit {
+ Previous,
+ Current,
+ Next,
+ }
+
+ #[diplomat::rust_link(icu::calendar::week::WeekOf, Struct)]
+ pub struct ICU4XWeekOf {
+ pub week: u16,
+ pub unit: ICU4XWeekRelativeUnit,
+ }
+ /// A Week calculator, useful to be passed in to `week_of_year()` on Date and DateTime types
+ #[diplomat::opaque]
+ #[diplomat::rust_link(icu::calendar::week::WeekCalculator, Struct)]
+ pub struct ICU4XWeekCalculator(pub WeekCalculator);
+
+ impl ICU4XWeekCalculator {
+ /// Creates a new [`ICU4XWeekCalculator`] from locale data.
+ #[diplomat::rust_link(icu::calendar::week::WeekCalculator::try_new, FnInStruct)]
+ pub fn create(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ ) -> Result<Box<ICU4XWeekCalculator>, ICU4XError> {
+ let locale = locale.to_datalocale();
+
+ Ok(Box::new(ICU4XWeekCalculator(call_constructor!(
+ WeekCalculator::try_new,
+ WeekCalculator::try_new_with_any_provider,
+ WeekCalculator::try_new_with_buffer_provider,
+ provider,
+ &locale,
+ )?)))
+ }
+
+ #[diplomat::rust_link(
+ icu::calendar::week::WeekCalculator::first_weekday,
+ StructField,
+ compact
+ )]
+ #[diplomat::rust_link(
+ icu::calendar::week::WeekCalculator::min_week_days,
+ StructField,
+ compact
+ )]
+ pub fn create_from_first_day_of_week_and_min_week_days(
+ first_weekday: ICU4XIsoWeekday,
+ min_week_days: u8,
+ ) -> Box<ICU4XWeekCalculator> {
+ let mut calculator = WeekCalculator::default();
+ calculator.first_weekday = first_weekday.into();
+ calculator.min_week_days = min_week_days;
+ Box::new(ICU4XWeekCalculator(calculator))
+ }
+
+ /// Returns the weekday that starts the week for this object's locale
+ #[diplomat::rust_link(icu::calendar::week::WeekCalculator::first_weekday, StructField)]
+ pub fn first_weekday(&self) -> ICU4XIsoWeekday {
+ self.0.first_weekday.into()
+ }
+ /// The minimum number of days overlapping a year required for a week to be
+ /// considered part of that year
+ #[diplomat::rust_link(icu::calendar::week::WeekCalculator::min_week_days, StructField)]
+ pub fn min_week_days(&self) -> u8 {
+ self.0.min_week_days
+ }
+ }
+}
+
+impl From<WeekOf> for ffi::ICU4XWeekOf {
+ fn from(other: WeekOf) -> Self {
+ ffi::ICU4XWeekOf {
+ week: other.week,
+ unit: other.unit.into(),
+ }
+ }
+}
diff --git a/intl/icu_capi/src/zoned_formatter.rs b/intl/icu_capi/src/zoned_formatter.rs
new file mode 100644
index 0000000000..6cafaa7666
--- /dev/null
+++ b/intl/icu_capi/src/zoned_formatter.rs
@@ -0,0 +1,198 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+ use icu_calendar::{DateTime, Gregorian};
+ use icu_datetime::{options::length, TypedZonedDateTimeFormatter, ZonedDateTimeFormatter};
+ use writeable::Writeable;
+
+ use crate::{
+ datetime::ffi::ICU4XDateTime, datetime::ffi::ICU4XIsoDateTime,
+ datetime_formatter::ffi::ICU4XDateLength, datetime_formatter::ffi::ICU4XTimeLength,
+ errors::ffi::ICU4XError, locale::ffi::ICU4XLocale, provider::ffi::ICU4XDataProvider,
+ timezone::ffi::ICU4XCustomTimeZone, timezone_formatter::ffi::ICU4XIsoTimeZoneOptions,
+ };
+
+ // TODO(https://github.com/rust-diplomat/diplomat/issues/248)
+ #[allow(unused_imports)]
+ use crate::{
+ timezone_formatter::ffi::ICU4XIsoTimeZoneFormat,
+ timezone_formatter::ffi::ICU4XIsoTimeZoneMinuteDisplay,
+ timezone_formatter::ffi::ICU4XIsoTimeZoneSecondDisplay,
+ };
+
+ #[diplomat::opaque]
+ /// An object capable of formatting a date time with time zone to a string.
+ #[diplomat::rust_link(icu::datetime::TypedZonedDateTimeFormatter, Struct)]
+ pub struct ICU4XGregorianZonedDateTimeFormatter(pub TypedZonedDateTimeFormatter<Gregorian>);
+
+ impl ICU4XGregorianZonedDateTimeFormatter {
+ /// Creates a new [`ICU4XGregorianZonedDateTimeFormatter`] from locale data.
+ ///
+ /// This function has `date_length` and `time_length` arguments and uses default options
+ /// for the time zone.
+ #[diplomat::rust_link(icu::datetime::TypedZonedDateTimeFormatter::try_new, FnInStruct)]
+ pub fn create_with_lengths(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ date_length: ICU4XDateLength,
+ time_length: ICU4XTimeLength,
+ ) -> Result<Box<ICU4XGregorianZonedDateTimeFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+
+ Ok(Box::new(ICU4XGregorianZonedDateTimeFormatter(
+ call_constructor!(
+ TypedZonedDateTimeFormatter::<Gregorian>::try_new,
+ TypedZonedDateTimeFormatter::<Gregorian>::try_new_with_any_provider,
+ TypedZonedDateTimeFormatter::<Gregorian>::try_new_with_buffer_provider,
+ provider,
+ &locale,
+ length::Bag::from_date_time_style(date_length.into(), time_length.into())
+ .into(),
+ Default::default(),
+ )?,
+ )))
+ }
+
+ /// Creates a new [`ICU4XGregorianZonedDateTimeFormatter`] from locale data.
+ ///
+ /// This function has `date_length` and `time_length` arguments and uses an ISO-8601 style
+ /// fallback for the time zone with the given configurations.
+ #[diplomat::rust_link(icu::datetime::TypedZonedDateTimeFormatter::try_new, FnInStruct)]
+ pub fn create_with_lengths_and_iso_8601_time_zone_fallback(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ date_length: ICU4XDateLength,
+ time_length: ICU4XTimeLength,
+ zone_options: ICU4XIsoTimeZoneOptions,
+ ) -> Result<Box<ICU4XGregorianZonedDateTimeFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+
+ Ok(Box::new(ICU4XGregorianZonedDateTimeFormatter(
+ call_constructor!(
+ TypedZonedDateTimeFormatter::<Gregorian>::try_new,
+ TypedZonedDateTimeFormatter::<Gregorian>::try_new_with_any_provider,
+ TypedZonedDateTimeFormatter::<Gregorian>::try_new_with_buffer_provider,
+ provider,
+ &locale,
+ length::Bag::from_date_time_style(date_length.into(), time_length.into())
+ .into(),
+ zone_options.into(),
+ )?,
+ )))
+ }
+
+ /// Formats a [`ICU4XIsoDateTime`] and [`ICU4XCustomTimeZone`] to a string.
+ #[diplomat::rust_link(icu::datetime::TypedZonedDateTimeFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::datetime::TypedZonedDateTimeFormatter::format_to_string,
+ FnInStruct,
+ hidden
+ )]
+ pub fn format_iso_datetime_with_custom_time_zone(
+ &self,
+ datetime: &ICU4XIsoDateTime,
+ time_zone: &ICU4XCustomTimeZone,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ let greg = DateTime::new_from_iso(datetime.0, Gregorian);
+ self.0.format(&greg, &time_zone.0).write_to(write)?;
+ Ok(())
+ }
+ }
+
+ #[diplomat::opaque]
+ /// An object capable of formatting a date time with time zone to a string.
+ #[diplomat::rust_link(icu::datetime::ZonedDateTimeFormatter, Struct)]
+ pub struct ICU4XZonedDateTimeFormatter(pub ZonedDateTimeFormatter);
+
+ impl ICU4XZonedDateTimeFormatter {
+ /// Creates a new [`ICU4XZonedDateTimeFormatter`] from locale data.
+ ///
+ /// This function has `date_length` and `time_length` arguments and uses default options
+ /// for the time zone.
+ #[diplomat::rust_link(icu::datetime::ZonedDateTimeFormatter::try_new, FnInStruct)]
+ pub fn create_with_lengths(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ date_length: ICU4XDateLength,
+ time_length: ICU4XTimeLength,
+ ) -> Result<Box<ICU4XZonedDateTimeFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+
+ Ok(Box::new(ICU4XZonedDateTimeFormatter(call_constructor!(
+ ZonedDateTimeFormatter::try_new,
+ ZonedDateTimeFormatter::try_new_with_any_provider,
+ ZonedDateTimeFormatter::try_new_with_buffer_provider,
+ provider,
+ &locale,
+ length::Bag::from_date_time_style(date_length.into(), time_length.into()).into(),
+ Default::default(),
+ )?)))
+ }
+
+ /// Creates a new [`ICU4XZonedDateTimeFormatter`] from locale data.
+ ///
+ /// This function has `date_length` and `time_length` arguments and uses an ISO-8601 style
+ /// fallback for the time zone with the given configurations.
+ #[diplomat::rust_link(icu::datetime::ZonedDateTimeFormatter::try_new, FnInStruct)]
+ pub fn create_with_lengths_and_iso_8601_time_zone_fallback(
+ provider: &ICU4XDataProvider,
+ locale: &ICU4XLocale,
+ date_length: ICU4XDateLength,
+ time_length: ICU4XTimeLength,
+ zone_options: ICU4XIsoTimeZoneOptions,
+ ) -> Result<Box<ICU4XZonedDateTimeFormatter>, ICU4XError> {
+ let locale = locale.to_datalocale();
+
+ Ok(Box::new(ICU4XZonedDateTimeFormatter(call_constructor!(
+ ZonedDateTimeFormatter::try_new,
+ ZonedDateTimeFormatter::try_new_with_any_provider,
+ ZonedDateTimeFormatter::try_new_with_buffer_provider,
+ provider,
+ &locale,
+ length::Bag::from_date_time_style(date_length.into(), time_length.into()).into(),
+ zone_options.into(),
+ )?)))
+ }
+
+ /// Formats a [`ICU4XDateTime`] and [`ICU4XCustomTimeZone`] to a string.
+ #[diplomat::rust_link(icu::datetime::ZonedDateTimeFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::datetime::ZonedDateTimeFormatter::format_to_string,
+ FnInStruct,
+ hidden
+ )]
+ pub fn format_datetime_with_custom_time_zone(
+ &self,
+ datetime: &ICU4XDateTime,
+ time_zone: &ICU4XCustomTimeZone,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ self.0.format(&datetime.0, &time_zone.0)?.write_to(write)?;
+ Ok(())
+ }
+
+ /// Formats a [`ICU4XIsoDateTime`] and [`ICU4XCustomTimeZone`] to a string.
+ #[diplomat::rust_link(icu::datetime::ZonedDateTimeFormatter::format, FnInStruct)]
+ #[diplomat::rust_link(
+ icu::datetime::ZonedDateTimeFormatter::format_to_string,
+ FnInStruct,
+ hidden
+ )]
+ pub fn format_iso_datetime_with_custom_time_zone(
+ &self,
+ datetime: &ICU4XIsoDateTime,
+ time_zone: &ICU4XCustomTimeZone,
+ write: &mut diplomat_runtime::DiplomatWriteable,
+ ) -> Result<(), ICU4XError> {
+ self.0
+ .format(&datetime.0.to_any(), &time_zone.0)?
+ .write_to(write)?;
+ Ok(())
+ }
+ }
+}
diff --git a/intl/icu_capi/tests/missing_apis.txt b/intl/icu_capi/tests/missing_apis.txt
new file mode 100644
index 0000000000..33caa29238
--- /dev/null
+++ b/intl/icu_capi/tests/missing_apis.txt
@@ -0,0 +1,33 @@
+# This file contains all APIs that are exposed in Rust but not over FFI, and not allowlisted in IGNORED_PATHS in tools/ffi_coverage/allowlist.rs.
+# It is generated by `cargo make diplomat-coverage`.
+#
+# If adding an API that expands this file, please consider:
+#
+# - Whether you can expose that API over FFI in the same PR (and if you do so, be sure to add a `rust_link` annotation)
+# - Whether the API already has its functionality exposed over FFI (if so, add a potentially-`hidden` `rust_link` annotation to the corresponding FFI API)
+# - Whether that API is rust-specific functionality that need not be exposed (if so, add it to the allowlist with a note, or add a `hidden` `rust_link` annotation to a related API if possible)
+# - Whether that API should be punted for later in FFI (if so, please check in with @Manishearth, @robertbastian, or @sffc)
+# - Whether the API is experimental (if so, add it to the allowlist as experimental)
+#
+# It is acceptable to temporarily have APIs in this file that you plan to add in a soon-upcoming PR.
+#
+# Please check in with @Manishearth, @robertbastian, or @sffc if you have questions
+
+
+icu::properties::bidi_data::BidiAuxiliaryProperties#Struct
+icu::properties::bidi_data::BidiAuxiliaryProperties::from_data#FnInStruct
+icu::properties::bidi_data::BidiAuxiliaryPropertiesBorrowed#Struct
+icu::properties::bidi_data::BidiAuxiliaryPropertiesBorrowed::get32_mirroring_props#FnInStruct
+icu::properties::bidi_data::BidiAuxiliaryPropertiesBorrowed::get32_pairing_props#FnInStruct
+icu::properties::bidi_data::BidiMirroringProperties#Struct
+icu::properties::bidi_data::BidiPairingProperties#Enum
+icu::properties::bidi_data::bidi_auxiliary_properties#Fn
+icu::properties::names::PropertyEnumToValueNameLinearMapper#Struct
+icu::properties::names::PropertyEnumToValueNameLinearMapperBorrowed#Struct
+icu::properties::names::PropertyEnumToValueNameLinearMapperBorrowed::get#FnInStruct
+icu::properties::names::PropertyEnumToValueNameLinearTiny4Mapper#Struct
+icu::properties::names::PropertyEnumToValueNameLinearTiny4MapperBorrowed#Struct
+icu::properties::names::PropertyEnumToValueNameLinearTiny4MapperBorrowed::get#FnInStruct
+icu::properties::names::PropertyEnumToValueNameSparseMapper#Struct
+icu::properties::names::PropertyEnumToValueNameSparseMapperBorrowed#Struct
+icu::properties::names::PropertyEnumToValueNameSparseMapperBorrowed::get#FnInStruct